you don’t need to echo the title out.
Try this:
$the_query = new WP_Query( array( 'category_name' => get_the_title() );
Related Posts:
- How to show all posts of the category in wordpress?
- WP_Query by a category id and a custom post_type
- Exclude a category from WP_Query
- Custom post type archive 404’s with paginate_links
- WP_Query ignores post_type in category view
- Display Custom Post Type Fields
- category__in not working on custom post type
- Retrieving 3 latest post from each of 5 different custom post types
- how to group custom post type posts by custom taxonomy terms
- Using Query Posts With Multiple Post Types And A Taxonomy
- How to get the parent’s taxonomy?
- List with categories, subcategories and posts of custom posttype
- New WP_query in template not working with CPT+category on some pages
- Query not returning CPT posts
- WP Query group/order by category name
- Unable to display multiple post types in same query (WPML WP_Query)
- List all custom post type posts from a given category?
- Query for posts in 2 taxonomies
- Display Posts of a Category in Alphabetical Order (Custom Post Type)
- WP_Query with custom post_type and cat retrieving unwanted posts with the custom posts
- Query Custom Post by Category
- Loop through categories and create tab for each
- Quickest way to get last or oldest post date – WP Query
- Separate Posts and Custom Post Type in Custom Taxonomy archive template
- Show Post Count of a Category
- CPT posts listed by category with custom rewrite URL, please help!
- Custom query shows custom post types in trash
- Multiple post type queries (with specific arguments for each)
- Querying Term Posts in Loop
- Pagination is not working on single-{slug}.php but works fine on page-{slug}.php
- Pagination on category page with custom post types
- How to show CPTs in term archive
- showing custom post types of a certain category only
- Query/list all terms and their custom post count
- Linking to the most recent post in a Custom Post Type
- Archive for custom taxonomy lists all posts instead of current taxonomy
- How to query_post custom posts within default taxonomy?
- Show custom post type filtered by category
- forming WP_Query for posts of all post types but from specific categories
- Get latest 3 posts from multiple CPT in one query
- Show a Category X’s custom post type on Category X archive page?
- WP Query with categories only shows one post and ignores the category
- Polylang non-default language ignores tags in WP_Query
- How to edit this code to get the categories in achieve page?
- Category with post type pagination returns 404
- Different Ways to Query Custom Post Types?
- How to display Related Posts based on number of taxonomy terms matched
- WP the_posts() on single-cars.php get category link
- How to make WP_Query not to show irrelevant posts?
- Loop for custom post types filtered by a taxonomy
- WP_Query Custom Post Type if Category ID Equals
- Custom post types and ‘new WP_Query’
- Custom post type, custom taxonomy, query posts only from taxonomy (children of)
- How to include category name/id in wp_query for retrieving “custom post type” from a particular category?
- Pagination not working on custom query on a page
- find custom post type post by searching its custom field with my string
- FacetWP paging custom wp_query
- WP Query results showing posts outside of category ID
- How to get Custom Post Type with Categories wise in WordPress using wp_query
- Can’t change posts per page in WordPress Post Type Query
- postsperpage value not being applied
- Create query for both custom post type and category
- How to properly use Categories with Custom Post Types
- 4 posts per page from single category
- Custom Post Type Query W/Category Dropdown
- Find Posts based on Child Post value
- Custom Post Type ‘Event’: Chronological list of recurring events from meta_values in array
- Sorting the Loop by Taxonomy Value
- Custom Query: Multiple CPTs and a taxonomy filter
- WP query_posts group by meta field related
- Custom wp-query display post only today
- Custom post type archive page filters
- custom post type and a “sticky” position taxonomy
- How to output custom post type title on custom page with category next to it?
- Use WP_query to match post types based on custom field values
- minimize wp_query call to database
- Custom Post By Category
- Only show categories that have posts within custom post type
- Only show current category post
- Main site single-property.php design, as homepage of a multisite
- Imported Content Doesnt Show Up On Frontend
- Can’t seem to filter wp_query by current category ID
- Custom Post Type + Category archive
- WordPress custom post type
- Display 2nd category, only once, as sub-heading, in the loop
- Custom Query With Multiple Meta Key Value
- Custom post type blog pagination conflict
- How can I list custom post by custom category?
- Query Posts From Multiple Post Types
- category_name not working in WP_Query
- send user to first page of results when reposting to page?
- Get all custom_post_type posts + blog posts from one category in a single query
- Using tax_query to get single post per category
- How do I correctly query posts from a post ID?
- How to exclude certain portfolios from a loop
- Are custom posts included when getting a categories’ posts?
- Is it possible to make is_category() recursive?
- Quering array of post types & pagination. Articles are repeating sometimes on different pages
- Display ACF object field data using Elementor Custom Query
- Assign a tag to custom post type using a query