Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author bradpotter

    (@bradpotter)

    Sorry for the late reply.

    You raise a valid point. If you are selecting a static page to use as your home page, it will work just fine. If you are using a widgetized home page it looks like Genesis uses an itemtype of Blog and you may not prefer that.

    I do plan to introduce a settings page which will apply site-wide changes so I will try to take a widgetized home page into account when I create the next version of MM.

    I do not have any plans for editing Schema on widgets at this time.

    Plugin Author bradpotter

    (@bradpotter)

    Follow-up on your question.

    You can change the content item type on the home page to something other than https://schema.org/Blog by using the following code snippet in your child theme functions file.

    add_filter( 'genesis_attr_content', 'bp_attributes_content' );
    /**
     * Change attributes for home page content element.
     *
     */
    function bp_attributes_content( $attributes ) {
    
    	$attributes['role']     = 'main';
    	$attributes['itemprop'] = 'mainContentOfPage';
    
    	//* Home page content element microdata
    	if ( is_home() ) {
    		$attributes['itemscope'] = 'itemscope';
    		$attributes['itemtype']  = 'https://schema.org/Blog';
    	}
    
    	return $attributes;
    
    }

    Change “https://schema.org/Blog” in the code snippet above to a valid item type. See https://schema.org for details

    Plugin Author bradpotter

    (@bradpotter)

    Simplified code:

    add_filter( 'genesis_attr_content', 'bp_attributes_content' );
    /**
     * Change attributes for home page main content element.
     *
     */
    function bp_attributes_content( $attributes ) {
    
    	//* Home page main content microdata
    	if ( is_home() ) {
    		$attributes['itemtype']  = 'https://schema.org/Blog';
    	}
    
    	return $attributes;
    
    }
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to add on homepage (Genesis/Dynamik site)’ is closed to new replies.