Owner listing number count

Home Forums WordPress Theme EasyBook – WordPress Theme Owner listing number count

This topic contains 2 replies, has 2 voices, and was last updated by  thesmf 1 week, 6 days ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #36850

    thesmf
    Participant

    Supported

    Hello
    The number of owner listings shown on single listing page is not correct. As you can see the number of shown listings that the owner has is 96.

    Alojamiento de prueba casa Alicia


    But the owner just has one:
    https://www.ventederural.com/author/equipo_20r/
    Thank you very much

    #36879

    CTHthemes
    Keymaster

    Try this fix: https://prnt.sc/pe8956

    
    <?php 
    $author_ID = get_the_author_meta( 'ID' );
    ?>
    <div class="box-widget list-author-widget">
        <div class="list-author-widget-header fl-wrap">
            <div class="box-widget-author-title-img ">
                <?php 
                    echo get_avatar(get_the_author_meta('user_email'),'150','https://0.gravatar.com/avatar/ad516503a11cd5ca435acc9bb6523536?s=150', get_the_author_meta('display_name') ); 
                ?> 
            </div>
            <span class="list-author-widget-link">
                <a href="<?php echo get_author_posts_url( $author_ID ); ?>"><?php echo get_the_author_meta('display_name');?></a>
                <span><?php echo count_user_posts( $author_ID, 'listing' ); ?> <?php esc_html_e('Places Hosted', 'easybook-add-ons') ?></span>
            </span>
        </div>
        <a href="<?php echo get_author_posts_url( $author_ID ); ?>" class="btn flat-btn color-bg float-btn"><?php esc_html_e( 'View Profile ', 'easybook-add-ons' );?><i class="fal fa-user-alt"></i></a>
    </div>
    
    #37015

    thesmf
    Participant

    Supported

    Awesome! It worked! Thank you

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

The topic ‘Owner listing number count’ is closed to new replies.

New featues: CityBook - Listing & Directory WordPress Theme version 2.1.8 was outUpdate now
+