Feature A Page Widget
[resolved] Modify HTML output for Page Title (4 posts)

  1. katart17
    Posted 3 years ago #

    I've been trying to use a Filter to add a 'span' tag within the Page Title 'h1' tag. I figured out how to modify $page_title but I can't figure out how to modify the $page_title_html output.

    Please help. Thanks


  2. Mark Root-Wiley
    Plugin Author

    Posted 3 years ago #

    Hi Katart17,

    What exactly are you hoping to do with the <span>? Frequently <span>s are for styles that can be achieved other ways with just CSS.

    There's no easy way to modify the $page_title HTML, so if you really have to do that, you'll need to follow the instructions on the FAQ page for using the fpw_default.php file to override the output and then just customizing the title output on lines 51 and 65, using the $page_title value.

  3. katart17
    Posted 3 years ago #

    I am working with Font Awesome to add an Icon Font to the H1 tag. I need to add an "i" tag within the H1 to get this to work. I ended up using the fpw_default.php override to get this to work, but I would've rather used a hook within the functions.php file.

    Thanks for the great plugin.

  4. Mark Root-Wiley
    Plugin Author

    Posted 3 years ago #

    Glad you were able to make it work! If you have a moment to review the plugin or vote on future features, I always appreciate the extra feedback.

    I'm not that familiar with Font Awesome, but you might consider a pseudo-element solution next time that uses pure CSS:

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Feature A Page Widget
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.