Home Forums WoodMart support forum Fix bug author and update hEntry’ error

Fix bug author and update hEntry’ error

Viewing 16 posts - 1 through 16 (of 16 total)
  • Author
    Posts
  • #54673

    huyenht
    Participant

    Hello!
    I want find the class <span class=”author_name”><?php the_author(); ?></span>

    change to <span class=”vcard author author_name”><span class=”fn”><?php the_author(); ?></span></span>

    Because now my website more error. How to I find this class? Thank so much!

    #54713

    Artem Temos
    Keymaster

    Hi,

    Where exactly do you want to change it? Please, send us a link and a screenshot.

    thank you

    #54716

    huyenht
    Participant

    All post in category has error:
    https://bephyn.com/category/cong-thuc-bep-banh/
    https://bephyn.com/category/chia-se-kinh-nghiem/

    I dont know where i can change class “author_name” to “vcard author author_name”

    Attachments:
    You must be logged in to view attached files.
    #54738

    Artem Temos
    Keymaster

    Try to add the following PHP code snippet to the child theme functions.php file to do this

    	function woodmart_post_meta( $atts = array() ) {
    		extract(shortcode_atts(array(
    			'author'     => 1,
    			'author_ava' => 0,
    			'date'     => 1,
    			'cats'     => 0,
    			'tags'     => 0,
    			'labels'   => 0,
    			'short_labels' => false,
    			'edit'     => 1,
    			'comments' => 1,
    			'limit_cats' => 0
    		), $atts));
    		?>
    			<ul class="entry-meta-list">
    				<?php if( get_post_type() === 'post' ): ?>
    
    					<?php // Is sticky ?>
    
    					<?php if( is_sticky() ): ?>
    						<li class="meta-featured-post"><?php esc_html_e( 'Featured', 'woodmart' ) ?></li>
    					<?php endif; ?>
    
    					<?php // Author ?>
    					<?php if ($author == 1): ?>
    						<li class="meta-author">
    							<?php if ( $labels == 1 && ! $short_labels ): ?>
    								<?php esc_html_e('Posted by', 'woodmart'); ?>
    							<?php elseif($labels == 1 && $short_labels): ?>
    								<?php esc_html_e('By', 'woodmart'); ?>
    							<?php endif; ?>
    							<?php if ( $author_ava == 1 ): ?>
    								<?php echo get_avatar( get_the_author_meta( 'ID' ), 32 ); ?>
    							<?php endif; ?>
    							<a href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" rel="author"><span class="vcard author author_name"><span class="fn"><?php echo get_the_author(); ?></span></span></a>
    						</li>
    					<?php endif ?>
    					<?php // Date ?>
    					<?php if( $date == 1): ?><li class="meta-date"><?php echo get_the_date(); ?></li><?php endif ?>
    					<?php // Categories ?>
    					<?php if(get_the_category_list( ', ' ) && $cats == 1): ?>
    						<li class="meta-categories"><?php echo get_the_category_list( ', ' ); ?></li>
    					<?php endif; ?>
    					<?php // Tags ?>
    					<?php if(get_the_tag_list( '', ', ' ) && $tags == 1): ?>
    						<li class="meta-tags"><?php echo get_the_tag_list( '', ', ' ); ?></li>
    					<?php endif; ?>
    					<?php // Comments ?>
    					<?php if( $comments && comments_open() ): ?>
    						<li><span class="meta-reply">
    							<?php 
    								$comment_link_template = '<span class="comments-count">%s</span> <span class="comments-count-label">%s</span>';
    							 ?>
    							<?php comments_popup_link( 
    								sprintf( $comment_link_template, '0', esc_html__( 'comments', 'woodmart' ) ),
    								sprintf( $comment_link_template, '1', esc_html__( 'comment', 'woodmart' ) ),
    								sprintf( $comment_link_template, '%', esc_html__( 'comments', 'woodmart' ) )
    							); ?>
    						</span></li>
    					<?php endif; ?>
    					<?php // Edit link ?>
    					<?php if( is_user_logged_in() && $edit == 1 ): ?>
    						<!--li><?php edit_post_link( esc_html__( 'Edit', 'woodmart' ), '<span class="edit-link">', '</span>' ); ?></li-->
    					<?php endif; ?>
    				<?php endif; ?>
    			</ul>
    		<?php
    	}
    #54739

    huyenht
    Participant

    Thank so much, i added and waiting for results from google ^^

    #54744

    Artem Temos
    Keymaster

    OK, contact us if you will have any extra questions.

    #55115

    huyenht
    Participant

    The error can not fix, and increases day by day!

    Attachments:
    You must be logged in to view attached files.
    #55139

    Artem Temos
    Keymaster

    Probably, you didn’t add the code we gave you. Please, provide us your admin and FTP access so we can check it.

    #55491

    huyenht
    Participant

    You can access my admin website, and FTP you teach me and can give me the file after i can upload by my seft. Thank so much!

    #55492

    huyenht
    Participant

    i check again the blog now only missing update

    #55497

    Eric Watson
    Participant

    Hello,

    We have checked your site and as you can see in the screenshot, the author has the tags and classes you asked to add.
    https://prnt.sc/jc96g6

    Kind Regards
    XTemos Studio

    #55501

    huyenht
    Participant

    Yes I see it, now it error missing update

    Attachments:
    You must be logged in to view attached files.
    #55510

    Eric Watson
    Participant

    Try to replace the code we gave you earlier with the code below in child theme functions.php

    	function woodmart_post_meta( $atts = array() ) {
    		extract(shortcode_atts(array(
    			'author'     => 1,
    			'author_ava' => 0,
    			'date'     => 1,
    			'cats'     => 0,
    			'tags'     => 0,
    			'labels'   => 0,
    			'short_labels' => false,
    			'edit'     => 1,
    			'comments' => 1,
    			'limit_cats' => 0
    		), $atts));
    		?>
    			<ul class="entry-meta-list">
    				<?php if( get_post_type() === 'post' ): ?>
    
    					<?php // Is sticky ?>
    
    					<?php if( is_sticky() ): ?>
    						<li class="meta-featured-post"><?php esc_html_e( 'Featured', 'woodmart' ) ?></li>
    					<?php endif; ?>
    
    					<?php // Author ?>
    					<?php if ($author == 1): ?>
    						<li class="meta-author">
    							<?php if ( $labels == 1 && ! $short_labels ): ?>
    								<?php esc_html_e('Posted by', 'woodmart'); ?>
    							<?php elseif($labels == 1 && $short_labels): ?>
    								<?php esc_html_e('By', 'woodmart'); ?>
    							<?php endif; ?>
    							<?php if ( $author_ava == 1 ): ?>
    								<?php echo get_avatar( get_the_author_meta( 'ID' ), 32 ); ?>
    							<?php endif; ?>
    							<a href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" rel="author">
    								<span class="vcard author author_name">
    									<span class="fn">
    										<?php echo get_the_author(); ?>
    									</span>
    								</span>
    							</a>
    						</li>
    					<?php endif ?>
    					<?php // Date ?>
    					<?php if( $date == 1): ?><li class="meta-date"><?php echo get_the_date(); ?></li><?php endif ?>
    					<?php // Categories ?>
    					<?php if(get_the_category_list( ', ' ) && $cats == 1): ?>
    						<li class="meta-categories"><?php echo get_the_category_list( ', ' ); ?></li>
    					<?php endif; ?>
    					<?php // Tags ?>
    					<?php if(get_the_tag_list( '', ', ' ) && $tags == 1): ?>
    						<li class="meta-tags"><?php echo get_the_tag_list( '', ', ' ); ?></li>
    					<?php endif; ?>
    					<?php // Comments ?>
    					<?php if( $comments && comments_open() ): ?>
    						<li><span class="meta-reply">
    							<?php 
    								$comment_link_template = '<span class="comments-count">%s</span> <span class="comments-count-label">%s</span>';
    							 ?>
    							<?php comments_popup_link( 
    								sprintf( $comment_link_template, '0', esc_html__( 'comments', 'woodmart' ) ),
    								sprintf( $comment_link_template, '1', esc_html__( 'comment', 'woodmart' ) ),
    								sprintf( $comment_link_template, '%', esc_html__( 'comments', 'woodmart' ) )
    							); ?>
    						</span></li>
    					<?php endif; ?>
    					<?php // Edit link ?>
    					<?php if( is_user_logged_in() && $edit == 1 ): ?>
    						<!--li><?php edit_post_link( esc_html__( 'Edit', 'woodmart' ), '<span class="edit-link">', '</span>' ); ?></li-->
    					<?php endif; ?>
    					<li style="display:none;"><time class="updated" datetime="<?php echo get_the_modified_date( 'c' ); ?>"><?php echo get_the_modified_date(); ?></time></li>
    				<?php endif; ?>
    			</ul>
    		<?php
    	}

    Kind Regards
    XTemos Studio

    #55512

    huyenht
    Participant

    Great! thank so much!

    #55513

    Eric Watson
    Participant

    You are always welcome! If you have any questions please feel free to contact us.

    Best Regards

    #55519

    huyenht
    Participant

    Sincerely thanks

Viewing 16 posts - 1 through 16 (of 16 total)

The topic ‘Fix bug author and update hEntry’ error’ is closed to new replies.