Taffy1957 Posted September 5, 2011 Share Posted September 5, 2011 Hi Guys (& Ladies of course) I'm having a problem trying to add post category to the H1 title, I have managed to butcher my theme so that the single post now removes the H1 from the title in the header & instead adds it to the post title. But what I'd like to do now is keep the H1 blog title on all pages including home page, but I'd like to ammend the title with the addition of the post category, as follows; currently shows "Top Rated Gadgets" on all pages. would like it to show "Top Rated (category name)" when viewing a single post. So if the category of the post was Asus Laptops it would show "Top Rated Asus Laptops" instead of the usual "Top Rated Gadgets" The closest I have got to it so far is with <?php the_category(', '); ?> but this returns a hyperlink ! Is there any method I can use that will simply return the category name as plain text..? Any help would be much appreciated Thanks Quote Link to comment https://forums.phpfreaks.com/topic/246456-how-to-add-category-name-to-h1-blog-title/ Share on other sites More sharing options...
the182guy Posted September 5, 2011 Share Posted September 5, 2011 Which blog/CMS software are you using? Quote Link to comment https://forums.phpfreaks.com/topic/246456-how-to-add-category-name-to-h1-blog-title/#findComment-1265567 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.