• Resolved gpzblog

    (@gpzblog)


    I have a blog, where I have sponsored blog posts. I would like these posts to stand out, so I would like to change the font color of the title, and add a small image next to it saying “sponsored”.

    How can I make make these changes to the posts tagged with “sponsored”? Thanks in advance!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Take a peek at the Conditional Tags page, here is a simplistic example:

    `
    <?php if (has_tag(‘sponsored’)) { ?>
    <div class=”sponsored-style”><?php the_title(); ?></div>
    <?php } else { ?>
    <div class=”regular-style”><?php the_title(); ?></div>
    <?php } ?>
    `

    Of course you would need to add the sponsored-style (whatever you name it) to your theme’s CSS file.

    Thread Starter gpzblog

    (@gpzblog)

    Thanks a lot! Worked like a charm:)

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Change title color of a specific tagged post’ is closed to new replies.