Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #27769

    Hey, I want to add a banner call-to-action beneath the header on all blog posts but not all pages. It would be good if I could use the layerslider, in a similar way to the “pages” page on the Enfold demo. How do I apply this across all blog posts without manually putting it in? Is it possible to use a custom widget area?

    Thanks

    #135305

    Hi,

    You can place it on includes > loop-index.php, find this code:

    echo "<div class='".implode(" ", get_post_class('post-entry post-entry-type-'.$post_format . " " . $post_class . " ".$with_slider))."'>";

    Below, add the banner code:

    echo '<div class="posts_banner">YOUR BANNER HERE</div>';

    or if you are using an image, you do something like this:

    echo '<div class="posts_banner"><a href="URL HERE"><img src="IMAGE URL HERE"></a></div>';

    It will show on all blog posts.

    Regards,

    Ismael

    #135306

    Thanks Ismael, that has worked really well on the blog posts themselves, but now on the blog homepage I have, the banner is at the top of every excerpt which looks pretty bad. Is there a way to have the banner on the blog posts themselves, but not on their excerpts?

    Thanks,

    Evan

    #135307

    Hey,

    Can you give us a link to the website? You can add this on your custom.css or Quick CSS.

    .blog .posts_banner {
    display: none;
    }

    .single .posts_banner {
    display: block;
    }

    Regards,

    Ismael

    #135308

    Thanks Ismael, we have decided not to use the banner anymore so I haven’t done your last reply. I am sure it would have worked though!

    Evan

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Banner call-to-action on all blog posts’ is closed to new replies.