Archived topic
Show post view count with "Post Meta Template"
7 replies · Started by Tammy on March 23, 2022
Is someone able to help me with a CSS or direction on how to align show post viewcount within the post meta template container. See the attached image. I'm using a Post Views Counter plugin and was wondering if there's a way I can align with the rest of the post meta template items.
Hi Tammy,
How is this Post Views count element being added?
The easiest way to control the post meta layout is by creating a Page Hero Block Element.
See this for reference: https://docs.generatepress.com/article/block-element-page-hero/
Hope to hear from you soon. :)
Thanks Fernando for your quick response. The post view count was add via a plugin, I don't think generatepress has any feature for this? I could be wrong. I looked at the video, I can make that but still how sure how a post view counter can be added?
I'm using this Plugin
I see. Thank you for identifying the specific plugin.
Looking at its documentation, it seems that you can add the Post Views element manually through a shortcode: https://dfactory.co/docs/post-views-counter/manual-usage/#:~:text=In%20its%20text%20editor%2C%20enter%20the%20%5Bpost%2Dviews%20id,the%20counter%20to%20be%20displayed.
With this knowledge, you may create a customized post meta layout through a Block Element - Page Hero with the shortcode of the Post Views Count.
Example: https://share.getcloudapp.com/JruOLgor
Basically, you’ll just need to place its shortcode inside a shortcode Block and you can place it along the post meta items of your preference.
To reiterate, you may see this for reference on how to create a Page Hero Block Element: https://docs.generatepress.com/article/block-element-page-hero/
Hope this clarifies. :)
Thank you so much Fernando. The was super helpful. Worked as charm
Looks great! You’re welcome Tammy! Glad to be of assistance! Feel free to reach out anytime if you’ll need assistance with anything else. :)