Advertisement:

Author Topic: How to post HTML code or ads on sidebars ?  (Read 4766 times)

ColdWabmaster

  • Full Member
  • ***
  • Posts: 151
Re: How to post HTML code or ads on sidebars ?
« Reply #15 on: September 15, 2014, 02:06:33 pm »
Sorry Mistake I had taken wrong link
This is the correct URL: http://goo.gl/aRhuq7

tomshaft

  • Hero Member
  • *****
  • Posts: 862
  • Osshaft for Osclass - Add 650 posts to my total
Re: How to post HTML code or ads on sidebars ?
« Reply #16 on: September 15, 2014, 05:39:54 pm »
I visited the site and looked over the coding closely. I do not see any calls for widgets?
 
Below must be placed into the page(s) widgets are wanted. An example is if a widget is wanted in the footer then this must be placed into the footer.php:
<?php osc_show_widgets('footer') ; ?>
 
Header.php:
<?php osc_show_widgets('header') ; ?>
 
Same for all other widgets. The widget settings must be created in admin as I explained in previous posts.
 
If you are unable to get this to work then perhaps someone else can guide you because I do not know any other way to explain.
 
Tom

guitarrista

  • Newbie
  • *
  • Posts: 17
Re: How to post HTML code or ads on sidebars ?
« Reply #17 on: March 31, 2016, 04:46:35 am »
There are a couple ways to do this. I prefer to just create a widget.
In modern theme index.php file add:
Code: [Select]

 <?php
/*
Theme Name: modern
Theme URI:
Description: modern
Version: 
Author:
Author URI:
Widgets: header,footer,sidebar,
Theme update URI: 
*/
    
function modern_theme_info() {
        return array(
             
'name'        => 'modern'
            
,'version'     => ''
            
,'description' => 'modern'
            
,'author_name' => ''
            
,'author_url'  => ''
            
,'locations'   => array('header','sidebar','footer')
        );
    }
?>



Then place <?php osc_show_widgets('sidebar') ; ?> into the theme main.php at sidebar code wherever you want it to appear. Your image suggests you want to place it at the end of the locations code.

Then go to admin, widgets and create your widget using whatever code (html, php) you want.
 
Tom

Hi,

What's the code for Real Estate theme? :)