WordPress.org

Ready to get started?Download WordPress

Forums

Adding HTML to Page Title Field (3 posts)

  1. jesseslam
    Member
    Posted 1 year ago #

    Hi,

    My client has a property website we set up http://www.domansresidential.co.uk/property-to-rent/hutton-rd-shenfieldtwo-bed-flat-to-rent-770pcm and would like the wording 'Now Let' in the title to be a different colour both on the property detail and category view pages in order to stand out. The simplest thing to do is add <span> tags around these words and add some CSS to change the colour. This does work on the property detail view but breaks on the category page. Does anyone know of a way to do this?

    I have searched Google and various forums for plugins or hacks to allow HTML code in the page title field but can't find anything.

    Thanks,

    Jim Isles

  2. ianhaycox
    Member
    Posted 1 year ago #

    I just tried creating a couple of posts using the TwentyTwelve theme it displays the title correctly with HTML in both the single and category view.

    I suspect your category template in your theme is eating the HTML. In the TwentyTwelve theme it just uses the_title()

    Have a look at your theme to see the differences between the theme templates to see what is different in the category template.

    See http://codex.wordpress.org/Function_Reference/the_title - you may be able to use the $before or $after parameters to help format your title consistently between theme templates.

  3. jesseslam
    Member
    Posted 1 year ago #

    Hi Ianhaycox,

    OK great thanks I'll have a look at that, it makes sense.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.