WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] single_cat_title Uppercase (8 posts)

  1. BBilal
    Member
    Posted 3 years ago #

    When I use this code anywhere in my wordpress e.g "MORE STORIES IN <?php echo single_cat_title(); ?>" So everything is uppercase except the title of the post! Anyone can tell me how to make the uppercase aswell while using this code?

  2. BBilal
    Member
    Posted 3 years ago #

    So how do we use that? I'm not good in PHP?

  3. <?php echo strtoupper(single_cat_title()); ?>

    I think that's all you need. It's early and I'm still working on the first coffee ;)

  4. BBilal
    Member
    Posted 3 years ago #

    That doesn't work! :(
    Have a look at the image: http://b.imagehost.org/0311/hii.jpg

  5. BBilal
    Member
    Posted 3 years ago #

    Please I'm in real need! Help me!

  6. Bumping is against the way it goes here. Please don't. And yeah, it sucks that when you're in a bind, the free, volunteers, here sometimes have other things to take care of.

    Be patient, be polite, and feel free to experiment on your own.

    Like reading http://codex.wordpress.org/Function_Reference/single_cat_title tells me you're calling it wrong... <?php single_cat_title('MORE STORIES IN '); ?> would be right.

    That said, I thought it had been deprecated after 2.7 but ... try this.

    <?php
    $current_category = single_cat_title("", false);
    $current_category = strtoupper($current_category);
    
    echo $current_category;
    
    ?>
  7. BBilal
    Member
    Posted 3 years ago #

    It's done from another way! I have edited general-template.php! Thanks for your help though!

Topic Closed

This topic has been closed to new replies.

About this Topic