The problem was solved by making it display all post types:
$args = array(
'cat' => 9,
'posts_per_page' => 2,
'post_type' => 'any',
);
new WP_Query($args);
Related Posts:
- What do ++ and *+ mean?
- Display current category title on category page
- WordPress GET parameters causing 404 Not Found
- is_page() not working from within a plugin
- How to add date range in woocommerce with code
- How to handle a custom form in wordpress to submit to another page?
- Is it possible to generate a page without create in the admin?
- Admin Media grid view images won’t load
- WordPress remove EXIF Data from specific Thumb
- Replacing mysql_real_escape_string in WordPress theme
- TCPDF get_post_meta outside the loop
- How to redirect all 404 in a WordPress subdirectory to the index.php of subdirectory?
- How Do I Add User Custom Field to REST API Response?
- WooCommerce Link to Product Category
- Should I store my Facebook access tokens?
- Easiest way to show total number of subpages
- How to return output of the new wp gallery block for automatically Link images To Media file
- When must I use and verify nonce?
- Filter get_the_title to remove certain characters?
- Can’t load WP function into external function
- Woocommerce – Filter Variable Products by Variation Attributes and Variations Regular Price
- Loading header.php on specific page
- Displaying a button on each post
- Adding a div at the bottom of a sidebar
- How can I set a default category for a custom post type in wordpress?
- Store records for a table in wordpress
- Slider loading issue
- WooCommerce Related Products by Attribute
- Image as Sales Badge
- Sort posts by custom fields value using dropdown menu
- How to Arrange PHP Files to Allow for Multiple Types of Pages?
- Cause of Blank Lines Being Added to WP FIles?
- Limit Widgets to Sidebar ID’s
- add_cap not working
- Weird 404 URL Problem – domain name being placed at end of urls
- Trouble checking if custom woocommerce checkout field is empty or not
- Styling my own password protected page, how to deal with wrong password?
- Add / Update Custom Fields After Select Pictures in Media Window
- Help solving t_echo php error while using echo do_shortcode
- How to debug this search & replace strings snippet?
- WordPress Theme Modification Help
- How to list commenters and days since last commented
- PHP Warning: strip_tags() expects parameter 1 to be string?
- How to modify the default feed via a function
- Automatically add images to a menu
- Custom Post type slider with thumbnail navigation
- Where can I find the inline-css of my theme header?
- Remove empty terms from array, sort alphabetically, update back to repeating field
- Call WC_Product get_price()?
- Filter by field with array value in ACF on WP REST API
- How to remove the space before the ellipsis in excerpt?
- custom plugin with upload files does not work
- WordPress SQL JOIN query
- Aspx/Rss feed – failed to open stream: Redirection limit reached
- Adding an Unlinked Space in a Custom Function
- page 1 is not paged
- How do I call an external php non WordPress class into functions.php?
- send popup after wp_redirect()
- Validate search against a list of codes in wordpress
- no_rest_route error on custom routes
- A function to get the content of a page
- If Post Published Date or Modified Date is 1 Year or Older, Display Notice on Post Page
- HTML Form Question
- Exclude ipads and tablets form wp_is_mobile code
- How to put the day of the function get_the_modified_date (‘l’, $post_id’) with the first capital letter?
- Where Do Image Dimensions Get Added To A Filename?
- How to set Nav as a default menu in wordpress
- WordPress How do I pass a variable from one add_action to another?
- Advance custom fields variable with if statement & Function
- Add my footer menu to the header
- Child and Parent Pages list of sub pages
- Printing OEmbed URL based on Post selected w/o page refresh
- How to use get_template_part always relatively to the file I’m using it in?
- Include search tags and users in my search results system
- Complex PHP for json_encode > how to handle/output right?
- How to use something like meta_query but for fields?
- Local WordPress from Git repo, where to set document root?
- Show content by using tags
- Return only certain (html)-elements of the_content()
- Need to adjust condition to say if I’m pulling categories from a post, to pull only the first one
- Showing featured image of page’s child’s children page
- Apply filters when loading post via ajax
- How to call post title and post summary to other part of site?
- how to run a php code in widget?
- Shortcode At top of Page – PHP 5.5 vs 5.4 – ob_start();
- WordPress site cant display media when it’s live
- Removing all my hardcoded URLs with get_site_url()
- Restricting Post Content Visibility with Custom Code – where to put it?
- Highlight main menu when on specific posts or pages
- Submenu opened problem
- Implement “No related posts for this entry” into the loop?
- wc_add_notice not working on cart page
- How to convert my comment.html to comment.php
- It’s not showing full content for posts pages in wordpress “[…]” while customing some changes in the style.css file [closed]
- How do I convert a custom field to a php date format? [closed]
- append special url end of my website urls
- Customize create table SQL statement in any WordPress plugin
- Deprecated: stripos(): Error in WordPress After Updating to php 8.1
- How can I display all these movies in DESC order by modified?
- Remove /Page/ from slug when we’re visiting 2nd and other inner pages of the blog page