WordPress Website Templates
Find Professional WordPress themes Easy and Simple to Setup
How can i get the short code latest-news to show from a certain category on home page is pro theme
Currently the option is not available to display the latest blog posts from selected category.
But with some code changes in custom-functions.php file we will do it for you.
Please send your website URl and WordPress admin login details for temporary at email@example.com so we can check and make this changes.
We will happy to help you.
I have changed the code in custom-functions.php file to display blog post by category
Just use the categoty=”17″ in latest news shortcode and change the category ID
[latest-news categoty=”17″ showposts=”3″ comment=”show” date=”show” author=”show”]
You changed the ‘custom-functions.php’ but you didn’t show the before and after code. This would be useful so people could make these changes themselves without bothering support.
It needed to make the changes in the custom-functions.php file
Add this at line no. 883
‘catname’ => ”,
Replace below code
query_posts( array( ‘posts_per_page’=>$showposts, ‘post__not_in’ => get_option(‘sticky_posts’) ) );
$args = array( ‘category_name’ => $catname, ‘posts_per_page’ => $showposts, ‘post__not_in’ => get_option(‘sticky_posts’), ‘orderby’ => ‘date’, ‘order’ => ‘desc’ );
- You must be logged in to reply to this topic.