• Resolved SimonGiddings

    (@simongiddings)


    I am needing to alter the output of post and page titles.
    In certain circumstances, the title will be an image, in other cases it will be text.

    I plan on using a custom field to indicate weather or not to use an image as the title.

    I have seen that titles are rendered within tc_content_headings.
    Is is “safe” for me to duplicate this function in my custom theme and adjust the necessary parts ?
    Is there a better way to do this ?

Viewing 11 replies - 1 through 11 (of 11 total)
  • It’s generally better to use filters, as they tend not to change, whereas the code does change (so substituting it like this could break the theme).

    You could, for example, use the tc_show_page_title filter to decide whether to show the heading or not and then use the __before_content_title or __after_content_title hooks to add the images, based on your criteria.

    Thread Starter SimonGiddings

    (@simongiddings)

    Thanks, I’ll look into that …

    Thread Starter SimonGiddings

    (@simongiddings)

    This worked great and I have the assurance that my changes are a bit more future proof.
    Thanks again.

    You’re welcome!

    hi, is there a noob way to make me do the same?

    @alex518, start a new thread unless your requirement is exactly the same as @simongiddings

    yes basically it is the same requirement, even tho i don’t plan to add any image yet, i did not build any child them,so i’d like if possible to be able to change the page’s titles style(font,size, color) by just adding a few lines in the custom css field, wich i bet is possible and easy, and wich i don’t have any idea how to write T_T

    You could, for example, use the tc_show_page_title filter to decide whether to show the heading or not and then use the __before_content_title or __after_content_title hooks to add the images, based on your criteria.

    i have no idea what this means ://

    OK, you need to start some research to build up your knowledge of 1)CSS and the 2)php.

    Start with this Guide, and you’ll find other Guides to help too.

    It all seems a mystery when new, but just be determined and it’s mostly straightforward and logical.

    Then this Snippet gives you CSS code that you can cut&paste into your CustomCSS panel.

    thx a lot i will study.
    btw i sort of made what i wanted by writing in the custom css field the following:

    h1{font-family: “w/e i want”;
    font-size: w/e i wantPX;
    color: #w/e code;}

    basically this is what i wanted to do, hope i didn’t mess up the theme :/

    I think I see what you’ve done, which will be OK

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Customisation of post and page title output’ is closed to new replies.