Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Hector Cabrera

    (@hcabrera)

    Hi Frank!

    Yes, you can use the wpp_get_views() template tag to display the current views count of your post / page ??

    Thread Starter FrankEck

    (@frankeck)

    Well… will it works within the entry meta? I’ve changed the content.php by enhanced with the wpp_get_views but it not works…

    Plugin Author Hector Cabrera

    (@hcabrera)

    Please post your code (use pastebin.com) so I can check it out.

    Thread Starter FrankEck

    (@frankeck)

    I’ve add your example at the end of the DIV within the content.php, see below… and sorry, I haven’t a pastebin account…

    <div class="entry-meta">
    <?php
    if ( 'post' == get_post_type() )
    twentyfourteen_posted_on();
    if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) :
    ?>
    <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyfourteen' ), __( '1 Comment', 'twentyfourteen' ), __( '% Comments', 'twentyfourteen' ) ); ?></span>
    <?php
    endif;
    edit_post_link( __( 'Edit', 'twentyfourteen' ), '<span class="edit-link">', '</span>' );
    ?>
    <?php
    if (function_exists('wpp_get_views'))
    echo wpp_get_views( get_the_ID() ); // This will only work when used inside the loop!
    ?>
    </div><!-- .entry-meta -->
    Plugin Author Hector Cabrera

    (@hcabrera)

    Seems correct to me. What’s your site’s URL?

    Thread Starter FrankEck

    (@frankeck)

    Shit… it works. I assume, that the cache was the problem. I’ve cleared the Cache in FF and it works ??

    Thanks so far!!! ??

    Plugin Author Hector Cabrera

    (@hcabrera)

    Don’t mention it ??

    Have a nice day!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Show views on top of my posts’ is closed to new replies.