Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #50033
    greg2015
    Member

    Hi,

    I’m using Catch Everest Free, and have the plugin “WP Customer Reviews”.
    When I use the theme’s sidebar on a specific page, and then also in the sidebar widget I use the WP Customer Reviews plugin shortcode, the theme uses the main plugin DIV twice.

    Once at the very bottom of the page (just above the footer), and this DIV is empty, and then once wrapping the sidebar (which is correct).

    I do not think this is an issue with the plugin, as it has no control over where it goes etc.
    I do not have the shortcode in the page, I have tried with a new test page, with no text in it and making the page “right sidebar”.

    I think it might be an issue with your theme files somewhere, possibly specifically calling the sidebar() function, but I cannot find an issue or reason in any of the core theme files (I have looked for hours..).

    The DIV in question is “wpcr_respond_1”.
    You can see it here:
    1stchoicetilingandplastering.co.uk/about-us

    If you view source, and search for “wpcr_respond_1”, they’re both close to each other, so clicking “next” or “highlight all” shows you them both.

    Can you see any reason why the plugin’s DIV is being called within the page body, and not just the sidebar?

    Kind Regards,
    Greg

    #50073
    Sakin
    Keymaster

    @greg2015: I don’t see any issue in your About US page. I don’t get it what you mean. We don’t have any issue with Catch Evolution theme. It’s been fully tested as per the WordPress.org guideline and we keep our theme quality to the high standard.

    About your wpcr_respond_1 dive in the content. Looks like you have added shortcode or that div in your about us page as well. Edit your about us page and check in text mode.

    #50138
    greg2015
    Member

    Hi Sakin,

    Thanks for the reply. I meant no insult to your software, it’s very good, especially considering it’s much more than just a theme!

    I checked the about-us page and there is no shortcode at all. The plugin is not required to be called in the page, it’s needed in the sidebar.

    I also tried making a new test page, and the test page had no text in it whatsoever, just a title, and set to use “right sidebar” through your theme.
    The right sidebar has a widget with the plugins shortcode in it.

    The following is the source code showing the DIV “wpcr_respond_1” being called twice.
    The source code shows that the first instance of the DIV is in the main page text because you can see the closing DIVs for other DIVs – such as the “entry-content”, “content-area”, “article” etc.

    <p>This paragraph is the last of the text on the about-us page</p>
    <div id="wpcr_respond_1"></div>
    </div><!-- .entry-content -->
    </article><!-- #post-859 -->
    </div><!-- #content .site-content -->
    </div><!-- #primary .content-area -->
    
    <div id="secondary" class="widget-area" role="complementary">
    <aside id="text-2" class="widget widget_text"><h1 class="widget-title">Customer Reviews</h1>
    <div class="textwidget">
    <div id="wpcr_respond_1">

    Again, as the shortcode is not in the page text, and the plugin is called in the theme’s sidebar widget, I do not see what else this could be other than a perhaps function or something else within your theme that is calling the DIV in the page before the sidebar.
    I have not changed your theme files.

    It could be something in the plugin, but again, the plugin has no control over the page text, only when it’s called in the sidebar widget.

    Thanks again!

    #50143
    greg2015
    Member

    I’ve done some more thinking/investigating (I could be on the wrong track, but..)

    Looking through your theme’s code files, the only place I can see that your theme could possibly cause this issue (ie load a sidebar DIV before it loads the sidebar) is in page.php.
    Specifically this line:
    <?php get_template_part( 'content', 'page' ); ?>

    I say that because after that line all the page.php does is close the loop, close the main page content divs, THEN call the sidebar.
    The issue cannot be in the get_sidebar() as that is called after the main page content divs are closed, and the “rogue DIV” is before that.

    Is there anything you do with that function in your theme which could cause this?
    Or is this perhaps something to do with the way WordPress uses that function?

    I’m happy to do the grunt work and check files and debug myself, if you can give me an idea and point in the right direction.
    I’ve been through all your relevant functions and files and cannot see anything else that would call a sidebar widget div in the main page area.

    Thanks again

    #50145
    Sakin
    Keymaster

    @greg2015: Please check in plugin compatibility. I assured you that we have no issue in theme. That <?php get_template_part( 'content', 'page' ); ?> calls for the file content-page.php file. You will not find any issue in that page. I have already check in. To check in this is theme issue, you can just add other widget and check in. You are having issue only when you add this widget. So, you must understand that there is issue with that plugin widget.

    I have recheck all the codes fully to ensure that there is no missing codes.

    Note:
    1. You are using old version of Catch Everest Theme.
    2. You are not supposed to edit/add any files inside catch-everest theme directory. As all these edits will be reverted back to original when you update the theme. So, to make major changes in the theme, you need to build child theme and work in your child theme. But if there is only minor css changes then you can use build in Custom CSS from “Appearance => Theme Options => Custom CSS” box.

    #50158
    greg2015
    Member

    Hi,

    Thanks for the reply, and for looking into it further. I appreciate you likely have spare little time, so thanks.

    I still think the widget is not to blame, as the shortcode is only called in sidebar widget, so not called until all page divs (etc) are closed.
    Thanks anyway. I’ll keep digging, something somewhere is calling the DIV where it shouldn’t.

    Cheers

    #50657
    greg2015
    Member

    I ended up editing the plugin code. I know this is not ideal, but have it monitored and if the plugin is updated I can just re-edit it. (sigh)

    The plugin core code has HTML/CSS in it, which is stupid. I wish these popular plugins would separate business logic from display/view more so they’re more controllable.

    Thanks again Sakin!

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Rouge sidebar DIV also in page body’ is closed to new replies.