Wordpress site title, add html just after it?

by thedog
1 replies
Does anyone know how to add some html code just after the post title in wordpress?

I'd like to add a star rating after it, but don't want it to be part of the title... for rss reasons.

I located single.php which I think is the file I need to tinker with, correct?

I added some code after the <h1> site-title code, worked for a short while... then stopped working :confused:


Cheers.
#add #html #site #title #wordpress
  • Profile picture of the author kjhosein
    The single.php template file affects only the WordPress pages that display a single post, so if that's the only place you want to modify the title, then yup to that question.

    So templates vary a lot, but if you see a line that looks something like this:
    Code:
    <h1 class="entry-title"><?php the_title(); ?></h1>
    (the <?php the_title(); ?> part being the important code), then you can just add your HTML and/or PHP code in after that.

    PS> My rule of thumb when something stops working is that something else changed to cause that!

    HTH!
    Signature
    <!--PM me for a quicker reply. Thx!-->
    {{ DiscussionBoard.errors[3639419].message }}

Trending Topics