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
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
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
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
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