Skip to main content

Reply To: Display a single widget

ClassiBase classifieds script Forums General help Display a single widget Reply To: Display a single widget

#1127 Reply

ClassiBase
Keymaster

To define new widget location follow these steps. Lets assume you wan to add widget location content_bottom2:

  1. Add new widget location to /user-content/themes/YOURTHEME/info.php file like this, after content_bottom.
    ...
    'content_bottom' => array(
    			'title' => __('Content bottom'),
    			'description' => __('After content and sides')
    		),
    'content_bottom2' => array(
    			'title' => __('Content bottom 2'),
    			'description' => __('After content and sides')
    		)
    ...
  2. Then on /user-content/themes/YOURTHEME/layout/frontend.php file add widget location to any place you want widgets to appear this code.

    <?php echo Widget::renderThemeLocation('content_bottom2', $this->vars, '<div class="{id} wide" role="complementary">{content}</div>'); ?>

  3. Also you can add this widget location to any of view files as well if you want.
  4. Then add any widget to new location same way as you add widgets to any location from admin panel.

Let me know if you have any problems implementing it.

  • Classifieds Business Newsletter

    Get discounts and tips about growing your classifieds website.

    Subscribe