The simplest answer is as follows:
add_filter( 'private_title_format', function ( $format ) {
return '%s';
} );
It uses the private_title_format
to change the format of the title to just the post title, without any unnecessary classes or functions.
Related Posts:
- get_title without filter(the_title)
- How do I hide the current page’s title?
- WP action/filter to modify title before header output and article output?
- Don’t see add_filter result in the site front page
- Access get_the_title() from ‘excerpt_length’ filter
- Shorten the title length
- Strip $before & $after strings from a page title
- Filter the title to only affect the_title() template function
- Modify WordPress Page Title ()
- Adding Filter | Page Title | Template | Why the_title affecting on menu?
- Hide H1 Title using the_title filter
- How to filter users on admin users page by custom meta field?
- Modify WordPress Rest Api Request/Response
- How to add some custom HTML into wordpress admin bar?
- Adding a class to the body_class function
- Modify the post/entry wrapper markup in genesis childtheme [closed]
- Allowing non-latin characters in registration
- post_row_actions filter is not working while update post using quick edit
- WordPress Rest filter for custom taxonomy gets applied to the admin area
- add class to internal links in content
- Should I use add_action(‘publish_post or add_filter(‘publish_post?
- get_the_excerpt() with fallback like the_excerpt()
- How to link current user to their author page through shortcodes
- Taxonomy Custom Column – ‘manage_{TAXONOMY}_custom_column’ filter only passing 2 arguments
- How to get list of all hooks of current theme / plugin?
- get_query stops working after post filter
- How to filter into post meta data before saving
- Can you use add_filter() inside other function?
- is there a specific place where add_filter must be placed?
- add_filter() function misunderstanding
- How to make a widget expand wider than the column width when editing its settings in the admin
- Is there a wildcard/catchall filter hook?
- Apply the_content filter, but prevent other hooked actions
- Filter my args by the post 1st letter
- apply_filters/do_action tag characters limit
- Limit RSS feed to previous calendar month
- Adding Filter to Homepage only
- the_excerpt filter with an empty excerpt
- Add Defer Attributes to WordPress Scripts with consistent versioning
- Is this the proper way of switching the “Edit My Profile” link with my BuddyPress “Extended Profile” link?
- Does auto_update_plugin Filter Work When Put In Theme’s functions.php File
- Remove CSS & JS files from WordPress Main Page For Increase Pagespeed?
- String regex match replace for role ‘contributor’ only
- In need of a content replace filter for posts in a specific wordpress category
- Can plugins that filter post contents work on posts from Word 2007?
- How to remove action with slashes and arrows?
- Inline Styles on all native blocks
- How to filter post content and force every link () made in blocks to return urldecode() with readable value?
- Changing WordPress core without hacking core
- Link to Shop-Filter with .current-menu-item
- Remove posts inside pre_get_posts using a custom query
- Remove / Hide Attachment Display Settings in Add Media popup / dialog
- how to customize rss feed tags using hooks?
- Woocommerce “added to cart” message on main(home) page
- Is it possible to apply filter to meta key value when querying posts?
- Add filter for specific post type only
- apply_filters with multiple args and multiple add_filter
- Avoid user registrations with specific email provider
- Should I remove_filter in order to replace a filter?
- How can I specify the post status of an untrashed post?
- filter hook to load a different post/page on current post/page
- Conflict calling an add_filter() twice
- Filter for author list in gutenberg core editor
- Rewrite rule and display of post
- add_filter the_content doesn’t work
- Passing variable from child theme function to parent theme filter
- `authenticate` filter never gets called
- paginate_links() Change the order of links
- Filter / add_action to upgrade.php page
- Add Filter – Pass Variable (PHP < 5.3)
- How to disable a wp filter in a certain admin panel page
- Is there a filter to programmatically change the HTML tab switching output of the page editor?
- Why does admin_body_class not work?
- post_orderby filter breaks function
- Disable Remember Me in Login Form
- Problem width wp_insert_post_data and Gutenberg block editor
- Counting a WP_Post Object value in an arary, using a filter?
- add_filter doesn’t return false?
- How to track a particular page in order to address the loading speed issue
- List all categories that have results in a query
- How to filter page title for certain page?
- how to overwrite next_post_link
- Displaying posts on a page that have been assigned a value in a database
- Replace Text with hyperlinks
- Adding filter to an specific page/site direction
- Print url to default featured image
- How to filter wp_get_recent_posts() to only posts that have thumbnails?
- What action/filter can be used for modifying the page to be rendered?
- Adding user filter – Not updating data in URL
- How to check which submission button was clicked?
- filter wptexturize doesn’t work on old posts titles
- remove_action conditionally for Custom Post Type – not working
- wp_get_attachment_link filter not working
- How would I remove an inline googleAPI font script in the the parent theme header.php?
- Getting entry ID from frm_email_message filter in formidable
- Is there a hook or filter that adds a button to the left of the search box?
- Filter and manipulate the get_current_user() function
- Can you call a filter hook by “add_action”?
- Why isn’t this add_filter function working as expected?
- Adding filter to the Contact Form 7 response