Archived topic
How do I add featured post on marketer theme?
9 replies · Started by Ümit Yaşar on May 5, 2020
Hello,
I want to add featured posts on marketer theme just like on dispatch theme. How do I do that?
Thanks
Hi there,
You would need to create a header element:
https://docs.generatepress.com/article/header-element-overview/
https://docs.generatepress.com/article/how-to-create-a-page-hero/
Then use WP Show Posts to display your posts:
https://wordpress.org/support/plugin/wp-show-posts/
Hi,
Thanks for the respond however I don't want to show hero image, I just want to add 4 featured image as on dispatch theme.
You don't have to use a hero image with a header element.
Dispatch is just using the header element to insert the WPSP shortcode:
https://gpsites.co/dispatch/page-and-post-heroes/
Thanks again, ok i could do it to some extent but when I add css, there is a problem. Could you have a look at please? I get css code from dispatch
Hi there,
can you disable any cache plugins you're using so i can take a look ?
Hi,
Thanks again. I disabled the cache plugin.
OK - so Dispatch requires more then CSS to work. You will need to create 2 x new Hook Elements:
https://docs.generatepress.com/article/hooks-element-overview/
1. Hook#1 add this content:
<div class="wpsp-content-wrap">
<!-- Openeing wrapper -->
Hook: Custom Hook
Custom Hook Name: wpsp_before_header
Priority: 15
Display Rules: Entire Site
NOTE When you add the above content the editor may automatically add a closing </div> - if it does you must delete that.
2. Hook# 2 add this content:
<!-- Close WPSP Wrapper -->
</div>
Hook: Custom Hook
Custom Hook Name: wpsp_after_content
Priority: 15
Display Rules: Entire Site
Thank you man, it s ok now.
Glad to hear that