Support ForumBlog page – Show posts from 1 category only. – Support Forum https://support.ishyoboy.com/forums/topic/blog-page-show-posts-from-1-category-only/feed/ Mon, 23 Nov 2026 21:43:05 +0200 http://bbpress.org/?v=2.5.12-6148 en-US https://support.ishyoboy.com/forums/topic/blog-page-show-posts-from-1-category-only/#post-12116 <![CDATA[Blog page – Show posts from 1 category only.]]> https://support.ishyoboy.com/forums/topic/blog-page-show-posts-from-1-category-only/#post-12116 Tue, 08 Mar 2016 14:14:16 +0000 Amayazardoya I want to display only one category in the blog page. is it possible? in php code? where?

]]>
https://support.ishyoboy.com/forums/topic/blog-page-show-posts-from-1-category-only/#post-12134 <![CDATA[Reply To: Blog page – Show posts from 1 category only.]]> https://support.ishyoboy.com/forums/topic/blog-page-show-posts-from-1-category-only/#post-12134 Sat, 12 Mar 2016 09:59:25 +0000 Amayazardoya Can I display posts just from specific category in the blog page?

]]>
https://support.ishyoboy.com/forums/topic/blog-page-show-posts-from-1-category-only/#post-12142 <![CDATA[Reply To: Blog page – Show posts from 1 category only.]]> https://support.ishyoboy.com/forums/topic/blog-page-show-posts-from-1-category-only/#post-12142 Mon, 14 Mar 2016 07:05:23 +0000 IshYoBoy Hi there,

Please read this conversation:
https://wordpress.org/support/topic/loop-posts-from-a-single-category-id

The main Blog page is handled via “home.php” you need to edit it and modify the query before the WordPress loop starts. We strongly suggest to copy the “home.php” to the root of a child theme (one is provided in the main files by us) and edit it in this child theme. Once done upload and activate this theme.

This will prevent loosing your changes when you update the main parent theme. More about child themes: https://codex.wordpress.org/Child_Themes

One of our users tried a similar thing:

I need my posts displays randomly on tha main page

So basically you should add the following code on line 8 after the “$page = get_page( get_option( ‘page_for_posts’ ) );”:

So instead of this:

You should have this

Cheers

A 5 star rating is always a great motivation for us if you are happy with our theme or support!
Themeforest | MojoMarketplace | Creative Market

]]>
https://support.ishyoboy.com/forums/topic/blog-page-show-posts-from-1-category-only/#post-12156 <![CDATA[Reply To: Blog page – Show posts from 1 category only.]]> https://support.ishyoboy.com/forums/topic/blog-page-show-posts-from-1-category-only/#post-12156 Mon, 14 Mar 2016 17:17:26 +0000 Amayazardoya Ok thanks for help. It works

Can I do the same for widget “recent-post”? how?

]]>
https://support.ishyoboy.com/forums/topic/blog-page-show-posts-from-1-category-only/#post-12159 <![CDATA[Reply To: Blog page – Show posts from 1 category only.]]> https://support.ishyoboy.com/forums/topic/blog-page-show-posts-from-1-category-only/#post-12159 Tue, 15 Mar 2016 07:09:46 +0000 IshYoBoy Hi,

the code of the widget can be found in here:
“wp-content/themes/minicorp/assets/framework/wp/widgets/recent-posts.php”

Here you need to modify the WP_Query object. You can read about its properties in here https://codex.wordpress.org/Class_Reference/WP_Query

P.S.: Please keep one issue per topic (it should co-relate to the title of the topic)

Cheers

A 5 star rating is always a great motivation for us if you are happy with our theme or support!
Themeforest | MojoMarketplace | Creative Market

]]>