That’s easy, just add following code in your theme’s functions.php file:
function 348118_my_home_category( $query ) {
if ( $query->is_home() && $query->is_main_query() ) {
$query->set( 'cat', '1234' );
}
}
add_action( 'pre_get_posts', '348118_my_home_category' );
In the above code change 1234 with the ID of your music category.
Related Posts:
- Exclude a category from WP_Query
- Custom Post Types on Category Pages
- Adding Categories to a WordPress Custom Post Type?
- Creating “static” taxonomies to choose from, inside custom post type?
- How to display regular posts & custom post types that fall under a category using just the generic category template?
- WP_Query ignores post_type in category view
- How to filter custom post types by custom category taxonomy
- Is there a way to use regular categories with custom post types?
- How to list all categories and tags in a page?
- Pagination not working with custom category template
- remove support for ‘Categories’ for a custom post type
- Remove date and category filters when editing custom post types
- How can you make permalink work for custom post type and taxonomy?
- Filter get_categories() for taxonomy term in WordPress
- Anyway to assign custom post types to a specific category?
- List with categories, subcategories and posts of custom posttype
- wp_list_categories and custom post types
- Automatic category for a Custom Post Type
- How can i list custom post type categories?
- Query Custom Post by Category
- get_terms won’t display product_cat or any other custom taxonomies when specified
- How to display the categories of the post? (custom post type)
- Display Custom Category (taxonomy) Name in Custom Post Type
- next_post_link and previous_post_link in custom post type single page, in same non-custom category
- CPT posts listed by category with custom rewrite URL, please help!
- Combining custom post type and post category
- Multiple custom post type loops in category.php
- Add category in post type dynamically
- Use post as category
- How to get the post type from a category id?
- Insert HTML inside link in a walker
- Use regular category with custom post types
- Set menu active state for custom posttype and category, given custom taxonomy term
- How to change post featured image using a custom field of category?
- Getting posts under the custom post type ui category
- Show category ID on custom post type
- How to call in Custom Post-Type Categories?
- get_category_parents for custom post type taxonomy
- Separate custom categories from default category
- How to display custom taxonomies with links in filter menu?
- Cannot add category or custom taxonomy from admin. WordPress site is hosted in Windows 16 server via IIS. No XAMPP or WAMP
- Add custom post type settings to wordress default posts
- Hide parent categories when clicked, and show it’s childs
- Custom post type, organized by categories
- Remove CPT name from permalink but add %category% instead
- Set a checkmark in a category based on a URL-parameter
- Custom Post Type and Category Base Rewrite Issue
- I am having Trouble to get list of Categories of Custom post Type
- Multiple (two) category postings on the same page.
- School & class blogs: Categorize with categories or custom posts?
- Custom post type and category link together
- How to get custom posts sub category link
- Categories filtering in new post
- CPT category hierarchy
- Can I restrict category availability?
- How can I have different content for different countries?
- get_category_link() for custom post type does not include custom slug rewrite?
- Targeting categories in custom fields
- Invalid Taxonomy
- Displaying Custom Posts
- Assigning a category to a custom post type in WordPress
- Stores category posts in an array
- category list with cutom post count
- Get category if used in a custom post type
- custom query with custom post type and category slug
- WordPress custom post categories and subcategories on category.php
- Custom post type categories gives 404 error
- Archive Template being used instead of Category Template for Custom Post Type
- Custom Taxonomy Taxonomies of Same Name point to first created URL
- category.php not showing custom post types
- Post category behave like a Post in back office menu
- Save data is post using php front end
- Modify category permalink to use post type slug
- How to output custom post type title on custom page with category next to it?
- In the php, how can I have a category of a custom post type display?
- Create custom post type categories
- Set a Default CPT taxonomy by taxonomy id
- Automatic Set Category For A Custom Post Type
- how to create custom taxonomy drop downs for parents and child
- Page + Custom Post Type with same category
- Only show categories that have posts within custom post type
- How to create groups like that in buddypress?
- How to Show all Values in category.php page using post_type
- Getting list of Categories for Custom Post Types
- can’t see categories in appearance-menu-categories
- Custom Post Type + Category archive
- Exclude categories For Custom post types
- Show custom post type in archive page by category
- I have a custom post type that I want to query a dynamic category name from a custom meta field
- Display all post types together
- Trying to create hierarchy between 3-4 custom post types
- Having some trouble properly displaying Custom Post Types in templates
- Customize category URL
- Displaying wp post categories into my custom metabox
- WordPress custom post type post and category links 404
- show only one category posts in admin
- One set of categories for multiple custom posts
- display all posts in current category
- Choose custom post type template by category
- Are custom posts included when getting a categories’ posts?