Home › Forums › WoodMart support forum › Fix bug author and update hEntry’ error
Fix bug author and update hEntry’ error
- This topic has 15 replies, 3 voices, and was last updated 6 years, 10 months ago by
huyenht.
-
AuthorPosts
-
April 26, 2018 at 3:48 am #54673
huyenhtParticipantHello!
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!
April 26, 2018 at 7:08 am #54713
Artem TemosKeymasterHi,
Where exactly do you want to change it? Please, send us a link and a screenshot.
thank you
April 26, 2018 at 7:25 am #54716
huyenhtParticipantAll 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.April 26, 2018 at 8:24 am #54738
Artem TemosKeymasterTry 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 }
April 26, 2018 at 8:31 am #54739
huyenhtParticipantThank so much, i added and waiting for results from google ^^
April 26, 2018 at 9:13 am #54744
Artem TemosKeymasterOK, contact us if you will have any extra questions.
April 28, 2018 at 6:09 am #55115
huyenhtParticipantThe error can not fix, and increases day by day!
Attachments:
You must be logged in to view attached files.April 28, 2018 at 8:17 am #55139
Artem TemosKeymasterProbably, you didn’t add the code we gave you. Please, provide us your admin and FTP access so we can check it.
May 1, 2018 at 3:17 am #55491
huyenhtParticipantYou 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!
May 1, 2018 at 3:25 am #55492
huyenhtParticipanti check again the blog now only missing update
May 1, 2018 at 6:31 am #55497
Eric WatsonParticipantHello,
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/jc96g6Kind Regards
XTemos StudioMay 1, 2018 at 6:37 am #55501
huyenhtParticipantYes I see it, now it error missing update
Attachments:
You must be logged in to view attached files.May 1, 2018 at 7:14 am #55510
Eric WatsonParticipantTry 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 StudioMay 1, 2018 at 7:25 am #55512
huyenhtParticipantGreat! thank so much!
May 1, 2018 at 7:26 am #55513
Eric WatsonParticipantYou are always welcome! If you have any questions please feel free to contact us.
Best Regards
May 1, 2018 at 7:35 am #55519
huyenhtParticipantSincerely thanks
-
AuthorPosts
The topic ‘Fix bug author and update hEntry’ error’ is closed to new replies.
- You must be logged in to create new topics. Login / Register