• 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

Change Genesis Grid entry-title from H2 to P

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 › Design Tips and Tricks › Change Genesis Grid entry-title from H2 to P

This topic is: not resolved
  • This topic has 9 replies, 3 voices, and was last updated 6 years, 3 months ago by Genesis Developer.
Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • March 12, 2016 at 9:55 pm #181297
    fengshuimaster
    Member

    Hi, by default the genesis grid entry-title I am having at my site is h2. How can I change it to Paragraph instead?

    Thanks in advance.

    http://fengshuimaster8u.com
    March 13, 2016 at 9:24 am #181339
    Davinder Singh Kainth
    Member

    This can be good starting point - https://sridharkatakam.com/how-to-replace-entry-title-heading-tag-for-a-specific-featured-post-widget-using-gfpc/

    As such, why you want to change? This is fine structurally.


    Sunshine PRO genesis theme
    Need Genesis help? Davinder @ iGuiding Media | My Blog | Fresh Genesis Themes

    March 14, 2016 at 8:51 am #181407
    fengshuimaster
    Member

    Yes that is a good read but ... I am using the standard "genesis featured page" widget only. Would love to change the H2 to standard text but with same size to H2.

    Also to change the genesis grid H2 to standard text but with same size to H2 too.

    Currently seems like many H2 in 1 page. Any further readings on it?

    Thanks in advance

    March 15, 2016 at 7:07 am #181454
    Davinder Singh Kainth
    Member

    Strictly from SEO point of view... one H1 and multiple (many) H2, H3... are fine.


    Sunshine PRO genesis theme
    Need Genesis help? Davinder @ iGuiding Media | My Blog | Fresh Genesis Themes

    March 15, 2016 at 11:34 pm #181503
    fengshuimaster
    Member

    Hi Davinder, thank you for your reply.
    Yes, understood that it is alright for a H1 and many H2 / H3. As I am trying to put everything on the front page, I want to try change the following:

    Genesis Grid Loop (without plugin) post entry-title to H3
    Genesis Featured Page (with plugin) page entry-title to H4
    Other entry-title to P

    Tried searching but unable to find a solution that works.

    March 16, 2016 at 12:45 am #181507
    Genesis Developer
    Member

    How to make the Grip loop? Are you using genesis_grid_loop() function? Can you share the home page snippet?

    You can alter the title markup using this filter genesis_entry_title_wrap


    Download Genesis Featured Posts Combo Widget | Simple Grid Layouts Plugin for Posts, CPTs and terms
    You can request new tips/help.

    March 16, 2016 at 4:54 am #181519
    fengshuimaster
    Member

    Hi Genesis Developer,

    Not sure if it is the genesis_grid_loop() function, but I added the following to the front-page file.

    add_action( 'genesis_before_content', 'add_genesis_grid_loop' );
    function add_genesis_grid_loop() {
    if ( function_exists( 'genesis_grid_loop' ) ) {
    genesis_grid_loop( array(
    'features' => 0,
    'feature_image_size' => 'home-top',
    'feature_content_limit' => 0,
    'grid_image_size' => 'featured-image',
    'grid_image_class' => 'aligncenter post-image',
    'grid_content_limit' => 250,
    'more' => __( '[Read More]', 'enterprise' ),
    'posts_per_page' => 4,
    ) );
    } else {
    genesis_standard_loop();
    }
    }

    I think the genesis_entry_title_wrap is the correct one that I need but not sure how should I do it for the front-page only for grid loop and genesis featured page widget.

    Do you think if you can provide me with the coding too?

    Thanks in advance

    March 16, 2016 at 5:26 am #181522
    fengshuimaster
    Member

    I added the following to front-page file and it works

    function my_title_wrap(){
        return 'h2';
    }
    add_filter( 'genesis_entry_title_wrap', 'my_title_wrap' );

    It still works in the homepage if I add it to function file but the actual single post has some error.

    Now that I got the grid loop posts changed to h3, how can I change the entry-title for genesis featured page?

    Thanks in advance

    March 16, 2016 at 5:57 am #181523
    Genesis Developer
    Member

    I think that you can't change the title markup of Genesis Featured Page widget. But I shall double check it and inform you soon.


    Download Genesis Featured Posts Combo Widget | Simple Grid Layouts Plugin for Posts, CPTs and terms
    You can request new tips/help.

    March 16, 2016 at 8:30 am #181550
    Genesis Developer
    Member

    I checked the genesis/lib/widgets/featured-page-widget.php file. Right now you can't alter the entry title markup. But you can unregistered the default page widget and create the same widget from your Child theme folder. Thattime you can alter the title markup.

    For front-page.php file you can replace the current grip loop function with this code (Assuming that you added the filter in functions.php file)

    add_action( 'genesis_before_content', 'add_genesis_grid_loop' );
    function add_genesis_grid_loop() {
      if ( function_exists( 'genesis_grid_loop' ) ) {
        
        add_filter( 'genesis_entry_title_wrap', 'my_title_wrap' );
        
        genesis_grid_loop( array(
          'features'              => 0,
          'feature_image_size'    => 'home-top',
          'feature_content_limit' => 0,
          'grid_image_size'       => 'featured-image',
          'grid_image_class'      => 'aligncenter post-image',
          'grid_content_limit'    => 250,
          'more'                  => __( '[Read More]', 'enterprise' ),
          'posts_per_page'        => 4,
        ) );
        
        remove_filter( 'genesis_entry_title_wrap', 'my_title_wrap' );
        
      } else {
      
        genesis_standard_loop();
        
      }
    }

    Carefully read the above code. I added two new lines add_filter( 'genesis_entry_title_wrap', 'my_title_wrap' ); and remove_filter( 'genesis_entry_title_wrap', 'my_title_wrap' );


    Download Genesis Featured Posts Combo Widget | Simple Grid Layouts Plugin for Posts, CPTs and terms
    You can request new tips/help.

    March 16, 2016 at 7:01 pm #181600
    fengshuimaster
    Member

    Hi Genesis Developer,

    I followed your instruction by adding below code to function.php

    function my_title_wrap(){
        return 'h2';
    }
    add_filter( 'genesis_entry_title_wrap', 'my_title_wrap' );

    I then added your given code to front-page.php

    add_action( 'genesis_before_content', 'add_genesis_grid_loop' );
    function add_genesis_grid_loop() {
      if ( function_exists( 'genesis_grid_loop' ) ) {
        
        add_filter( 'genesis_entry_title_wrap', 'my_title_wrap' );
        
        genesis_grid_loop( array(
          'features'              => 0,
          'feature_image_size'    => 'home-top',
          'feature_content_limit' => 0,
          'grid_image_size'       => 'featured-image',
          'grid_image_class'      => 'aligncenter post-image',
          'grid_content_limit'    => 250,
          'more'                  => __( '[Read More]', 'enterprise' ),
          'posts_per_page'        => 4,
        ) );
        
        remove_filter( 'genesis_entry_title_wrap', 'my_title_wrap' );
        
      } else {
      
        genesis_standard_loop();
        
      }
    }
    

    However, nothing changed. Did I miss a code?

    March 16, 2016 at 7:18 pm #181601
    fengshuimaster
    Member

    Hi Genesis Developer,

    Your code works flawlessly. Thank you very much.

    While for the Genesis Featured Page Widget, I don't really have the knowledge to do it. But since it is a widgetized area, can we use <div></div> to force it to rewrite title to H3?

    Thanks in advance.

    March 17, 2016 at 2:25 am #181624
    fengshuimaster
    Member

    Great. The grid loop code works perfectly.

    But I don't know how to unregister and register new featured page widget. I did some reading, is it possible to force and declare it to change the H tag in <div> since it is in a widgetized area.

    Thanks in advance.

  • Author
    Posts
Viewing 13 posts - 1 through 13 (of 13 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

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

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2022 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