• Resolved carlitocenteno

    (@carlitocenteno)


    I updated the plugin and went through the Google API creation process. Everything is set up as instructed. However, there are no posts displaying on two websites (I have two separate projects created in Google and linked to the correct profile).

    How long does it take for the posts to display? Is there something else I need to do that were not included in the instructions?

    https://ww.wp.xz.cn/plugins/toplytics/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Presslabs

    (@presslabs)

    I assume you have linked the GA tracking code on all pages and also on homepage, and the Toplytics settings are done, you must wait max 1 hour until the results will be revealed on widget area. Please try to remove the Toplytics widget from widget area and then add it again.

    Thread Starter carlitocenteno

    (@carlitocenteno)

    Okay. It did work on one of our websites that same day. For the other website, I believe the issue is that this does not work with custom post types. We’re bringing in articles that need distinct URL structures and we’ve achieved this with custom post types.

    Does this plugin have the ability to include custom post types in some way?

    Plugin Author Presslabs

    (@presslabs)

    Hi, you must customize the template file ‘toplytics-template.php’ in order to get all posts for a specific post type. As a recomendation, please place your custom template file into your theme structure see https://ww.wp.xz.cn/plugins/toplytics/faq/ . The default value for post_type type parameter is ‘post’, so this is the reason of not showing you all the posts of the top. So, if you want to get all posts you have to set the post_type type parameter to ‘any’ (see:http://codepad.org/k11eMVFQ). If you want to get posts from a specific post_type set it acording to that post type (see:http://codepad.org/5KBIoaF0) and if you have a list of post types see: http://codepad.org/RE77JPqC for any other type parameters see this link https://codex.ww.wp.xz.cn/Class_Reference/WP_Query . Another related code is ‘Custom Post Types in the Main Query’ from this page https://codex.ww.wp.xz.cn/Post_Types I hope this was useful to you. Thanks!

    Plugin Author Presslabs

    (@presslabs)

    You must also edit this line of the plugin and remove the condition ( 'post' == get_post_type( $post_id ) ) in order to work properly: https://github.com/PressLabs/toplytics/blob/master/toplytics/toplytics.php#L430 I add this issue on github, and it will be fixed on the next version of the plugin. Thanks alot for your interest.

    Thread Starter carlitocenteno

    (@carlitocenteno)

    Excellent! This worked. Thanks a bunch for your help.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Posts not displaying’ is closed to new replies.