Integrity stack - content area at top of Blog page

Hi. A 3rd-party designer wants 3 buttons at the top of the Blog page, below the header and navbar and above the index of recent posts. I do not see a setting that enables me to place content above the index. Can someone tell me how to create a content area above the posts index on the Blog page?

Thank you.

Hi @SwissArmyKnife,

Thanks for reaching out.

That’s doable with hooks, example, please add this code to the child theme’s functions.php

add_action('x_before_view_global__index', 'display_button_here');

function display_button_here () { if ( !is_home() ) return false; ?>

place your button here

<?php }

Then place your button codes there, but if you want to edit the buttons through the admin or even by using the builder then I recommend utilizing the global block. Please check this

You can simply create your buttons within the global block builder and use its shortcode along with the above code. Example,

add_action('x_before_view_global__index', 'display_button_here');

function display_button_here () { 
if (  is_home() ) {
echo do_shortcode( '[cs_gb id=654]' );

Hope this helps.

Yes, it helps immensely. It works exactly as I need it to work. Now I just need to get a handle on creating filter buttons for the Blog index.

Thank you very much. Have a great day.

You’re always welcome.
It’s good to know that @Rad were able to help you out.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.