• Resolved zzz7

    (@zzz7)


    Hello,
    Can you help me please. The moment i put any widget in sidebar 2 All My Pages vanish. Now you can’t see any page because there are widgets in the right sidebar.
    Can you please me what should i do besides removing those widgets so that my pages display. Here is the link. Thanks
    ZZZ7

Viewing 8 replies - 1 through 8 (of 8 total)
  • In many themes, such as the WordPress Default theme, in the sidebar.php, there is code that says, “if the user is using Widgets then don’t show anything else but Widgets in the sidebar”.

    So in the WordPress Default theme’s sidebar.php, this code is what detects if widgets are configured so everything below that code doesn’t execute if widget are being used:

    if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?>
    Thread Starter zzz7

    (@zzz7)

    Hello MichaelH,
    Thank you for your reply. So What should i do? I want to use both sidebars. I want to show my pages which are not displayed in the header and by default they were in sidebar.Please advise.
    Here is the code of the side bar
    <div id=”sidebar”>

      <?php /* Widgetized sidebar, if you have the plugin installed. */
      if ( !function_exists(‘dynamic_sidebar’) || !dynamic_sidebar() ) : ?>

      <!– Author information is disabled per default. Uncomment and fill in your details if you want to use it.

    • <h2>Author</h2>
      <p>A little something about you, the author. Nothing lengthy, just an overview.</p>
    • –>

      <li class=”widget_categories”>
      <h2>Category</h2>

      <?php wp_list_cats(‘sort_column=name&optioncount=1’); ?>

    <?php wp_list_bookmarks(); ?>

    <?php endif; ?>

    </div>

    Thread Starter zzz7

    (@zzz7)

    This is the code for the sidebar_right
    <div id=”sidebar_right”>

      <?php if ( function_exists(‘dynamic_sidebar’) && dynamic_sidebar(2) ){
      ?>
      <?
      } else { ?>

      <li class=”widget_archives”><h2>Archives</h2>

      <?php wp_get_archives(‘type=monthly’); ?>

    <?php wp_list_pages(‘title_li=<h2>Pages</h2>’ ); ?>

    <li class=”widget_meta”><h2>Meta</h2>

    <?php } ?>

    </div>

    Thread Starter zzz7

    (@zzz7)

    Can anyone tell me please what am i supposed to do to bring back my pages. Thank You.

    If you are using widgets, use the Pages widget.

    This code is what displays Pages if you are NOT using widgets:
    <?php wp_list_pages('title_li=<h2>Pages</h2>' ); ?>

    Thread Starter zzz7

    (@zzz7)

    Hello,
    Thanks for your reply. This code is still there but my pages are not displaying so can you please tell me what am i supposed to do so that my pages display.I need those widgets and i want pages too. What changes i need to do so that my widgets work and pages also do not disappear. Please advise. Thanks

    So you don’t want to use the Pages widget?

    Backup your files and database. See WordPress Backups.

    Move

    <?php wp_list_pages('title_li=<h2>Pages</h2>' ); ?>

    before:

    <?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar(2) ){
    Thread Starter zzz7

    (@zzz7)

    Ok Thank You!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘My All Pages Have Vanished’ is closed to new replies.