Adding Google Ads or Other HTML snippets to your WordPress Sidebar
To advertise your affiliates banners or Google ads in your WordPress sidebar is very simple. First, you will login to your WordPress administration area, then click Appearance in the left side menu. Next, your going to click on Widgets. Once you've done that, you simply drag a new TEXT widget to your side bar, click the arrow located on the top right of the widget box, then copy and paste the HTML or Javascript snippet from your advertiser into that box. You don't have to give it a title, but you can if you'd like. Click save to make your changes.
Note: for this to work, you must have a sidebar.php file located in your themes root folder, which most usually do.
Viola, you now have advertising on your sidebar.
How to change the META title in wordpress
The easiest way to accomplish this, is to login to your Word Press Administration area, then click on Appearance / Widgets. You will now see a widget called Meta. Drag that over to your sidebar. Click on the drop down arrow, and fill out the box that says Title, then hit save. Note, If you use this way you will have to drag in other widgets like recent posts, or categories, etc as you will now be using a dynamic sidebar, not the static sidebar.php located in your /wp-content/themes/default (or whatever the name of your theme is) folder.
If this isn't the way you want to go, you can always modify the static sidebar.php file. First, scroll down until you see Meta, or do a find with your web editor. Next, just change it to whatever you like, save the file, then upload it to your server.
Thats it.
Change Your WordPress Meta Widget
Would you like to change your meta links contained in your WordPress sidebar widget in version 2.9.1?
First open up your default-widgets.php in your wp-includes folder, then look for class WP_Widget_Meta extends WP_Widget - shown below.
Quick Note: I recommend using a plugin for this, as this example will require you to edit a core file which maybe changed back when your wordpress application is upgraded.
class WP_Widget_Meta extends WP_Widget {
function WP_Widget_Meta() {
$widget_ops = array('classname' => 'widget_meta', 'description' => __( "Log in/out, admin, feed and WordPress links") );
$this->WP_Widget('meta', __('Meta'), $widget_ops);
}
function widget( $args, $instance ) {
extract($args);
$title = apply_filters('widget_title', empty($instance['title']) ? __('Meta') : $instance['title']);
echo $before_widget;
if ( $title )
echo $before_title . $title . $after_title;
?>
<ul>
<?php wp_register(); ?>
<li><?php wp_loginout(); ?></li>
<li><a href="<?php bloginfo('rss2_url'); ?>" title="<?php echo esc_attr(__('Syndicate this site using RSS 2.0')); ?>">
<?php _e('Entries <abbr title="Really Simple Syndication">RSS</abbr>'); ?></a></li>
<li><a href="<?php bloginfo('comments_rss2_url'); ?>" title="<?php echo esc_attr(__('The latest comments to all posts in RSS')); ?>">
<?php _e('Comments <abbr title="Really Simple Syndication">RSS</abbr>'); ?></a></li>
<li><a href="http://wordpress.org/" title="<?php echo esc_attr(__('Powered by WordPress, state-of-the-art semantic personal publishing platform.')); ?>">WordPress.org</a></li>
<?php wp_meta(); ?>
</ul>
<?php
echo $after_widget;
}
Then replace it with this modified class. Note: I just commented out the RSS Feeds and WordPress Link. Shown in red.
class WP_Widget_Meta extends WP_Widget {
function WP_Widget_Meta() {
$widget_ops = array('classname' => 'widget_meta', 'description' => __( "Log in/out, admin, feed and WordPress links") );
$this->WP_Widget('meta', __('Meta'), $widget_ops);
}
function widget( $args, $instance ) {
extract($args);
$title = apply_filters('widget_title', empty($instance['title']) ? __('Meta') : $instance['title']);
echo $before_widget;
if ( $title )
echo $before_title . $title . $after_title;
?>
<ul>
<?php wp_register(); ?>
<li><?php wp_loginout(); ?></li>
<!--<li><a href="<?php bloginfo('rss2_url'); ?>" title="<?php echo esc_attr(__('Syndicate this site using RSS 2.0')); ?>">
<?php _e('Entries <abbr title="Really Simple Syndication">RSS</abbr>'); ?></a></li>
<li><a href="<?php bloginfo('comments_rss2_url'); ?>" title="<?php echo esc_attr(__('The latest comments to all posts in RSS')); ?>">
<?php _e('Comments <abbr title="Really Simple Syndication">RSS</abbr>'); ?></a></li>
<li><a href="http://wordpress.org/" title="<?php echo esc_attr(__('Powered by WordPress, state-of-the-art semantic personal publishing platform.')); ?>">WordPress.org</a></li>-->
<?php wp_meta(); ?>
</ul>
<?php
echo $after_widget;
 }
Hope this works for you.
Post Archives
Post Categories
Advertisements
Most Recent Posts
- The Official Social Network Trailer
- Eminem – Love the way you lie Feat. Rihanna, Megan Fox, and a Hobbit.
- Windows 8 has been leaked. No Joke.
Follow Me On Twitter
- http://twitpic.com/2latbv - Very bright rainbow.
- RT @williamskinner The Official Social Network Trailer - http://tinyurl.com/3xwdys9
- Good morning for some #fishing