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

    (@hcabrera)

    Hi there,

    Yes, you should also be able to display that. IF you’re using the widget, add attachment to the Post type field (eg. post,attachment).

    If you’re using either the [wpp] shortcode or the wpp_get_mostpopular template tag, use the post_type parameter instead (eg. post_type="post,attachment").

    Thread Starter venenum11

    (@venenum11)

    Yes, i did.
    [ wpp range="daily" post_type=attachment ]
    But it doesn’t work.

    Thread Starter venenum11

    (@venenum11)

    I am sorry, but i confirm. Reinstalling wordpress, theme twentytwelve. I create gallery with two attachment.
    In sidebar: Post type(s): post,page,attachment
    Attachment are not included in list.
    Can i do something to display attachment in list?

    Plugin Author Hector Cabrera

    (@hcabrera)

    Hi there!

    I’m truly sorry for the awful late reply. I kept thinking about this issue and you’re right: WPP versions 3.0.0 to 3.0.3 won’t track views when generated by attachments. That check has been removed since 3.1.0 (more like I removed it while testing stuff and forgot to put it back).

    Thread Starter venenum11

    (@venenum11)

    Et voilà! I am glad to read you now.
    I am sorry, but i don’t understand: i am working with 3.9 and 4.0 and it still doesn’t work. Is it normal?
    Thank you.
    Andrea

    Thread Starter venenum11

    (@venenum11)

    You’ll do an update? Just to know… when?
    Héctor, thank you again.
    a.

    Plugin Author Hector Cabrera

    (@hcabrera)

    I am sorry, but i don’t understand: i am working with 3.9 and 4.0 and it still doesn’t work.

    I meant WordPress Popular Posts version 3.1.0 ??

    What I said earlier is that from 3.1.0 and on the plugin does track attachments views, so what I suggested before should be working now.

    Can you please share your site’s URL so I can go take a look?

    Thread Starter venenum11

    (@venenum11)

    Plugin Author Hector Cabrera

    (@hcabrera)

    Alright, there are some Javascript errors in your site that are killing jQuery – a library used by WPP (and other scripts on your site) to perform various actions.

    I’m a bit busy at the moment to help you debug the problem but I’ll be back during the weekend, is that OK?

    Thread Starter venenum11

    (@venenum11)

    Wonderful! Thank you!

    Plugin Author Hector Cabrera

    (@hcabrera)

    Hi Andrea!

    I’m sorry for replying so late, I completely forgot about this.

    Anyways, just tested and you were right: even with the latest version of the plugin attachments won’t be tracked. For it to work, the plugin needs a couple of modifications:

    1. Go to Plugins > Editor and select WordPress Popular Posts from the dropdown at the right.
    2. Find:

      AND p.post_status = 'publish'

      … and replace every one of them (there are four text strings like that) with:

      AND p.post_status IN('publish', 'inherit')

    3. Find:

      (is_single() || is_page())

      … and replace it with:

      (is_single() || is_page() || is_attachment())

    4. Hit the Update file button to save changes.

    This will make WPP track attachments as well. Make sure you add the attachment post type to the Stats dashboard and to your widget(s), too.

    Keep in mind that this modification will be lost the next time WPP gets an update, so make sure you bookmark this topic somewhere for future reference.

    Thread Starter venenum11

    (@venenum11)

    Ciao Hector!

    I am also sorry for replying just now.

    You are great. Thank you. It works.

    Probably i’ll write a function to overwrite next release of wpp, and yes, of course, this topic is in my favourite list. ??

    Good luck!

    Andrea

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘How to display attachment post type?’ is closed to new replies.