EntryViews

This topic contains 8 replies, has 2 voices, and was last updated by  Stephen Harris 9 years, 5 months ago.

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #20727

    hi,
    is it possible to use EntryViews with events?

    Rachel Druskin
    #20733

    HI Rachel,

    EntryViews claims to work with any post type (which an event is), so I suspect it does, but I’ve never tried that plug-in.

    Stephen Harris
    #20785

    yeah, but you need to send postId, and i’m wondering if i have an overlapping with my events id
    and my posts id?

    Rachel Druskin
    #20788

    Yes, event ID is the post ID (just different names).

    Stephen Harris
    #20790

    ok, thanks!!!

    Rachel Druskin
    #20799

    unfortunately it doesn’t update the count 🙁
    this is what i’m trying to display:

    <?php printf( __( '%s views', 'eventorganiser' ), ev_get_post_view_count( get_the_ID() ));?>
    
    Rachel Druskin
    #20823

    What does get_the_ID() return and does it correspond to an event’s ID?

    Stephen Harris
    #20825

    get_the_ID return post id. i took this function from single-event.php template:

    <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    

    and here:

    $categories_list = get_the_term_list( get_the_ID(), 'event-category', '', ', ',''); 
    
    Rachel Druskin
    #20871

    Everything looks in order there then. I think you might have to ask the developer of EntryViews as to why its not working.

    Stephen Harris
Viewing 9 posts - 1 through 9 (of 9 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.