Adding plugin to sidebar file in WordPress

So im in the middle of creating a site with WordPress but now Im stuck at the sidebars. In sidebar.php-file I have added some text and CSS rules as a test and they are shown at the site as a sidebar. However, I want to show the forum's latest posts in this sidebar instead. Im using a plugin called "tt post viewer". I tested it out on a page at the site and it shows me the latest post. But im not sure what code I should add to the sidebar.php-file so that the plugin print the latest post at the sidebar. And if it's possible?

https://wordpress.org/plugins/tt-post-viewer/

Would be grateful if anyone could help me out.

Thanks!

yours sincerely, Winterwind

Solutions

You don't need to add code to the sidebar. Make sure your sidebar is wdiget-ready and just drag and drop the widget in the Wordpress Backend into your sidebar.

Tags: PHP / Jquery / Html

Similar questions

get_posts() in secondary sidebar messes up content in primary sidebar
I use get_posts() to generate a menu of posts having the current page as the parent. This causes the post_id to be set to the first such post, instead of the original page's post_id. I.e. I want Wordpress to continue as if nothing happened after the query. This is the code I use in sidebar.php: All available information says get_posts() doesn't aff...
Way to hook into a sidebar call to replace it with a custom sidebar
I want to replace the sidebar-2 in the twentyforteen theme with a custom sidebar based on a conditional statement for CPT. So if the page is showing a certain custom post type then show my custom sidebar, else just show the default sidebar. I want to do this without changing the theme or using a child theme (i.e. purely from a plugin). Here is what...
Can't replace the default sidebar with a custom sidebar on Custom Post Type in Genesis
I have an archive template ("archive-reviews.php") for a Custom Post Type I have created. I'd like to replace the default archive sidebar with a different one that I have created using the Genesis Simple Sidebars plugin. The code I am using in the template file to do this is as follows: I don't think this is relevant, but I have also added the foll...
Sidebar widgets are looping out of the sidebar wrapper
If there is no post and sometimes, the sidebar widgets are looping out of the sidebar wrapper. sidebar.php output: Thanks so much.
Sidebar pagination posts not shown when sidebar is in single.php
A quick question. So I have created a loop in a new file called sidebar-extra.php which I include via the header.php into my single.php file. Problem: when I go to a post (single.php), I can't see this navigation, while I can see it on my homepage, where I also include sidebar-extra.php Is there a way I can make sure that my sidebar-extra.php is sh...
Inject PHP code into "sidebar-content" - code before my WooCommerce sidebar widget?
I am trying to add some PHP code before my WooCommerce product page sidebar content and can't for the life of me find where to do that. I have tried editing sidebar.php, using the 'woocommerce_sidebar' hook but cannot make this work. I simply want some PHP code to be visible above the widget content in <div class="sidebar-content" Anybody have a...

Also ask

We use cookies to deliver the best possible experience on our website. By continuing to use this site, accepting or closing this box, you consent to our use of cookies. To learn more, visit our privacy policy.