You need to use get_the_title()
(codex). the_title()
(codex) doesn’t actually return anything but prints the title.
Related Posts:
- Replacing the title in admin list table
- Replacing the title in admin list table
- the_title filter returning wrong post type
- Custom post type title is set by other custom post type
- Display post content with respect to its title?
- Limit the Title Length on Custom Post Type Archive Page to a Set Number of Characters
- the_title not working
- Random Custom Post Type Titles
- Can’t Get Parent and Child Categories of Custom Taxonomy to Display
- Is it possible to create 2 unique titles for an Events custom post type: Upcoming Events and Past Events?
- Display title of custom post type dynamically
- Custom Post Type title not populating
- Query by post title
- Marking future dated post as published
- next_post_link() not working for single custom post type post
- How to set a default format for a custom post type?
- WP insert post and custom taxonomy
- Assign a Custom Role to a Custom Post?
- Implementing “Video of the Day” Feature?
- echo value from ‘select’ field type into page template using cmb2?
- Exclude add_filter from the admin
- Undefined property: stdClass::$labels in general-template.php post_type_archive_title()
- Is it proper to create a page just to generate a listing page (eg. for a custom post type)
- How to quickly switch custom post type singular template?
- Post metadata deletes itself
- Sanitizing post content for use in an email
- Genesis Child and Custom Post Type
- Best way to arrange custom post types by Attributes -> Order metabox value?
- Separate Custom Post Type Taxonomy by Comma
- CSS for Custom Post Types
- How can you use custom types/taxonomies? [closed]
- Display “Post 2 of 4” on single post page?
- Query post types with multiple keys
- WordPress import not importing custom taxonomy
- How to generate a sitemap with custom posts (not Google XML)
- Turn query string to sub page
- How to make post sticky in the admin page?
- Remove base slug in permalinks of hierarchical custom post type
- Custom post type custom taxonomy archive page name
- How can I move a custom taxonomy and its data from one post type to another?
- rewrite custom post type slug in wp admin
- Displaying the type of post (Custom) in a single.php
- If Statement – if current post is a child of a post with a taxonomy
- Unable to retrieve any posts of CPT in wp-admin
- Custom Page that comes with preloaded content for the user
- Rewrite slug for CPT
- Custom post type templating problem
- How to set up a post word limit for a custom post type
- Register widget only page is a singular of custom post type
- Which post does a taxonomy term belongs to?
- Remove the parent slug in a CPT URL
- Custom Post Type – No Results Found
- Including metaboxes from custom post types in global search — continued
- CPT’s with landing page instead of archive – Url Rewrite?
- Fixed values for same post translations
- How to produce a sub-page-system in WordPress
- Custom posts type for individual pages?
- help
- Custom Taxonomy not displaying all post
- How to Display Posts From Category Within a Custom Taxonomy?
- post-per-page and offset not working
- When updating non-public custom post type it says “Post updated. View Post”
- Published post auto change status to pending after 90 days
- How to retrieve all wordpress posts (specific type) inside a function in php?
- ACF for custom post type archive pages: which hook to use?
- How to migrate Custom Field Template to a WordPress Multisite
- Automatically update slug with latest title within custom post type [duplicate]
- Post Type Support Array Not Working
- Custom Post Type or Shortcode, What to choose? [closed]
- Custom post type, taxonomy and admin bar
- Select Venue from dropdown list and reuse stored address information in meta_box
- Custom post type set default template using block editor
- build Custom post type and make it child for Posts and put it as comment
- Creating archive like functionality through birectional relationships
- Create API’s for custom-post types & custom queries using REST or Graphql
- Action on Custom Post publish
- Disable button after one click per user per post
- How to return/export only data showing on screen in custom post type view all screen
- Show Custom Post Type based on Category on Archive Page
- How can I add image sizes for a specific custom post type?
- Get all posts for custom taxonomy term
- $_POST from a Meta Box
- Permalinks: custom post type -> custom taxonomy -> custom sub taxonomy -> post
- Author page not loading the authored post archives
- How to store additional data that is related to core data
- How to get a custom post type archive paged when using a custom field for post sorting?
- Group based routing and administration
- Why does my plugin require a permalink reset after a new installation?
- WordPress query posts by custom post type not workng
- Query events post type after current date and timezone
- This wp_query will not return any posts and only seems to work with post_status inherit?
- Using piklist meta box, strange behavior
- Multiple post types or single post type with category taxonomy?
- How to display the FAQ Archive page in my menu
- custom post type and taxonomy URL
- Custom Post Type Loop breaking php
- Styling first post using Advanced Custom Fields
- Pagination not working on homepage
- What Is My Fault With This WP_QUERY ? [ Pagination Problem ]
- Remote database access on another wordpress site’s custom post type