its best if you just use custom field type to create a sub title…
That way you leave the title un-touched and just add a field where
you can insert a value like so (calling field sub title):
Then you can fetch your subtitle easily:
<?php
$sub_title=get_post_meta($post->ID,'subtitle',true);
if($sub_title != '') {
echo '<h1>'. the_title() .'<span>'. $sub_title .'</span></h1>';
} else {
echo '<h1>'. the_title() .'</h1>';
}
?>
.
i hope this a suitable solution for you… i use it on occasions
Cheers, Sagive
HOW TO:
Replace (i hope it looks the same in your theme) with the code above..:
<h1><?php the_title(); ?></h1>
Related Posts:
- Get post/page title from ID
- How can i make wordpress blog title clickable and direct to the post itself
- Multilanguage website get the title, on different languages
- Safe way to get the post ID in the_title()
- Replace post title based on conditions
- How to show users search phrase in SEO Title
- Problem with get_the_title in not rendering the way I want
- Replace get_the_title and the_exerpt with custom arrays
- Replacing the title in admin list table
- Is there any difference between the_title() and echo get_the_title()?
- Changing title of a page dynamically from within a plugin
- the_title() and the_permalink() won’t work on AJAX calls
- Remove “Private” + “:” in title does not work
- How to get page’s ID if I know the title only?
- the_title(); works in a page template, outside the loop. Why?
- Modifying recent post widget to include icons for post titles
- How to add hook to the_title() and get_the_title()
- posts order by title second word
- get the_title_attribute by id
- custom field to always to .get_the_title()?
- How to display thumbnail + tags + title of a child page?
- Multiple Conditions for Child Page Title
- How to intercept Post Title on Post-Save
- Filter get_the_title to remove certain characters?
- get_title without filter(the_title)
- Is there any difference between get_the_title() and single_post_title()?
- How to change the page title from functions.php
- Long Post Title Misaligning Grid with Featured Image
- Can’t get title of latest post
- Including a post title in a twitter link
- the_title gives me the page’s title not the post title in the following code
- How to sanitize post title with commas
- the_title filter returning wrong post type
- How do I hide the current page’s title?
- Custom post type title is set by other custom post type
- WP action/filter to modify title before header output and article output?
- Enter a variable in the ‘category_name’ parameter
- wordpress get gallery images title
- Get url-friendly version of the_title?
- Don’t see add_filter result in the site front page
- change title separator
- how i can add title to my featured image?
- Access get_the_title() from ‘excerpt_length’ filter
- Display post content with respect to its title?
- Blog Title not showing up on main Blog page
- How to output the title of the blogs home page
- Replace text in the Title
- Limit the Title Length on Custom Post Type Archive Page to a Set Number of Characters
- get_the_title outputs title until spacing; it does not get full length of title
- post_exists returning 0 if title contain special characters
- How to use get_the_title with text on the ‘alt’ of the_thumbnail array?
- WordPress Image Slider Looping Title Not Working
- Can’t properly set the_title add_filter to show short_URL
- single_term_title() running before get_the_title() [closed]
- Get title of post image is attached to
- Can’t get full post title if there a spaces in title
- Title on hovering on the featured image
- How can I remove the first two words and shorten get_the_title()
- get_the_title and get_permalink outside of the Loop
- How come I get internal server error even with try catch for get_the_title in functions.php?
- How to place POST TITLE any location inside the posts page
- Print title page in header of a specific page
- Use title of post as argument for query
- WordPress title as keywords (tags) with excluded stop words
- Shorten the title length
- Show post title words one by one [closed]
- Strip $before & $after strings from a page title
- how do I get the title in the post [closed]
- How to get changed post title in my custom plug-in which fires when ‘save_post’ is called?
- Random Custom Post Type Titles
- Can’t Get Parent and Child Categories of Custom Taxonomy to Display
- How to ignore WP_ERROR caused by “get_the_excerpt” method in an AJAX call?
- Filter the title to only affect the_title() template function
- Display Most Recent Post Widget Title On Page
- Trim Titles Only On Some Pages
- Changing Title Tag on Shop Archive Page (current solution reverting to Title of First Product in Loop)
- Modify WordPress Page Title ()
- Display text if title in archive has specific word
- Post title not displaying as recorded in the wp_posts table
- Is it possible to create 2 unique titles for an Events custom post type: Upcoming Events and Past Events?
- Add HTML code before the title of the Tag page
- How to search posts by title with special characters in WP_Query?
- Display title of custom post type dynamically
- Adding Filter | Page Title | Template | Why the_title affecting on menu?
- Customise the_title in admin area
- How to add dynamic content in title and meta description in wordpress theme for homepage, post page, category, tag and pages
- Get title from IDs in a string
- Hide H1 Title using the_title filter
- Custom Post Type title not populating
- Remove space when post title is blank
- Get post title of faulty link on 404 error page
- How to get all post titles starting with numbers and symbols?
- Generate page title tag from the content of H1
- Why this Read More Not working in Php?
- Bug with post titles [closed]
- Rename file after title , one small problem
- Show page name in browser
- Title displaying multiple times
- How to store wordpress title in a variable
- echo spesific title get_the_title