• Resolved SaraLuisa

    (@saraluisa)


    Hi, I have installed custom sidebars in our child theme of twenty twelve website template. I can create new sidebars and when I am editing a page it shows the different sidebars I can chose. The problem is it is not showing on the web page. I am using a Nextgen Gallery widget in the new sidebar. When I click on the web page I get an error ‘we cannot display this gallery’. I know the gallery is ok as I can put it into a web page and it displays correctly. I have put the “wp_head();” in the header.php file before the closing head. I have deleted the custom sidebars widget and reinstalled same but it hasn’t made any difference.
    Any help would be greatly appreciated. I have basic knowledge of coding.
    Many thanks
    Sara

    https://www.ads-software.com/plugins/custom-sidebars/

Viewing 12 replies - 1 through 12 (of 12 total)
  • Thread Starter SaraLuisa

    (@saraluisa)

    Hi, I have installed custom sidebars in our child theme of twenty twelve website template. I can create new sidebars and when I am editing a page it shows the different sidebars I can chose. The problem is it is not showing on the web page. I am using a Nextgen Gallery widget in the new sidebar. When I click on the web page I get an error ‘we cannot display this gallery’. I know the gallery is ok as I can put it into a web page and it displays correctly. I have put the “wp_head();” in the header.php file before the closing head. I have deleted the custom sidebars widget and reinstalled same but it hasn’t made any difference.
    Any help would be greatly appreciated. I have basic knowledge of coding.
    Many thanks
    Sara

    Apologies forgot to show the web page – https://www.trueshotphotography.ie/petit-argento

    Hey Sara,

    How are you doing today?

    Before we start troubleshooting this further. Can you please let me know are sidebars being replaced properly without Nextgen Gallery widget? Does this happen only when the above widget is being used?

    Please advise,
    Bojan

    Thread Starter SaraLuisa

    (@saraluisa)

    Hi Bojan,

    I have just tried the sidebar with the ‘pages’ widget and it is not showing on the web page. I seem to be able to create the different sidebars, I can choose them when in the edit page but they don’t appear on the web page.

    Sara

    Hey Sara,

    Just to be sure we’re doing everything right, you’re creating sidebar in Appearance -> Widgets like this https://screencast.com/t/PMrDbpK26 and after that you’re selecting that sidebar when creating/editing page in Pages https://screencast.com/t/r2yr5Z9e?

    If this is the case and you still can’t see your sidebar on that page this is probably related to some sort of a conflict and to troubleshoot this we’ll have to test for plugin/theme conflicts. To do that please try using default WordPress theme like Twenty Fifteen and deactivating all other plugins as displayed in the following flowchart to know which theme/plugin is conflicting if any.

    https://premium.wpmudev.org/wp-content/uploads/2013/12/Support-Process-Support-Process.png

    Please let me know ??

    Cheers,
    Bojan

    Thread Starter SaraLuisa

    (@saraluisa)

    Hi Bojan,

    Thank you for your help. Yes I am creating the sidebars correctly (as per the screen shots in your last post).

    The troubleshoot is where I run into problems! How to I try a different theme without affecting our website? Or do I try it quickly and then revert back to the ‘original’ once I have tested it?

    Thanks

    Sara

    Hey Sara,

    The troubleshoot is where I run into problems! How to I try a different theme without affecting our website? Or do I try it quickly and then revert back to the ‘original’ once I have tested it?

    You can either do that or in case you have a high traffic site you can create a staging site, clone it to another location where you can do this tests without affecting your live site.

    Best regards,
    Bojan

    Thread Starter SaraLuisa

    (@saraluisa)

    Hi Bojan,

    Thank you for your suggestions – I just tried the following on the live site

    Disabled all plugins except custom sidebars. Instead of seeing the message “We cannot display this gallery” the following was shown [slideshow id=”” w=202 h=202]. I had the sidebar set to show the list of pages on the site.

    Reactivated all plugins and changed theme to Twenty Fifteen but the sidebar did not change. Did not receive any error or message just blank. Deactivated all plugins except custom sidebars and still the sidebar was blank. I had the sidebar set to show the list of pages on the site.

    Have you any other ideas for testing etc. I really appreciate your help with this.

    Sara

    Hey Sara,

    Are you getting the same error message when you try to place the same shortcode in default sidebar without Custom Sidebars being activated?

    I did some research on the issue and this seems to be related to NextGen Gallery plugin as I’ve found quite a few support threads related to this, example: https://www.ads-software.com/support/topic/we-cannot-display-this-gallery-1?replies=11#post-6954257

    Best regards,
    Bojan

    Thread Starter SaraLuisa

    (@saraluisa)

    Hi Bojan,

    Thank you for your help. I will start investigating Nextgen. If I find a solution I will post it here for others with similar issues.

    Best regards

    Sara

    Awesome ?? Please let us know.

    Cheers,
    Bojan

    Thread Starter SaraLuisa

    (@saraluisa)

    Hi Bojan, I think I have found the error but don’t know how to edit .php files correctly. Our website was initially set up by a company and I think there is fixed ‘gallery’ code in the .php file which is why I keep getting the error ‘cannot display gallery’ no matter what I choose to put in the custom sidebar. In my sidebar.php file the following code is there:

    <?php
    /**
    * The sidebar containing the main widget area
    *
    * If no active widgets are in the sidebar, hide it completely.
    *
    * @package WordPress
    * @subpackage Twenty_Twelve
    * @since Twenty Twelve 1.0
    * toString(the_field(‘gallery_id’));
    */
    ?>

    <?php if ( is_active_sidebar( ‘sidebar-1’ ) ) : ?>
    <div id=”secondary” class=”widget-area” role=”complementary”>

    <?php $gallery_to_show = get_post_meta(get_the_ID(), ‘gallery_id’, true); ?>
    <?php
    echo do_shortcode(‘[slideshow id=”‘ .$gallery_to_show. ‘” w=202 h=202]’); ?>
    </div><!– #secondary –>
    <?php endif; ?>

    Can you let me know what I can delete / change so I can use the custom sidebar widget?

    Thank you very much.

    Sara

    Hey Sara,

    It’s really hard to say what the following code is doing exactly without checking the rest of the code in your site:

    <?php $gallery_to_show = get_post_meta(get_the_ID(), 'gallery_id', true); ?>
    <?php
    echo do_shortcode('[slideshow id="' .$gallery_to_show. '" w=202 h=202]'); ?>

    This part is displaying a gallery in the sidebar that you should be able to insert somewhere in your admin.

    Hope this helps ??

    Cheers,
    Bojan

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Custom Sidebars not appearing on pages’ is closed to new replies.