Support » Plugin: Genesis Featured Page Advanced » Change entry-title H tag

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Nick Diego

    (@ndiego)

    Hi Quan88,

    Unfortunately you can’t. But you can target the h2 tag via CSS and match the styling to an h3 or p tag. I know this is not optimal, but it is the only alternative currently.

    To target just the h2 tags in this plugin, and not all h2 tags on your site, make sure you add .featuredpage before any CSS designation, i.e.:

    .featuredpage h2.entry-title {
        color: red;
    }

    I hope this helps.

    Nick

    Hey, could you please update this to duplicate the Genesis Featured Page header tag functionality? I want to use your plugin to directly replace Genesis’s default Featured Page widget and I can’t do that if the tags don’t match. Featured Page outputs h4.entry-title and Featured Page Advanced outputs h2.entry-title. I shouldn’t have to add custom CSS to make h2.entry-title match all h4’s on my site.

    This is what I found in genesis / lib / widgets / featured-page-widget.php, in case it helps.

    $heading = genesis_a11y( 'headings' ) ? 'h4' : 'h2';

    Thanks!

    Plugin Author Nick Diego

    (@ndiego)

    Hi Taylor,

    I think this may have come in a recent update to the Genesis Framework that I missed, the switch from h2 to h4 if genesis_a11y( ‘headings’ ) returns true. I will get this updated with similar functionality and will push an update. Thanks for catching this.

    Nick

    Fantastic, thank you!

    Plugin Author Nick Diego

    (@ndiego)

    Hey Taylor, just wanted to give you an update. The new version will probably not be out until later this evening. I am taking the opportunity to clean up the codebase a bit and add a few more features.

    Nick

    Plugin Author Nick Diego

    (@ndiego)

    Taylor, the new version adds the new a11y support which will print h4 tags if you have accessibility enabled on your site, or h2 tags if you don’t. This is the same setup as the default Genesis Featured Page widget.

    Quan88, I added a filter to the plugin so you can now manually change the heading tag if you wish. I will be adding more filters and hooks for various things in the future, but this is the first one. If you are still interested in doing this, you want to add a variation of the following code to your functions.php file. Note that this will change the tags for all Genesis Featured Page Advanced widgets.

    add_filter( 'fpa_page_title_heading ', 'test_change_heading' );
    function test_change_heading() {
        return 'h1';  // could be p, h2, h3, h4, span, div, etc.
    }

    Let me know if you have any additional questions.

    Nick

    That works perfectly, thanks Nick! Super impressed by your turnaround time, what a win for the open source community.

    Thread Starter Quan88

    (@quan88)

    Hi Nick,

    I have already hired someone to fix the “H2 to span”. Nevertheless, it is good that you provided the codes. I will keep it in mind for future uses.

    I have to say..Great Work.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Change entry-title H tag’ is closed to new replies.