How to Add Custom After Post Widgets in WordPress


WordPress.org
Mitchell Perez

If your social media sharing plugin adds buttons to the widget areas you could check the ‘Do not apply content filters’ checkbox. Note that when this is done, WordPress will also stop adding paragraph tags to your text, so use this setting with caution. It is much better to ask the developer of the social media sharing buttons plugin to correctly use the content filters (see http://pippinsplugins.com/playing-nice-with-the-content-filter/ for more information on this). If you are embedding your content block with the shortcode, add the following: suppress_content_filters=”yes”

How to add a custom widget area inside a WordPress post
Hortense Schiller

Next you need to position the widget area in the correct position. Think of this step as positioning it in an ordered queue – ask yourself what you want to see before and after it. You could place it before the post content or after it. You could even place it in a more normal place like the header or footer of the page. To place the widget area after the post content, but before the comments section (which is what I wanted to do with my site) you need to find and edit the correct template file. In my theme I’ve called this content-single.php. 

Be the first to comment

Leave a Reply

Your email address will not be published.


*