• Resolved Floyd3

    (@floyd3)


    Hi, is there a way to capitalize the first letter of every word in page/post titles?

    Not in the page itself, but I mean in the <title></title> tag, so it looks good to search engines.

    Something to do with the “text-transform: capitalize" tag maybe? Where would this go?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter Floyd3

    (@floyd3)

    Also, not sure if it matters, but my site is here: https://www.pinkfloydtabs.com and I use the All in One SEO plugin to write the title’s for my pages.

    Anyone know how?

    It’s unlikely that a css text-transform would change how things display in search results. You can take the title and capitalize it in the all in one seo box at the bottom of the post or page. You could hire a developer to modify the plugin if you like.

    Thread Starter Floyd3

    (@floyd3)

    Thanks Matthew, what I’m actually trying to do is make ALL UPPERCASE only part of the title, so it’s something like this PinkFloydTabs.com | NAME OF PAGE | Pink Floyd Tabs

    It seems like this shouldn’t be too hard to do, I’d like to figure it out without hiring a developer if possible.

    Any ideas?

    Thread Starter Floyd3

    (@floyd3)

    I tried putting <?php echo strtoupper(‘This is the title to be uppercase’); ?> but it didn’t work…

    So I’ve tried a PHP way of doing it, and CSS way, but still no luck.

    Am I close?

    Thread Starter Floyd3

    (@floyd3)

    Figured it out if anyone reading this eventually might be trying to do this. Add this code to your header.php file to make the title all UPPERCASE:

    <?php
    function captitle($title) {
         $title = strtoupper($title);
         return $title;
    }
    add_filter('wp_title', 'captitle');
    ?>

    Way to go! I was wondering why the the php approach didn’t give you what you wanted. Just have to get it formatted correctly and in the right place.

    Thread Starter Floyd3

    (@floyd3)

    Thanks ?? and thank you for your help too.

    Cheers.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘How To Capitalize The First Letter Of Every Word In Page Titles For SEO’ is closed to new replies.