• I would like to place some html content between posts on the blog page. I tried to do so. Are there any other ideas? Or is it better to write code in content-blog.php?

    // Add content to astra_entry_after()
    add_action( 'astra_entry_after', 'add_content_entry_after' );
    function add_content_entry_after() {
    global $wp_query;
    if($wp_query->query['pagename']=='blog'){
    ?>
          <!-- Your HTML goes here -->
    <?php}  
    }
Viewing 3 replies - 1 through 3 (of 3 total)
  • Hey @zabavljaev,

    You are using the right action hook for this scenario and it is recommended to use action hooks instead of modifying the theme’s core files.

    Please let me know if you need further help with this.

    Regards,
    Vikas

    Thread Starter zabavljaev

    (@zabavljaev)

    Hello! Thanks so much for the quick reply! The fact is that I do not change the theme files, but change these files in the child theme. And besides this I use hooks.

    Hey @zabavljaev,

    If you are using hooks and still it is not working, you can open a support ticket here

    Our team will help you with this.

    Regards,
    Vikas

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘html content between posts on the blog page’ is closed to new replies.