How To Guide To Show Recent Posts by Category in WordPress In today's how-to blog post, you'll learn how to show recent posts by category in WordPress. If you want to showcase a specific category in WordPress sidebar widget, you can choose one of two methods. First one is an easy method, and it's by using a plugin called category posts widget. To get started we'll just install and activate the plugin then go to appearance, widget and drag the category post widget where you want it to go. From there you can give it a title, choose which category you want to show, and the number of posts to show for the category you can also choose how to sort it. You have all these other options down here to choose from. Just customize it to fit your needs and when you're finished, click save. Now we can go to our demo site and see it in action. Here, it's showing the last 5 from my category like I want it to. The second way to do this is a little bit more advanced it does not require a plugin, but it does require you to add some code to your theme's function.php file. Category Slug First, you want to make sure you backup your site. And then you add the code like this to your functions.php file. When choosing your category slug make sure you put your category in there. This code brings back the 10 posts from a specific category and displays in a bulleted list. If the post has a featured image, then it will show that as well. Now we can add this code to show our list on either a footer or a single.php file. Or you can just add the text widget under appearance, widgets and add the shortcode here. You can see what it looks like on the demo site. You'll also need to add some CSS to make the list look better so test different CSS codes to tweak it to your liking. As found on Youtube If you enjoyed this blog post be sure to click on the share button below and leave us a comment. And if you want to receive more helpful post don't forget to subscribe to our feed and check out https://shaneperry.co/blog for more useful information on websites.
Learn To Scan Your WordPress Site for Potentially Malicious Code Today we want to show you how to scan your site for potentially malicious code. There are a few steps to take to check your site. First, install and activate the theme authenticity checker plugin. Then go to appearance-->TAC the plugin scans your theme files for malicious or unwanted code and gives you and ok status if everything is good. If it finds something you'll see red status with information about what it found. Next, you have the exploit scanner. It checks all files and database items for any signs of malicious code, not just the theme folder. Note this plugin does have a tendency to return false positives so you need to know what you are checking. After activating it, we'll get to tools-->exploit scanner and click run the scan. It will keep you updated on how many files it has scanned and then returns a status. The last thing I'll show you is using Sucuri to scan your site. It's pretty robust and if you have their paid version, they are proactive in keeping your site safe. For this blog post, We'll just show you their free version and what it does. From the home page, just type in your site's URL and click scan this site. When it's finished, it will give you the results and recommendations for fixing them. I hope you liked this blog post and found it helpful. If you did, click on the like button below and leave us a comment. And if you want to receive more helpful tips don't forget to subscribe to our webmail and check out our blog for more useful information on WordPress. Remember that malicious code on your WordPress site can really harm your web presence. Be sure to get professional help if you are not sure if you have malicious code on your WP site.