Will the format always be as you described? I.e. can we use ‘x’ as a delimiter to split your title? If so something like this would work:
add_filter( 'the_title', 'wp123_custom_title_format', 10, 2 );
function wp123_custom_title_format( $title ) {
// if you only want to modify certain posts you can do a check here
// use 'x' as your delimiter
$pieces = explode( "x", $title, 2 );
if ( 2 == count( $pieces ) {
$title="<span class="boldtext">" . $pieces[0] . ' x </span>';
$title .= '<span class="normaltext">' . $pieces[1] . '</span>';
}
return $title;
}
Related Posts:
- Displaying Page Title on index.php
- Search query – exact post title match
- How to add first 3-4 post tags on WordPress Post Title
- Post title not displaying as recorded in the wp_posts table
- long-title posts do not want published
- Please I want to prefix my WP posts title according to each category
- Hiding title of selected post without plugins
- Title displaying multiple times
- How do I check if I linked to a post before I delete it?
- Accessing the post content with WP_Query
- disable password protected page for logged users
- How do I use inline SVG in WordPress
- Get the object ID by URL
- Add a special filter link to All Posts in admin
- “Uncaught SyntaxError: Unexpected token
- Use Cron to modify posts via sql
- Pull posts from another wordpress install on same server
- How can I get all posts data from within a paginated search result?
- Create pretty permalink for a post knowing the permalink structure
- Syndicated Posts when Updated Lose HTML tags
- How to insert current date/time in the content of a post?
- I want to query posts in monthly basis
- jQuery inluclude still seems ncessary for script to work within post
- White Blank Page when Updating and Publishing Page/Post
- Full Width Main Post
- Posts vs. Pages
- Limiting the number of posts in WP_Query leads to unexpected result
- Plain permalinks not working!
- Guest Author – How to display posts on /author/ archive page
- How to get rid of shortcodes in post content once and for all
- Why is querying posts messing up my pages?
- How can I find out what items a user has purchased? [closed]
- Nothing Found error when creating new posts – how to correct this?
- Redirection not working in this front end post submission form?
- Print all the tags from a custom post type Please
- WordPress Loop – Next 3 Posts
- Display multiple custom taxonomy values on single custom post types page?
- Underscores Theme Unit Testing – Catching Untitled Posts
- How to do set post permalinks using 6 digit random unique function?
- Encountering “Wrong nonce. Action prohibitied.” when trying to alter User Role and unable to Post via WP Admin
- Is Hfeed class for all pages needed
- Issue where WP Featured Image will not display
- Custom order for Mysql array
- Display post category in foreach loop
- Single.php – Get Current Parent Category
- insert a warning message into post-new.php
- WP text editor change html markup
- how can i allow users to view their own pending posts in a front-end page
- How to make different custom post layouts?
- Is it possible to give the user the chance to select between two single template files to use in a post?
- Modifying the following code to displaying the title and the content of static page Posts page?
- Saving Post Data in Another Database
- How can I tell if a post has been published at least once?
- How to split authors?
- Display Related Posts by Category in Random
- Showing posts for today and future
- Display 3 posts with different HTML markup using a loop
- Jumbled writing under a post
- Moved to a new server, backup was a day old and missing 3 posts, anyway to recover them from old host?
- How do I keep raw HTML in my RSS feed and not lose my paragraph breaks?
- Hook save_post_cpt not triggered when custom fields are modified
- Set Default Post as Parent Child (Nested) Relation
- Featured Images most often doesnt appear
- Why is WordPress showing a blank excerpt for just one of my posts?
- Is there a way to know when a page has been updated and do some action only once?
- Get category slug of the Parent category of a Product
- How to automate creating pages on a hosted wordpress from a local set of folders?
- How to limit wordpress the_excerpt() dynamically
- Reuse old post ID for new post after deleting post
- Contact Form 7 Shortcode not recognized inside another shortcode
- WordPress Pods Custom Post Type – separate Media Upload folder for each custom Post Types
- WP posts using index.php instead of single.php
- Display simple html code in post
- How to display particular set of wordpress post on a webpage?
- Excluding tag Link from html tags in Post content
- Allow users to post their videos to my wordpress website?
- Display new posts categories in separated divs
- Add in the url attachment loop the wp_link_pages of the post
- Couldn’t view individual post that were in my website
- Add Categories To Custom Post
- Point to a page when there is no results
- Get the category of post
- Display Posts by Categories
- update post category in a new table on frequent change of category
- Edit Posts Page but not category specific pages?
- Show posts between two Custom Fields date
- How to display an icon when a new post is published and then remove it when a specific time past?
- How can add metabox for post of specific category before save post and after save post [duplicate]
- Problem with jQuery in post body?
- Posts page template: How can I edit the markup for this?
- Pagination working locally but not on live site
- Should new posts already have tags?
- Get image paths from RSS feeds
- How can to use the players from the Media Widgets in the body of a post to play audio and video files
- How can I display these posts in ascending order?
- WordPress limit post that subscriber can create
- Is there any point to using wp_unique_post_slug?
- Do I need to create a multisite for querying posts from multiple WordPress sites?
- Filters do not work when there are multiple (one works)
- WordPress Ajax load doesn’t work