• Hi! Suddenly in my WPAdverts site, when a user go to his “manage ads” page, the page shows every ads on the site, not just the user’s ones! When clicking on ad that is not created by the user it shows “You don’t own this ad”.

    I don’t think this is a 2.1.0 update problem, because it already happened before updating.

    Any idea?

    (Only logged in users can see this problem)

    The page I need help with: [log in to see the link]

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

    (@gwin)

    Hi,

    any chance you installed some other WP plugin recently? It is possible the new plugin has some code that modifies (usually with pre_get_posts action) the query that fetches the user Ads.

    You can try forcing WP_Query to ignore any query customizations by adding the code below in your theme functions.php file

    add_filter( "adverts_manage_query", function( $args ) {
      $args["suppress_filters"] = true;
      return $args;
    } );

    If that won’t help you can also try adding before return $args the below lines

    remove_all_filters( 'pre_get_posts' );
    remove_all_actions( 'pre_get_posts' );
    Thread Starter Fabio

    (@rivendilo)

    Hi!

    Thank you very much! That worked fine! I had to add also the two additional lines.

    Thank you for your great support, as always!

    Thread Starter Fabio

    (@rivendilo)

    I noticed that there is still a little problem. When clicking on pages of Buddypress integration “Listings and Manage tabs”, I see the number of my ads but it still shows every ads on website. Is there anything to add on the code you gave me to solve it also there? ?? Thank you!

    Thread Starter Fabio

    (@rivendilo)

    Hi,

    I just wanted to let you know that I resolved the issues; my websites were hacked by malware that modified themes functions.php to hide post (and many other modifications were made to my sites)…

    Cleaned sites and restored themes files, now everything works fine.

    Fabio

    Plugin Author Greg Winiarski

    (@gwin)

    Hi,

    ok great, thanks for the feedback, i am glad you have the website cleaned from the malware.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Listing and Manage Ads show every ads of any users’ is closed to new replies.