Archived topic
Page Hero featuring Sticky Posts
5 replies · Started by Olivier on October 23, 2018
Hello,
I'm very new into Wordpress and decided to start learning with GeneratePress. Very Happy so Far. Now I'm trying to go further and obviously, due to a lack of knowledge, get stuck.
Inspired by the "Using The Header Element Type" video tutorial (https://vimeo.com/284422319), I'd like to display a Page Hero at the top of my blog page rather than at the top of my single posts.
Just like the tutorial, the Page Hero would contain the featured image, the title, the author and the date, but of my sticky post. And if there is more than a one sticky posts, add a slider to show all of them.
1. Is there a template tag I can use for accessing Sticky Note featured images, title and author ? Can I create one, so I can add it in my page hero element ? Would you mind showing me the way to do so?
2. Can I add the slider for multiple sticky posts with the Generate Premium plugin I already purchased or should I download another plugin ?
Sorry for my newbie questions,
Thanks for your support !
Olivier
Hi there,
1. If I understand correctly, you are trying to show posts within header element? If so you will need to use Tom's WP Show Posts plugin:
https://en-ca.wordpress.org/plugins/wp-show-posts/
2. There isn't any built-in for this. Unfortuantely WP Show Posts doesn't have a slider either yet (Tom is actually working on this).
Let me know if this helps :)
Hi Leo,
Thank you for your quick reply.
I understand the slider thing will be a bit tricky to implement.
So let's focus on my first point. I have not been clear in my first post so here is a image to illustrate what I'd like to do.

As you can see, I don't want to show an entire post in the page hero element. I just want to show the featured image, the title, the date and the author of the sticky post so it's highlighted in the blog page and so you can reach it directly when you click on it.
Exactly like on this website : https://www.helpscout.net/blog/
Does it make sense ? :)
Have you tried WP Show Posts plugin as I suggested above?
That would be the closest solution.
Let me know :)
Yes, I did.
You're right. That might work with some workarounds. WP Show Post does not have any options to select only sticky posts from what I have seen. Yet, I could use some tags instead of checking the sticky box. And then ask the plugin to show nothing but the title, the author, and the date.
Not very happy with this solution. It's a heavy solution for a "simple" problem.
As I said, I just need to access the title, the date, the author and the featured image of my sticky post to show it in the page hero of the blog page. The GP "Element" premium plugin enables me to do almost that. With it, I can access and display the taxonomy title "Blog" in the page hero of the blog page.
I just don't have enough knowledge to tweak the php files to do the same with the sticky post title rather than the taxonomy title :(
Sorry. I imagine I look very demanding for someone who doesn't know that much :(
I just don't like the idea to spoil the beauty and smoothness of GP with unnecessary heavy plugins...
Unfortunately your request is not as "simple" as it might look like.
The workaround with WP Show Posts is definitely the simplest way to do it - it's a plugin developed by Tom (GP's developer) so it's definitely not heavy, and it's built for things like this.
I've recently used WPSP in page hero as well and it worked well for me:
https://www.screencast.com/t/MmRt9SF5Op8
If you want a custom solution without using the plugin, then you might need to hire a developer to code it for you.
Sorry I couldn't be more helpful :(