• Resolved yeasin33

    (@yeasin33)


    <html>
    <head>
    
    <title>This is the title to be uppercase</title>
    
    </head>
    <body>
    </body>
    </html>

    I want the title to be uppercase.

    [Please post code snippets between backticks or use the code button.]

Viewing 5 replies - 1 through 5 (of 5 total)
  • The following should do the trick.

    <html>
    <head>
    
    <title><?php echo strtoupper('This is the title to be uppercase'); ?></title>
    
    </head>
    <body>
    </body>
    </html>
    Thread Starter yeasin33

    (@yeasin33)

    What if when i want every wordpress post title uppercase.

    <html>
    <head>
    <title><?php the_title(); ?></title>
    </head>
    <body>
    </body>
    </html>

    [Please post code snippets between backticks or use the code button.]

    You need to use wp_title() at that point in the code. You can only use the_title() within the loop.

    <html>
    <head>
    <title><?php echo strtoupper(wp_title('', false, '')); ?></title>
    </head>
    <body>
    </body>
    </html>

    For more about the wp_title() function, see: https://codex.www.ads-software.com/Function_Reference/wp_title

    Thread Starter yeasin33

    (@yeasin33)

    You are just fabulous. Thanks ??

    Thread Starter yeasin33

    (@yeasin33)

    Hello, I am facing a problem. The signs like hyphen displaying in html entities form. –
    And also i see few space after <title>
    Please Help

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Titlte Uppercase’ is closed to new replies.