WordPress.org

Support

Support » Plugins and Hacks » [Plugin: WP User Frontend] Dashboard page breaks theme front end

[Plugin: WP User Frontend] Dashboard page breaks theme front end

Viewing 9 replies - 1 through 9 (of 9 total)
  • Same here.

    Plugin shows comments in the Dashboard and comments are OFF for the page “Dashboard”.

    black_lady
    Member

    @black_lady

    I have this same problem with comments on dashboard page (only if pagination is enable).
    Please help!

    Hi, i had the same problem, its seems its a problem with WP_query. I havent looked too much into it but adding wp_reset_postdata(); on line 169 in wpuf-dashboard.php outside the loop of $dashboard_query->have_posts() seems to have solved it for me. I havent tested it yet so be careful using this fix as it may break other things 😀

    mogekamiya
    Member

    @mogekamiya

    I have a similar problem too. I’m using the oxygen theme and using shortcode anywhere in my website breaks the home page’s content slider. It just becomes a stream of all the featured images in the content slider.

    I tried the suggestion by SLoGH, but it didn’t fix this issue. If anyone could give me a hint on where to look to debug would be great since this is baffling to me *_*

    mogekamiya
    Member

    @mogekamiya

    Nevermind, I fixed my issue. My static pages were set to to the same page.

    my fix only works for the ‘comments always showing’ error. It worked for me with version 1.1.0-fork-2RRR-4.3 too. Just add wp_reset_postdata(); on line 272 for the fork version.

    professor99
    Member

    @professor99

    Hi SLogh,

    Trying to figure this one out in order to provide a permament fix for the development version.

    I’m kind of figuring out that later in the edit page loop it gets to the comment section which you guys have suppressed for the edit page (which makes sense). Now without the reset $post is not the original edit page page but the last post listed on the dashboard which in this case doesn’t have comments turned off.

    Questions.

    1. Given the above the comment would be for the last listed post. Not the edit page. Is this correct?

    2. For testing purposes how did you suppress the comment field?

    3. By line 272 I gather you really mean the next line?

    4. This file has a have_posts() loop within another have_posts() loop though I’m not sure of the reason why. Why do you put the reset in the inner loop instead of after the outer loop?

    5. Does putting wp_reset_postdata() just before the end of the function (line 304) work equally well?

    Thanks

    Hi professor99,

    Thank you very much for your great effort making the fork and updating this awesome plugin.

    Yes, the bug was showing comments for last post listed on the dashboard even having comments disabled through the admin panel for that page.

    I found about the wp_reset_postdata(); function looking how function WP_query works and I read somewhere that having one loop inside another could cause some problems, and that the reset could help.

    There is no reason why i used it inside the loop, i guess it was the first place where i tried, it worked so i went to something else 😀 I didnt spend much time looking into it.

    I have tried putting wp_reset_postdata(); outside both loops and at the end of the function and it seems is fixing the problem too so I guess its better to put it there so that the function is not called in each loop’s iteration.

    professor99
    Member

    @professor99

    Thanks SloGH. I will put that fix in the next development version.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘[Plugin: WP User Frontend] Dashboard page breaks theme front end’ is closed to new replies.