WordPress.org

Ready to get started?Download WordPress

Forums

hacking the post order (3 posts)

  1. werseburg
    Member
    Posted 1 year ago #

    I installed a plugin to count up the number of impressions and I had over 7k in a day but google analytics somehow stated that I only had 1800. I wanted to find the reason why the problem occured and I found it!

    So when we have the WP main page with the newest posts lets say
    http://www.digsite.cat => scroll to the bottom, we will most likely see [1, 2, (..) (n)]
    after we click the [2] we will go to a permalink [/page/2]

    http://digsite.cat/page/2 and so on.
    from what I found out the Google analytics index the URL only once for each IP so when we got
    ourdomain.com/XXX google will only note the impressions /xxx only once per IP

    the solution to the problem would be to change the order of the "news~/category" permalinks from asc[1,2 (...) n] to desc[n (...)3,2,1]

    Some other websites must do it for a reason! like http://www.kwejk.pl
    to get the actual number off the impressions to their statistics
    Is it even possible? - I know it is but wouldn't it reck the core?

  2. bcworkz
    Member
    Posted 1 year ago #

    Assuming your theme uses wp_link_pages() to generate the links. Create a child theme. Put your version of this function in functions.php, with a different name. Probably just a matter of changing the loop counter to count down instead of up.

    Copy any templates from the parent theme to the child that use this function. Change the child templates to call your version instead.

    Clean hack, functionality remains after updates.

    FWIW, I don't see how this will make any difference. No matter. You asked, I answered.

  3. werseburg
    Member
    Posted 1 year ago #

    Thanks, I will see if it works! :)

Topic Closed

This topic has been closed to new replies.

About this Topic