Either add a die
after that print_r()
or (better) use error_log()
instead of print_r()
and look at your php error logs for the output.
What’s happening is WordPress is reloading content before you get a chance to see the output (in most cases).
Related Posts:
- WordPress REST Create Post of Custom Type
- How to hook into the CPT’s title placeholder?
- How to set a fall back template for a custom post type in a plugin?
- Post formats “audio” and “video” only showing in index.php
- Merging two Custom Post Types into one
- Permalink rewrite with custom post type and custom taxonomy
- how do I group content in magazine-style ‘issues’?
- Use standard WordPress categories with a CPT
- Semantic URL Custom Post Type and Taxonomies permalinks
- Set post to draft after set period based on post_modified date
- WordPress custom post action hook
- Display metabox conditionally
- Custom post metadata not appearing in public API
- How to remove thumbnail sizes for specific post type on a child theme?
- Do attachments added to custom post types have a post parent?
- How to make an archive page displaying posts in a date range
- Categories and Tags not working!
- Using pre_get_posts to Filter Posts
- get_categories() for only CPT
- category.php displays ALL posts instead of just those with the current category
- Custom Post Custom Taxonomy Data Not Saving in Edit Screen
- Display Next/Prev when looping Custom post-types archive?
- List custom posts by custom taxonomy
- How to Set Post Status to Draft if older than today
- How can I get_post_meta() in the most efficient way?
- How much control do we have over CPT rewrite slugs? Can I create a “root” page for my CPT with out the page path, and then have paths for other pages?
- Create a post in custom post type using field in registration form after users submit form
- right_now_content_table_end function not working?
- Display CPT posts based on specific taxonomy
- Wrong generated page_name/slug on first publish of custom post type
- Can’t change first part of URL rewrite for custom post type
- Get all properties of custom post type
- Add predefined/default values to custom post plugin
- Why get_posts() not returning only selected category posts from Custom Post Type?
- Hide editor while keeping add media button in custom post type
- dynamically add a custom field or metabox to custom post type [duplicate]
- How to use custom taxonomies to reference complex relationships?
- How to implement a Google map store locator
- CPT EVENT – listing by month and filtering by category and month – form select option
- custom post type WYSIWG removes paragraphs when displayed
- ACF field key/value to show on taxonomy list
- Re-registering a custom post type not working (not showing up)
- WP Rewrite Rule Issue while using Custom post type & taxonomy
- Prioritize posts in query by meta keys?
- Homepage’s content is dependent on the custom field values (set automatically), how do I get homepage to update without manually updating page?
- Lists custom taxonomy terms that has specific custom field value assigned to the term (not post)
- How can the recipients and content for comment email notifications on a custom post type be changed?
- Meta Query posts not showing on ending date of custom field
- What is best way to prevent access to Custom Post Types unless authenticated when the post type has an archive and is publicly queryable?
- Get url.com/post_type/taxonomy/term work!
- How does the filter post_updated_messages work?
- How to get WordPress term attached to the Post?
- How to show only the most recent post on my custom post type archive?
- WordPress search and date filter not working with custom post type
- Adding something to the_content
- I’m having trouble getting the permalink sample on my custom post type edit page to work
- SEO Concerns With Rewrite Rules
- Empty taxonomy items for CPT in admin grid
- How to fetch custom post types with its full data on wordpress?
- What is the correct term for a tool that filters content based on metadata?
- CPT, meta-data, url parameter
- Take stored email addresses from custom post type & turn into one string
- WP_Query order custom post type with certain meta key value by post modified date
- How to show multiple images in a slideshow for a portfolio page
- Custom Post Type ‘Event’: Chronological list of recurring events from meta_values in array
- restricting custom rewrite to just one custom post type
- How to show custom posts
- Pagination in custom post type archive.php not working
- Shortcode with loop stacks output
- How to filter a matched value with custom key using WP REST API?
- how to display author name in custom post type
- create a “add icon” field in taxonomies page
- Custom Post Type Pagination getting 404 error
- How to search through all child taxonomies using WP_Query?
- Custom Post Taxonomy Template Not Loading Properly
- WordPress retrieving $post based on random key in $_POST
- How can I use one instance of page.php to display different custom post types?
- Show ajax form resuslts in page
- PHP Notice: Unidentified index
- Exclude Posts in a Given Category
- Unwanted URL with Custom Post Type
- Front page url permalink
- Custom meta box in editor of custom post type not working
- How to retrieve json data from custom json enpoint created from a custom post type
- Multiple custom post type and permalink issue
- Using mediaelement to display gallery of audio
- Help ordering custom query by Title, Ascending
- group posts by month/date ignore years
- change precedence of permalink for post_types?
- Toggle a metabox based on a selection
- Image paths on custom post types getting /post_type/ added to path
- Problems with custom post type and hierarchical permalinks
- Issue on Adding Taxonomy to Custom Post Type Using Function
- Trying to display next and previous set of posts on separate page (not parent page)
- Posts 2 Posts: query connected — orderby problem
- How is it possible to list custom post types by “category” like with simple posts?
- Url rewrite with custom post type and taxonomy
- wordpress category form fields in popup
- How can I show posts with the same tag?
- Custom Post Types Permalink