• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Add custom HTML to page heading

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › General Discussion › Add custom HTML to page heading

This topic is: resolved

Tagged: html post title

  • This topic has 7 replies, 3 voices, and was last updated 7 years, 10 months ago by RobCubbon.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • April 9, 2015 at 2:04 am #147183
    RobCubbon
    Member

    I want to change the color of one word in the title of the homepage (h1 heading)

    So the h1 should be:

    <h1>Your work should <style="color:red;">standout</style> from the crowd</h1>

    You can't add the HTML in the WordPress heading area.

    So is the solution to create a page template which doesn't have the page title and add the HTML to the WordPress text area? Or just adding it via functions.php – but I can't find code for that 🙁

    Any help would be greatly appreciated.


    Rob Cubbon

    April 9, 2015 at 5:41 am #147192
    DTHkelly
    Member

    Some reference:
    http://digwp.com/2009/10/custom-fields-for-html-post-titles/

    April 9, 2015 at 10:07 pm #147274
    RobCubbon
    Member

    Hello Kelly, thank you for that but I don't understand. That's a solution if you're able to edit the single.php or another theme file but I have to work out how to employ that edit in functions.php


    Rob Cubbon

    April 10, 2015 at 5:38 am #147297
    Brad Dalton
    Participant

    Hi Rob

    Here's a post i wrote for members which gives you one solution using PHP code.

    You could try using pure CSS as well which may work.


    Get Help – Book Consultation.

    April 10, 2015 at 6:06 am #147305
    DTHkelly
    Member

    Not page title (as you asked), but here's a tutorial re: custom class for site title
    http://www.carriedils.com/custom-site-title-genesis/

    April 10, 2015 at 6:32 am #147311
    RobCubbon
    Member

    It can all be done with HTML and CSS.

    You can put <span> tags in the title area of the WordPress edit Page page. (I didn't know you could do this).

    Your work should <span>standout</span> from the crowd

    Then the CSS will be :

    .page-id-123 h1 span{color:hotpink;}

    Case closed. Thank you.


    Rob Cubbon

    April 10, 2015 at 6:46 am #147314
    DTHkelly
    Member

    Great!

    Because this is your thread, you can mark it resolved at the upper left (dropdown menu).

    April 10, 2015 at 6:50 am #147315
    RobCubbon
    Member

    Thanks Brad, I didn't see that (more elegant) solution but I'll stick with the HTML and CSS solution – easier for me.


    Rob Cubbon

  • Author
    Posts
Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Add custom HTML to page heading’ is closed to new replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble