Viewing 7 replies - 1 through 7 (of 7 total)
  • Hi akpanpromise,
    I’m using Hueman theme too.
    Maybe you could include a link to a tutorial, about How to Add Schema.org Markup to Hueman theme?
    I find those tutorials, but as I don’t have enough technical skills I don’t know which method is best.
    1) https://www.dezzain.com/wordpress-tutorials/adding-schema-markup-to-wordpress-theme-for-better-seo/
    2) https://longren.io/add-schema-org-markup-to-any-wordpress-theme/
    3) https://www.bloggingspell.com/add-schema-org-markup-wordpress/
    My feeling is to use the first tutorial.
    The other question is: if it is harmless for the theme why developers don’t include markup.
    Will be nice if you could leave a comment. Thank you in advance

    why developers don’t include markup

    Probably because the theme wouldn’t pass the Theme Review for the wp.org theme repository:

    Presentation Vs. Functionality:
    Since the purpose of Themes is to define the presentation of user content, Themes must not be used to define the generation of user content, or to define Theme-independent site options or functionality.

    Thanks bdbrown.
    I see wp point, but Google Webmaster Tools sends error messages. I think that they must find a solution.
    I don’t know which method covers best the change. I use Hueman theme, downloaded from developers site, and also Spacious in other site.
    I don’t wont to abuse of your kindness, but It would be nice to know which alternative you recommend me to use.

    Unfortunately I’m afraid I can’t give you much advice. The sites I work on don’t do any marketing or selling or memberships so they aren’t too concerned with SEO. Seems like everyone has their own idea about how to best approach it. Some advocate manual changes, and there are also a number of SEO plugins available. In the end it’s a cat-and-mouse game; the users are always trying to keep up with what they think the search engines are using to determine rankings. And, just when you think you have it figured out, the game changes again…;-) I think the important thing would be to pick a method, implement it and then let your site run with it for a while. If the rankings aren’t what you think they should be, try something else for a while. Repetitive? Yes. Time consuming? Yes. Just depends on how important you think SEO is for what you’re trying to accomplish.

    Thread Starter Promise Akpan

    (@akpanpromise)

    Hi arlinaite.
    First you need a child theme, because, if you directly edit the theme files, all you have edited will be lost.

    I will post the tutorial here.

    1. You need to remove all hentry markup from your website with this function: Add this to your child theme functions.php file
    /**
    * Remove ‘hentry’ from post_class()
    */
    function ja_remove_hentry( $class ) {
    $class = array_diff( $class, array( ‘hentry’ ) );
    return $class;
    }
    add_filter( ‘post_class’, ‘ja_remove_hentry’ );

    2. Heuman theme uses the you will also like.., and that produces the rel bookmark errors, so remove that as well. by doing this:
    in the original single.php file look for this.

    <article <?php post_class(); ?>>

    Then in your own child theme, remove

    <?php post_class(); ?>

    That is it. no more hentry errors. yay!.

    3. to migrate to schema, you will do two things
    edit your content.php and single.php file

    This is what my singles.php file look like, PLEASE copy it all into your child theme single.php file.

    <?php get_header(); ?>
    
    <section class="content">
    
    	<?php get_template_part('inc/page-title'); ?>
    
    	<div class="pad group">
    
    		<?php while ( have_posts() ): the_post(); ?>
    			<article id="post-<?php the_ID(); ?>" itemscope itemtype="https://schema.org/Article">
    				<div class="post-inner group">
    
    					<h1 class="post-title" itemprop="headline"><?php the_title(); ?></h1>
    					<p class="post-byline"><?php _e('by','hueman'); ?>  <span itemprop="author"><?php the_author_posts_link(); ?></span> · <span class="updated" itemprop="datePublished"><?php the_time(get_option('date_format')); ?></span></p>
    
    					<?php if( get_post_format() ) { get_template_part('inc/post-formats'); } ?>
    
    					<div class="clear"></div>
    
    					<div class="entry <?php if ( ot_get_option('sharrre') != 'off' ) { echo 'share'; }; ?>">
    						<div class="entry-inner" itemprop="articleBody">
    							<?php the_content(); ?>
    							<?php wp_link_pages(array('before'=>'<div class="post-pages">'.__('Pages:','hueman'),'after'=>'</div>')); ?>
    						</div>
    						<?php if ( ot_get_option('sharrre') != 'off' ) { get_template_part('inc/sharrre'); } ?>
    						<div class="clear"></div>
    					</div><!--/.entry-->
    
    				</div><!--/.post-inner-->
    			</article><!--/.post-->
    		<?php endwhile; ?>
    
    		<div class="clear"></div>
    
    		<?php the_tags('<p class="post-tags"><span>'.__('Tags:','hueman').'</span> ','','</p>'); ?>
    
    		<?php if ( ( ot_get_option( 'author-bio' ) != 'off' ) && get_the_author_meta( 'description' ) ): ?>
    			<div class="author-bio">
    				<div class="bio-avatar"><?php echo get_avatar(get_the_author_meta('user_email'),'128'); ?></div>
    				<p class="bio-name"><?php the_author_meta('display_name'); ?></p>
    				<p class="bio-desc"><?php the_author_meta('description'); ?></p>
    				<div class="clear"></div>
    			</div>
    		<?php endif; ?>
    
    		<?php if ( ot_get_option( 'post-nav' ) == 'content') { get_template_part('inc/post-nav'); } ?>
    
    		<?php if ( ot_get_option( 'related-posts' ) != '1' ) { get_template_part('inc/related-posts'); } ?>
    
    		<?php comments_template('/comments.php',true); ?>
    
    	</div><!--/.pad-->
    
    </section><!--/.content-->
    
    <?php get_sidebar(); ?>
    
    <?php get_footer(); ?>

    Then this is what my content.php file looks like:

    <article id="post-<?php the_ID(); ?>" <?php post_class('group'); ?> itemscope itemtype="https://schema.org/Article">
    	<div class="post-inner post-hover">
    
    		<div class="post-thumbnail">
    			<a>" title="<?php the_title(); ?>">
    				<?php if ( has_post_thumbnail() ): ?>
    					<?php the_post_thumbnail('thumb-medium'); ?>
    				<?php elseif ( ot_get_option('placeholder') != 'off' ): ?>
    					<img src="<?php echo get_template_directory_uri(); ?>/img/thumb-medium.png" alt="<?php the_title(); ?>" />
    				<?php endif; ?>
    				<?php if ( has_post_format('video') && !is_sticky() ) echo'<span class="thumb-icon"><i class="fa fa-play"></i></span>'; ?>
    				<?php if ( has_post_format('audio') && !is_sticky() ) echo'<span class="thumb-icon"><i class="fa fa-volume-up"></i></span>'; ?>
    				<?php if ( is_sticky() ) echo'<span class="thumb-icon"><i class="fa fa-star"></i></span>'; ?>
    			</a>
    			<?php if ( comments_open() && ( ot_get_option( 'comment-count' ) != 'off' ) ): ?>
    				<a>"><span><i class="fa fa-comments-o"></i><?php comments_number( '0', '1', '%' ); ?></span></a>
    			<?php endif; ?>
    		</div><!--/.post-thumbnail-->
    
    		<div class="post-meta group">
    			<p class="post-category" itemprop="articleSection"><?php the_category(' / '); ?></p>
    			<p class="post-date" itemprop="datePublished"><?php the_time('j M, Y'); ?></p>
    		</div><!--/.post-meta-->
    
    		<h2 class="post-title">
    			<a>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a>
    		</h2><!--/.post-title-->
    
    		<?php if (ot_get_option('excerpt-length') != '0'): ?>
    		<div class="entry excerpt">
    			<?php the_excerpt(); ?>
    		</div><!--/.entry-->
    		<?php endif; ?>
    
    	</div><!--/.post-inner-->
    </article><!--/.post-->

    That is it. Cheers everyone.

    Hi akpanpromise,

    Thanks a lot for your help.
    I use a child theme, but with a very limited knowledge of code, and willing to learn for covering my needs.

    May I ask two questions?

    1)I like the thing: YOU MAY ALSO LIKE…so as i don’t want to remove it. I look in your site to see what changing code does in front end, and I saw, that you have this two times “related” post and “you may..”

    2)No need of point 2 really, isn’t it ? if I copy and paste your single.php in my child theme, I suppose that you already change this code.

    Thanks in advance.

    Thread Starter Promise Akpan

    (@akpanpromise)

    It won’t be removed. it will still be on the website, it just wont show errors to search engines

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘I just successfully changed from the default Microformats to Schema.org!’ is closed to new replies.