You just need to change the get_post_types( '', 'names' )
to array( 'post', 'page' )
. I.e. Manually specify the post types.
Related Posts:
- How to override parent functions in child themes?
- Adding a second email address to a completed order in WooCommerce [closed]
- How to override a function when isn’t at functions.php
- Removing custom background and header feature in child theme
- syntax for remove_filter in parent theme with class
- Is it possible to override this function/class in a child theme?
- How to prevent deleting of comments when deleting a post
- Convert hyphen to underscore in permalinks
- How to override filter in child theme?
- Customized wp_new_user_notification
- change default option in wp_dropdown_categories
- What is the criteria for pluggable functions?
- overwrite code snippet from parent to child theme
- Solution dealing with Child Theme / Parent theme functions
- How to override this theme function in child theme
- WordPress login set cookie that survive browser exit (wp_signon function)
- Login cookies blocked after customizing hashing method
- I have an fatal error on my funcyions.php
- WordPress reading old version of functions.php, breaks site
- Providing fallback function and allow override by plugin
- Integrate WP Tiles into existing loop (index.php) and theme
- save_post hook – headers already sent?
- Possible to search by author name with default WordPress search function?
- Advantages and disadvantages of using automatic-feed-links
- When new user register then add new user role
- Change meta tags programatically
- Set first oembed in post to a global variable or function
- Adding extra SVGs to TwentyNineteen child theme using class TwentyNineteen_SVG_Icons
- Use a function to update post meta based on other post meta
- Adding body class when post contains a specific shortcode
- Displaying Widgets
- WordPress registration and contact form 7 [closed]
- Display WooCommerce subscriptions for user [closed]
- Increment price for Woocommerce Minicart [closed]
- Change woocommerce products weight varation based its product category or tags? [closed]
- Completely disable RSS feeds on WP 5.5.2 and show a 404 page instead of die();
- Check if row exists before inserting
- PHP files included in functions.php don’t seem to work
- Removing the main link to Jetpack from the menu
- Defining a global array in functions.php?
- How To Remove Duplicate Menu Locations
- Set quantity of woocommerce product on page visit [closed]
- Show top commenters without using a plugin
- WordPress shortcode attributes for database SELECT?
- How to get membership level for specific user email
- Post thumbnail not showing in WP admin area for custom post type
- Backstretch.js and thumbnail sizes to reduce loading time
- Child theme within a child theme?
- Fatal error: Cannot redeclare when switching themes
- How to load jQuery in the footer – nothing works for me
- Featured Image Thumbnail Creation
- Updating Media Published Date When Parent Post Is Modified in WordPress
- WP Ajax Function Always Returning undefined
- How can I grab the video id of youtube?
- Specify number of posts for sub-category page
- Creating A New Admin Menu Tab For Theme Options
- Passing variable as add_shortcode argument
- comments_popup_link without echo?
- Can’t filter wp_get_attachment_link
- How to customize the_archive_title()? Cannot figure out how to change the value it produces [duplicate]
- Override a function defined in wp-includes/comment-template.php
- How i can put $_GET codes in function.php?
- Is there a way to direct unregistered user to registration page when click a link?
- Auto log in hook is requiring a page refresh
- how to get the post ID from wp_insert_post
- Possible to merge these two functions?
- How can I set the SRC URL of the custom logo image?
- The Capability to choose post/page template
- The_content and Preg_replace in loaded Iframe [closed]
- dynamic site link for future migration in echo do_shortcode()
- Hide tab Buddypress profile for visitors, not logged in users
- Add a mature content warning to first-time visitors
- Show Featured Image in else statement
- Any adverse effects of adding apply_filters to a function?
- How can I remove page titles without removing the link in the navigation bar in twentyeleven?
- Simplest Way to Build Custom Archives Page?
- Filter for replacing the WP_query object for a given category
- Custom user role still showing up after deletion, ideas?
- wordpress built-in Jalali date convertor
- WordPress Function Assistance with Loop
- Populate acf-field, depending on block name
- Add Change role button for list of user in an event
- I am trying to set post terms to a custom taxonomy
- how to increase connection time
- Shortcode to insert default text and change one word throughout it?
- Classic TinyMCE messing up only Contributor’s HTML
- Reference multiple style sheets, clearing styles for permalink page, custom fields for css
- Add schema to Search result page’s body. Tried using is_search
- Hide disclaimer from summary excerpts
- Disable links to images only if link is an image
- WordPress Javascript Widget jQuery Dependency Issue
- Open image size links in a page instead of direct image link
- Allow tags and attributes in post and pages content
- Function to get thumbnail img source
- Syntax for a function in order to get post’s title in JSON encoded response [closed]
- Comment Function
- Do something when user creates post (that’s pending)
- Add product to cart from functions.php
- comment_post function with js not running
- Problem with removing characters “<” – WpAllImport