- This topic has 3 replies, 2 voices, and was last updated 4 years, 11 months ago by .
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
- You must be logged in to reply to this topic.
Support › Forums › Flex Theme › Function to Show Banner Widget on all Pages
I wish to have full width area on every page after header, different from home banner. Essentially a text box with coloured background. I registered a new widget area OK and added the function, but couldn’t get the conditional right so the banner was displaying on the home page (in addition to the home page banner) as well as the other pages. This is the function I had without conditional
add_action( ‘genesis_after_header’, ‘add_genesis_widget_area’ );
function add_genesis_widget_area() {
genesis_widget_area( ‘pages-banner’, array(
‘before’ => ‘<div class=”pages-banner widget-area”>’,
‘after’ => ‘</div>’,
If it would be easier to do it with a full width text widget area with coloured background for all pages except home page, please advise how to do this. Searched web, but not finding any tutorials for this.
thanks!
Have you tried this plugin?
Checked it out, looks good, but not sure it is right for what I want to do. This page link shows the type of coloured text box I want at top of all pages except home page, and I will have different text on each page. example
I’m not a coder, but very good at pasting and copying 🙂 Can you point me in the right direction for something to achieve this please.
That plugin does exactly what you want. See back-end and front-end screenshots – https://wordpress.org/plugins/genesis-custom-headers/screenshots/
Ideally for such implementation one would need custom box (which involves lot of code and above plugin does that) or you can add one widget under the header and control what to display on each page via widget logic plugin. That can be difficult to manage if you are planning to add that functionality on lot of pages.