Widgets Not Showing In Wordpress Site

8 replies
  • WEB DESIGN
  • |
I have a real problem with my Wordpress site.
In the sidebar on the right I cannot get any widgets to show on any page.

All that shows in this area are Shopping Cart and Categories at the top right and I cannot get any other widgets at all to show under these.

The site is d1el.com and it is eshop wptheme.
#showing #site #widgets #wordpress
  • Profile picture of the author Istvan Horvath
    Is your theme coded to work with widgets?

    I am not familiar with the theme you are using but not all themes are "widgetized" (especially, the older ones).

    It's an easy fix but it still has to be done.
    Signature

    {{ DiscussionBoard.errors[5614362].message }}
    • Profile picture of the author cjbmeb14
      There is a widget area where I can drag widgets to sidebar but they do not show on any page?
      Signature
      EXPLODE your Offline sales!!!! My unique methods of selling are all revealed. I went from writing $5 articles to selling Mobile Websites that convert like CRAZY!!!!!!
      {{ DiscussionBoard.errors[5614384].message }}
  • Profile picture of the author johndoejohndoe
    Just because there is a drag-able area in your dashboard doesn't necessarily mean it will show up in your theme. There could be missing or bad code.

    It's tricky but you can take a look at this page and try to implement or fix your own widget area:

    codex.wordpress.org/Widgets_API
    Signature
    Mobile App. and Game Development under $1,000 ~ GrapedStudios.com
    {{ DiscussionBoard.errors[5614395].message }}
  • Profile picture of the author Istvan Horvath
    Whether an "area" appears or not that is defined by the functions.php of the theme.

    However, the code for displaying it has to be in the sidebar.php - and I was referring to that in my post above.
    Signature

    {{ DiscussionBoard.errors[5614415].message }}
    • Profile picture of the author cjbmeb14
      If it helps here below is "Sidebar PHP" and further down "Functions PHP"

      <?php
      session_start();
      ob_start();
      global $Cart,$General;
      $itemsInCartCount = $Cart->cartCount();
      $cartInfo = $Cart->getcartInfo();
      ?>
      <div id="sidebar">
      <?php
      if($General->is_storetype_shoppingcart() || $General->is_storetype_digital())
      {
      ?>
      <div class="widget">
      <h3><?php _e(SHOPPING_CART_TEXT);?></h3>

      <?php
      if($itemsInCartCount>0)
      {
      ?>
      <div class="shipping_section clearfix" id="cart_content_sidebar">
      <div class="shipping_title clearfix"> <span class="pro_s"> <?php _e('Product');?></span> <span class="pro_q"> <?php _e('Qty');?></span> <span class="pro_p"> <?php _e('Price');?></span> </div>
      <?php
      for($i=0;$i<count($cartInfo);$i++)
      {
      $grandTotal = $General->get_currency_symbol().number_format($Cart->getCartAmt(),2);
      ?>
      <div class="shipping_row clearfix"> <span class="pro_s"> <?php echo $cartInfo[$i]['product_name'];?> <?php if($cartInfo[$i]['product_att']){echo "<br>".preg_replace('/([(])([+-])([0-9]*)([)])/','',$cartInfo[$i]['product_att']);}?></span> <span class="pro_q"><?php echo $cartInfo[$i]['product_qty'];?></span> <span class="pro_p"> <?php echo $General->get_currency_symbol().number_format($cartInfo[$i]['product_gross_price'],2);?></span> </div>
      <?php }?>
      <div class="shipping_total"><?php _e('Total');?> : <?php echo $grandTotal;?> </div>

      <p class="fl" ><a href="<?php echo get_option('siteurl');?>/?page=cart"><u><?php _e(VIEW_CART_TEXT);?></u></a></p>

      <div class="b_checkout"><a href="<?php echo get_option('siteurl');?>/?page=cart"><?php _e(CHECKOUT_TEXT);?></a> </div>
      </div>
      <?php
      }else
      {
      ?>
      <div class="shipping_section clearfix" id="cart_content_sidebar"><strong><?php _e(SHOPPING_CART_EMPTY_MSG);?></strong></div>
      <?php
      }
      ?>
      </div> <!-- widget #end-->
      <?php
      }
      ?>

      <?php /*?><?php if ( function_exists('dynamic_sidebar') && (is_sidebar_active(3)) ) { // Show on the front page ?>
      <?php dynamic_sidebar(3); ?>
      <?php } ?><?php */?>
      <div class="widget"><h3><span><?php _e(CATEGORIES_TEXT);?></span></h3>
      <ul>
      <?php
      $ex_catIdArr = get_categories('exclude=9999999' . get_inc_categories("cat_exclude_") .',1');
      $catIdArr = array();
      foreach($ex_catIdArr as $ex_catIdArrObj)
      {
      $catIdArr[] = $ex_catIdArrObj->term_id;
      }
      $includeCats = implode(',',$catIdArr);

      wp_list_categories('orderby=name&title_li=&include ='.$includeCats);
      ?>
      </ul>
      <br /><br />
      <?php
      // $order_catids = '41,49,47,39';
      // categories_list_sidebar('orderby=name&title_li=&in clude='.$includeCats,$order_catids);
      ?>
      </div> <!-- siderbar #end -->
      </div>

      Functions PHP

      <?php

      /************************************************** ***********
      * Do not modify unless you know what you're doing, SERIOUSLY!
      ************************************************** ***********/

      /* Admin framework version 2.0 by Zeljan Topic */

      // Theme variables
      require_once (TEMPLATEPATH . '/library/functions/theme_variables.php');

      //** ADMINISTRATION FILES **//

      // Theme admin functions
      require_once ($functions_path . 'admin_functions.php');

      // Theme admin options
      require_once ($functions_path . 'admin_options.php');

      // Theme admin Settings
      require_once ($functions_path . 'admin_settings.php');


      //** FRONT-END FILES **//

      // Widgets
      require_once ($functions_path . 'widgets_functions.php');

      // Custom
      require_once ($functions_path . 'custom_functions.php');

      // Comments
      require_once ($functions_path . 'comments_functions.php');

      // Yoast's plugins
      //require_once ($functions_path . 'yoast-breadcrumbs.php');

      //require_once ($functions_path . 'yoast-posts.php');

      require_once ($functions_path . 'yoast-canonical.php');

      require_once ($functions_path . 'yoast-breadcrumbs.php');

      /////////shopping cart new function files
      require($functions_path . "general_functions.php");
      require($functions_path . "cart.php");
      require($functions_path . "product.php");
      require($functions_path . "custom.php");
      require(TEMPLATEPATH . "/product_menu.php");

      require(TEMPLATEPATH . "/message.php");
      if('themes.php' == basename($_SERVER['SCRIPT_FILENAME']))
      {
      if($_REQUEST['dummy']=='del')
      {
      delete_dummy_data();
      echo THEME_DUMMY_DELETE_MESSAGE;
      }
      echo THEME_ACTIVE_MESSAGE;
      if($_REQUEST['activated'])
      {
      require_once (TEMPLATEPATH . '/auto_install.php');
      }
      }

      function delete_dummy_data()
      {
      global $wpdb;
      $productArray = array();
      $pids_sql = "select p.ID from $wpdb->posts p join $wpdb->postmeta pm on pm.post_id=p.ID where meta_key='pt_dummy_content' and meta_value=1";
      $pids_info = $wpdb->get_results($pids_sql);
      foreach($pids_info as $pids_info_obj)
      {
      $productArray[] = $pids_info_obj->ID;
      }
      if($productArray)
      {
      $product_ids = implode(',',$productArray);
      $commentsql = "delete from $wpdb->comments where comment_post_ID in ($product_ids)";
      $wpdb->query($commentsql);
      $postmetasql = "delete from $wpdb->postmeta where post_id in ($product_ids)";
      $wpdb->query($postmetasql);
      $postmetasql = "delete from $wpdb->term_relationships where object_id in ($product_ids)";
      $wpdb->query($postmetasql);
      $postmetasql = "delete from $wpdb->posts where ID in ($product_ids)";
      $wpdb->query($postmetasql);
      }
      }
      ?>
      Signature
      EXPLODE your Offline sales!!!! My unique methods of selling are all revealed. I went from writing $5 articles to selling Mobile Websites that convert like CRAZY!!!!!!
      {{ DiscussionBoard.errors[5614584].message }}
  • Profile picture of the author Istvan Horvath
    As always with these specialty themes... the animal is more complicated as it should be.

    It seems you MUST have somewhere an option or setting in your theme admin where you ACTIVATE a certain sidebar: 1 or 2 or 3.

    Furthermore, in these lines in the sidebar.php:

    Code:
    <?php /*?><?php if ( function_exists('dynamic_sidebar')  && (is_sidebar_active(3)) ) { // Show on the front page ?>
                                        <?php dynamic_sidebar(3); ?>  
                                 <?php } ?><?php */?>
    whatever is in between /*...... */ is "commented out" - in plain English: that code, although is there, will not do anything.

    And, actually, it happens to be exactly the code for displaying widgets. It should look like:

    Code:
    <?php if ( function_exists('dynamic_sidebar')  && (is_sidebar_active(3)) ) { // Show on the front page ?>
                                        <?php dynamic_sidebar(3); ?>  
                                 <?php } ?>
    Warning: there might be more to it - but this is the main idea.
    Also, the functions are, probably, in a different file, like widget-functions.php...
    Signature

    {{ DiscussionBoard.errors[5614680].message }}
    • Profile picture of the author cjbmeb14
      Istvan Horvath,
      You are a genius IT HAS WORKED, if you knew how long I have been trying to fix this well!

      Big big thanks.
      Signature
      EXPLODE your Offline sales!!!! My unique methods of selling are all revealed. I went from writing $5 articles to selling Mobile Websites that convert like CRAZY!!!!!!
      {{ DiscussionBoard.errors[5614841].message }}
  • Profile picture of the author cjbmeb14
    You are right in that I had to activate the sidebar which I have done know. I thought you had cracked it but it did not work the widgets still do not show.
    Thanks Istvan for your help.
    Signature
    EXPLODE your Offline sales!!!! My unique methods of selling are all revealed. I went from writing $5 articles to selling Mobile Websites that convert like CRAZY!!!!!!
    {{ DiscussionBoard.errors[5614782].message }}

Trending Topics