I've not used joomla much before. I'm trying to just get one page of a site that uses a Joomla template to have a different logo than the rest of the site, or even hide it. I'm mostly a Wordpress developer, so just don't know how this can be done in Joomla.
Is there a way to assign a body class to one specific page in Joomla and have it hide the element?
If you edit a menu item, you want to look under "Advanced Options" and then "Page Display Options". There is a box for "Page Class" which adds a class to the page, so a body class as you wanted.
You can then tweak your template to show different pieces in CSS based on this class.
If you want to drastically alter the page, you can also assign different templates to different pages through the template manager. This takes a little more work (since you have to install and set up another template).
This would be the preferred way to handle a lot of changes so you don't have to have lots of competing CSS based on page classes.
Related
I have started learning wordpress recently. I have started from version 5 with this new Gutenberg editor which introduced Blocks. I am little confused regarding difference between this new Blocks concept and old Widgets.
Starting with a Blocks: they appear on page creation and can be added to page, there is nice documentation on wordpress webpage: https://developer.wordpress.org/block-editor/tutorials/block-tutorial/ a lot of stuff related to new blocks.
Everything is fine, but Blocks can be added only to page content and not into areas like: sidebar, footer etc.
For changing content of sidebar,footer areas we need to access Appearance->Widgets area where we can add multiple widgets to specific areas. Also for new Gutenberd Page Builder there is section called widgets available but with less number of widgets than under
Apperance->Widgets section.
Im totally confused. Could someone explain what is the difference betweemn Blocks and Widgets?
Why for areas like sidebar/footer we can add only widgets and editing footer is under Widgets menu?
Why only part of widgets are available for Gutenberg Page Editor
What should i do to create reusable code snippet(some html/css/js logic) to be reused on a page? Should i create a widget and somehow include it to widget section for Gutenberg or maybe i should create this new concept of Block? But i will not reuse my block in footer/sidebar section...
Are widgets something which will gonna die soon in wordpress world and will be totally replaced by Blocks? I remember that in previous version we were able to add widgets to page using some kind of shortcodes, so any widget we want? Is it still possible?.
I will appreciate any comments on that.
The Block Editor is so far being used only to generate "content". In the world of WordPress, that normally very generic word has a very specific meaning: whatever is returned by the function the_content(). Usually it's simply all the text and media input on the edit page of a post or page, though that can be modified by filters. This content is entered either in the classic editor's text box or (now) in one or more Gutenberg Blocks.
Widgets, on the other hand, display content outside the main content, in widget areas that your theme has located outside the main content in headers, sidebars, footers, etc.
I suspect you already know much of this. As to your question about code snippets, the simplest way to re-use code is through WordPress shortcodes. Register your shortcodes in functions.php or in a plugin; enable them in your theme; then use them anywhere. There is now a shortcode Block, by the way, for placing recurring content into main content.
I'm making a website in WordPress, and I'm using a plugin ACF PRO. I'm doing the entire site with flexible content, so the WordPress site is like a page builder.
Everything is fine, however, I came to a point where I need to have same functionality for single-[custom-post-type], so I can "Add row", header, footer etc... on it, but I can't figure out on how to do it.
I know that it's possible, because e.g if you look at this site here: https://rolleragency.co.uk/our-projects/
You can see that it works. I know they are using flexible content because I worked on that site and I did there what I wanted. I can't remember how to do that.
I think I had to use a Tempate Page? Or? I can't remember.
THe site is built entirely on flexible content, so everything there is modular and it's like a drag and drop, but how do I do that on single-slug?
You have to create a page template, yes.
So something like page-projects.php then in WordPress admin you would have a page called Projects.
The template you created should be automatically applied to this page. If it doesn't for some reason you can choose which template WP should use on the right side when editing a page.
Now, you can add whatever code you need to the page-projects.php. And also any fields you may need for that page you can set up in ACF by telling ACF to apply those fields to pages that use projects template.
This is how I would and did do it on several occasions :)
I am using WordPress and SiteOrigin Page Builder to build my website. In the settings for SiteOrigin Page Builder, I can select to make the pages have a responsive layout or turn it off all together.
The thing is, I want most of pages to be responsive, but not all of them. I am wondering if there is a way to use custom css to make the particular pages I want to exclude non-responsive?
Any suggestions would be much appreciated. :)
You can target specific pages with css, by selecting elements based on the post or page id that is available on each page. Take a look at the source of a rendered page in your browser and look for a specific id relating to that post; use its naming convention to also target other pages. E.g #post-213. Using css, you can then change responsive widths to static widths. I.e. 100% to 1200px etc.
I have a website running Wordpress with a specific, custom theme and I would like to use some of the pages as an iframe within a different website.
The problem I am having is that I don't want to show the menu, header and footer, I want to use a different font and have the page load as quick as possible.
The best way to do this is to apply a different, bare page template to the page I want to embed as an iframe. However this will also affect the page when displayed on the website. There are plugins that will enable the content to be shown as json. This gets close to what I want to do but since it's an iframe I'd prefer to have some basic styling in there.
Is it possible to do the request for the iframe in a way a different page template is applied?
I've tried reading up about this but due to the sheer amount of articles explaining how the page template hierarchy works I've not been able to find anything explaining how to make the client influence this.
tl;dr can I do some sort of ?apply_template='page-bare.php' to enforce a different page template?
I think this might help you: Load post with a different template?
The way is:
Register new query variable
Redirect to a different template, when that query var is set
Create that template in the way you like it
get_template_part might also come in handy here.
I have a WP website which has a home with a top banner and 2 more controllable panel like here.
My question is what is the best way to keep this controllable via admin?
The way I did it was to create two categories by the names "Latest Updates" and "New in 2013!" and then coded it such that the posts coming under the categories gets displayed in their respective panels on the home page. The image as usual controlled via the Featured Image of the post. A pretty basic setup to manage its content via posts to keep the layout intact and at the same time do the task.
I had suggestions where we should keep it right there in WP editor for control i.e. put all the div / ul / li etc. right there in the WP editor using the text part and have the admin control it right from there.
I need to know which method is better for implementation i.e. managing via posts like it is now or keep it right there in the editor and put HTML content in the editor.
All recommendations much appreciated.
Your first one method is correct ,easy and safe.
Safe Because,If accidentally any change in editor then all showing content breaked