Ok, I’m stupid. I figured it was something simple.
In my function, I should have used return
instead of echo
. I was under the impression that echo
was what’s normally used since every example or tutorial I found on the internet for writing php functions used echo
. At least now it makes more sense.
Related Posts:
- How to render a custom post type template with custom fields using shortcode
- Custom post type not pulling CSS
- Custom post type option page template
- using a template for more then 1 page
- Why is my WP Query not returning first result’s post meta?
- Custom post type pages return 404 page?
- Multiple single templates?
- How to add/edit advanced custom fields on custom post type’s WordPress REST API?
- Recoverable Fatal Error – Object of class WP_Post could not be converted to string
- Querying & displaying custom post type into an existent page [closed]
- Custom URL redirect in WP
- How to get a custom type post data when it has a connection with another custom type post?
- WordPress Picks Up Wrong Template for Custom Post Type Archive Page
- Custom post type showing same Post on all Pages
- Associate page w/ specific single post template?
- Why would social icon badges disappear after adding a custom post type?
- Sort a custom post with ACF: Date Picker & Display Featured!
- ACF repeater field usage
- List of users that clicked a ‘Join’ button at single post
- Include php on a specific page template
- get comments by current user inside page template
- page template for custom post type
- Page Template Dropdown For Custom Post Types
- Post loop count is not in order
- How to inherit field value from parent post into in child / sub post
- How can I add a shortcode to query Custom Post Type with ACF in WordPress?
- Custom Post Type page sorts differently on different environments
- Postname on unique permalink structure appends “-2” for a custom post type. How can I get this to stop happening?
- How to integrate single and archive templates for custom post type in any WordPress theme
- set_query_params using custom params defined in functions file?
- Custome fields not displayed
- Create short URL with auto 301 redirect
- ACF for custom post type archive pages: which hook to use?
- How to define the template for custom posts?
- providing access to post_id or post inside functions.php
- Batch Extract Date from post title and put into ACF custom field
- wp_get_canonical_url showing first url of the post for custom page
- Custom page for editing custom post type on frontend based on url
- Query entries from custom post type in an ACF flexible content field
- Why is wp api returning old acf values?
- How to use single.php for creating, reading and editing Custom Posts with ACF
- Distribute Custom Post in different pages
- get custom post type value in header.php [closed]
- Dynamic assign a custom template to custom post type posts
- posttype and custom fields on multisite
- How do I get_the_postID() for a custom post that uses ACF repeater field?
- How do I replace the post title with a custom field?
- Advanced custom fields Post Object image field not displaying in custom post type single.php
- How to get the current category with custom posts
- Sum and count of custom field values
- How do I show a link or ‘Read More’ button on a custom field excerpt when it is less than the word limit
- How to export custom post type with ACF to individual file with automation?
- Custom fields not showing in custom post type
- How do I display child post types in the parent post type template
- Group by custom field value (start and end times)
- Custom post types, disable fields
- meta query not retrieving posts
- Custom Post Type with Configurable Sidebar via ACF
- How can I modify a custom post type and custom page template for a child theme if all content seams to be handled by theme’s ‘native’ plugin?
- How to add page under a custom post type?
- Get A Custom Field From A Custom Taxonomy Of A Custom Post Type [closed]
- Custom permalink structure for remote content pages
- Enabling permalinks disables custom page template
- Custom Sidebar in Editor (not Widget) for Custom Post Type in Genesis
- ACF Relationship Posts how to show additional content
- wp-includes does not contain a feed template
- Using WP meta query to show custom post types by a start and finish date
- Custom Post Type Specific Post Template
- Limit search field to just search a custom post type with custom fields
- Mixing Custom Post Types and Page Templates in WordPress 3.7.1
- Advanced custom field – posted fields from custom post type
- Custom Post Type Template Insert not working properply
- Excerpt length: get first paragraph
- Loop and add Specific Categories and Products Images
- SQL query – get ids – Advanced Custom Fields / WPeC
- custom post template ignored after altering permalinks
- Custom field with Types: get custom field’s value label (of type select)
- Custom Post Type page template doesn’t show up
- How can I allow users to edit text that will be displayed on a custom post type archive page?
- Using get_terms() to list terms from one custom taxonomy AND from one specific built-in category
- Display ONE taxonomy and its assigned pages
- Display custom post type from template
- How to display author details in a custom post type in the wordpress backend?
- Show posts associated with ACF post object and custom post type
- Problem with custom loop navigation inside the blog page
- WordPress giving me the index
- Show/hide posts and categories based on user meta
- Fetch data from two custom post types and create multidimensional array for output to html table
- Having a repeating custom field in admin custom post type, what I’d go better with, for DB’s sake? ACF repeater or query a different post type?
- How can i show ACF in post excerpts
- ACF – Retrieve custom taxonomy from a relationship field
- How to set a ‘page’ as parent of a custom post type?
- How to use pre_get_posts on archive page custom post type
- Can I automatically assign a page template to a custom post type (i.e page-slug.php file)
- Custom front-end form for adding post – Category problem
- How To Display Posts Of Custom Post Type At Page Template
- Set up a WP Cron scheduled event to update calculated ACF field
- Query filter by value in meta_value array
- Virtual page and loading template
- Show Post Revisions on front-end