Integrate WP-PostViews with Kadence Pro Using Shortcode for Enhanced Entry Meta Display on Category Archive Pages
To enhance the display of post views on your category archive pages using Kadence Pro, you can integrate the WP-PostViews plugin by hooking it into the kadence_after_loop_entry_meta
element. This integration involves using a shortcode to align the post views with the entry meta date, providing a seamless and informative experience for your site visitors.
By following these steps, you’ll ensure that the post view count is prominently displayed alongside other key meta information on category archive pages, giving your audience valuable insights into the popularity of your content.
Please read this article first before setting up this element:
I used a plugin that shows the Kadence Hook location:
Element I created and used:
You can copy and paste this in the element to create a clone of what I did.
<!-- wp:kadence/rowlayout {"uniqueID":"149_2fc309-4f","columns":1,"colLayout":"equal","verticalAlignment":"middle","padding":[0,"",0,""],"kbVersion":2} -->
<!-- wp:kadence/column {"borderWidth":["","","",""],"uniqueID":"149_ffb01f-2b","justifyContent":["center","",""],"rowGap":[0,"",""],"rowGapVariable":["none","",""],"verticalAlignment":"middle","padding":[0,"","",""],"kbVersion":2} -->
<div class="wp-block-kadence-column kadence-column149_ffb01f-2b"><div class="kt-inside-inner-col"><!-- wp:paragraph -->
<p>[views]</p>
<!-- /wp:paragraph --></div></div>
<!-- /wp:kadence/column -->
<!-- /wp:kadence/rowlayout -->
- Create a new element for kadence. nexxt name the element Views Category Archive
- In the element settings
- Select custom hook in the content section placement:
- Custom hook: kadence_after_loop_entry_meta
- Display Settings:
- Show on: Category Arrchives
- You will need to set the alignment for the section to fit your needs.
Shortcode I used:
[views]
Notes:
This basic script, CSS style, and plugin are designed to function optimally assuming minimal interference from your theme or other plugins. If conflicts occur or further customization is needed, additional adjustments may be necessary. Please note that this script, CSS style, or plugin must be used AS IS.
Wp Scriptly
Comments: