<?xml version="1.0" encoding="UTF-8"?> <rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
> <channel><title>techNerdia - Web Development Tips</title> <atom:link href="http://technerdia.com/feed" rel="self" type="application/rss+xml" /><link>http://technerdia.com</link> <description>Web Development Tips, Tricks and Ideas</description> <lastBuildDate>Mon, 07 May 2012 16:46:34 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <item><title>30 WordPress Admin Bar Tips and Tricks</title><link>http://technerdia.com/1140_wordpress-admin-bar.html</link> <comments>http://technerdia.com/1140_wordpress-admin-bar.html#comments</comments> <pubDate>Thu, 03 May 2012 17:25:20 +0000</pubDate> <dc:creator>tribalNerd</dc:creator> <category><![CDATA[Functions]]></category> <category><![CDATA[Wordpress]]></category> <category><![CDATA[code]]></category> <category><![CDATA[how-to]]></category> <category><![CDATA[php]]></category> <category><![CDATA[wp]]></category> <guid
isPermaLink="false">http://technerdia.com/?p=1140</guid> <description><![CDATA[30+ PHP examples covering how to customize the Wordpress Admin Bar.<p><div
style="border-top:1px dotted #cccccc;clear:both;font-size:14px;font-weight:bold;margin:2px 10px;padding:0 10px;text-align:left;"><ul><li><b>New Wordpress Plugin</b> <a
href="http://technerdia.com/projects/adminbar/plugin.html" target="_blank">WP My Admin Bar</a> (It's Free, Download Today!)</li><li><b>Reading:</b> <a
href="http://technerdia.com/1140_wordpress-admin-bar.html">30 WordPress Admin Bar Tips and Tricks</a> <b>By:</b> <a
href="https://plus.google.com/105408082571454010152/" target="_blank">tribalNerd</a> <b>From:</b> <a
href="http://technerdia.com/" target="_blank">techNerdia - Web Development Tips</a></li><li><b><a
href="https://plus.google.com/u/0/108046225913965315594/posts" target="_blank">Follow techNerdia on Google+</a></li></ul></div><p
align="center">~ <b>Thank you for subscribing to techNerdia.com - Please Share This Post With Others</b> ~</p></p> ]]></description> <content:encoded><![CDATA[<p><img
src="http://technerdia.com/files/30-admin-bar-tips.jpg" alt="30 WordPress Admin Bar Tips" title="30-admin-bar-tips" width="250" height="250" class="alignleft" />With the release of the <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3RlY2huZXJkaWEuY29tL3Byb2plY3RzL2FkbWluYmFyL3BsdWdpbi5odG1s" target=\"_blank\">WP My Admin Bar WordPress Plugin</a>, I have received a few feedback questions about how to expand the toolbar in various ways. Most of these questions pertained to simple snips that could be added to a themes functions.php file or the must use plugin directory (<a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2NvZGV4LndvcmRwcmVzcy5vcmcvTXVzdF9Vc2VfUGx1Z2lucw==" target=\"_blank\">mu-plugins</a>) for multisite installs.</p><p>Because of these questions, I&#8217;ve put together 30 different examples of how to customize the WordPress Admin Bar. As well, I&#8217;ve included two PHP Classes that wrap up various aspects of the examples for easier use within your functions.php file.</p><div
class="br">&nbsp;</div><p><strong>How to use the snips</strong>:</p><ul><li>Access the Active Theme for a Website and open the functions.php file. Paste the snips below into the file, then test.</li><li>For multisite installs: If you use the /wp-content/mu-plugins/ (must use plugins) folder, these snips will activate across every Website on the Network.</li><li><strong>WordPress Admin Bar Not Displaying</strong>? Add &lt;?php wp_footer();?&gt; at the bottom to your themes footer.php file.</li></ul><p><strong><em>The example snips below have been tested on WordPress 3.3.2</em></strong>:</p><ul
class="buttOptions one"><li><a
href="http://technerdia.com/files/30_admin_bar_tips.pdf" target="_blank" class="postButton" onClick="javascript: _gaq.push(['_trackPageview', '/files/30_admin_bar_tips.pdf', 'PDF', '/files/30_admin_bar_tips.pdf']);"><span>Download PDF</span></a></li></ul><div
class="br">&nbsp;</div><h2>Disable the WordPress Admin Bar for all Users and Visitors</h2><p>Turn off the toolbar with one simple line&#8230;</p><div
class="mycode"><pre name="code" class="php">/*
 * Disable the WordPress Admin Bar for all Users and Visitors
 */
remove_action( &#039;init&#039;, &#039;_wp_admin_bar_init&#039; );</pre></div><h2>Enable the WordPress Admin Bar for admins only</h2><p>If the user can&#8217;t manage options, then don&#8217;t show them the admin bar.</p><div
class="mycode"><pre name="code" class="php">/*
 * Enable the WordPress Admin Bar for admins only
 */
if ( !current_user_can( &#039;manage_options&#039; ) ) {
	remove_action( &#039;init&#039;, &#039;_wp_admin_bar_init&#039; );
}</pre></div><h2>Display the WordPress Admin Bar in the Admin Area only</h2><div
class="mycode"><pre name="code" class="php">/*
 * Display the WordPress Admin Bar in the Admin Area only
 */
if ( is_admin() ) {
	remove_action( &#039;init&#039;, &#039;_wp_admin_bar_init&#039; );
}</pre></div><h2>Display the WordPress Admin bar on Websites only</h2><div
class="mycode"><pre name="code" class="php">/*
 * Display the WordPress Admin bar on Websites only
 */
if ( !is_admin() ) {
	remove_action( &#039;init&#039;, &#039;_wp_admin_bar_init&#039; );
}</pre></div><h2>Disable The Admin Bar within the Network Admin only</h2><p>This Snip MUST be placed within the <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2NvZGV4LndvcmRwcmVzcy5vcmcvTXVzdF9Vc2VfUGx1Z2lucw==" target=\"_blank\">must use</a> /mu-plugins/ plugins directory.</p><div
class="mycode"><pre name="code" class="php">/*
 * Disable The Admin Bar within the Network Admin only
 */
if ( is_network_admin() ) {
	remove_action( &#039;init&#039;, &#039;_wp_admin_bar_init&#039; );
}</pre></div><h2>Removes the 28px margin for the Admin Bar</h2><p>A disabled Admin Bar leave a 28px space at the top of the page, the snip below removes the extra space. The example removes the space for both the Admin Area and Websites.</p><div
class="mycode"><pre name="code" class="php">/*
 * Removes the 28px margin for the Admin Bar
 */
function remove_adminbar_margin() {
	$remove_adminbar_margin = &#039;&lt;style type=&quot;text/css&quot;&gt;
		html { margin-top: -28px !important; }
		* html body { margin-top: -28px !important; }
	&lt;/style&gt;&#039;;
	echo $remove_adminbar_margin;
}
/* wp-admin area */
if ( is_admin() ) {
	add_action( &#039;admin_head&#039;, &#039;remove_adminbar_margin&#039; );
}
/* websites */
if ( !is_admin() ) {
	add_action( &#039;wp_head&#039;, &#039;remove_adminbar_margin&#039; );
}</pre></div><h2>Remove the WordPress Logo from the WordPress Admin Bar</h2><div
class="mycode"><pre name="code" class="php">/*
 * Remove the WordPress Logo from the WordPress Admin Bar
 */
function remove_wp_logo() {
	global $wp_admin_bar;
	$wp_admin_bar-&gt;remove_menu(&#039;wp-logo&#039;);
}
add_action( &#039;wp_before_admin_bar_render&#039;, &#039;remove_wp_logo&#039; );</pre></div><h2>Remove the Howdy menu from the WordPress Admin Bar</h2><div
class="mycode"><pre name="code" class="php">/*
 * Remove the Howdy menu from the WordPress Admin Bar
 */
function remove_my_account() {
	global $wp_admin_bar;
	$wp_admin_bar-&gt;remove_menu(&#039;my-account&#039;);
}
add_action( &#039;wp_before_admin_bar_render&#039;, &#039;remove_my_account&#039; );</pre></div><h2>Remove the Comment Bubble from the WordPress Admin Bar</h2><div
class="mycode"><pre name="code" class="php">/*
 * Remove the Comment Bubble from the WordPress Admin Bar
 */
function remove_comment_bubble() {
	global $wp_admin_bar;
	$wp_admin_bar-&gt;remove_menu(&#039;comments&#039;);
}
add_action( &#039;wp_before_admin_bar_render&#039;, &#039;remove_comment_bubble&#039; );</pre></div><h2>Disable the My Sites menu in the Admin Bar</h2><div
class="mycode"><pre name="code" class="php">/*
 * Disable the My Sites menu in the Admin Bar
 */
function remove_my_sites() {
	global $wp_admin_bar;
	$wp_admin_bar-&gt;remove_menu(&#039;my-sites&#039;);
}
add_action( &#039;wp_before_admin_bar_render&#039;, &#039;remove_my_sites&#039; );</pre></div><h2>Disable the current Site Name menu in the Admin Bar</h2><p>This is the menu shows the current site, with a dropdown to visit the Website.</p><div
class="mycode"><pre name="code" class="php">/*
 * Disable the current Site Name menu in the Admin Bar
 */
function remove_this_site() {
	global $wp_admin_bar;
	$wp_admin_bar-&gt;remove_menu(&#039;site-name&#039;);
}
add_action( &#039;wp_before_admin_bar_render&#039;, &#039;remove_this_site&#039; );</pre></div><h2>Disable the Add New Content menu</h2><div
class="mycode"><pre name="code" class="php">/*
 * Disable the Add New Content menu
 */
function disable_new_content() {
	global $wp_admin_bar;
	$wp_admin_bar-&gt;remove_menu(&#039;new-content&#039;);
}
add_action( &#039;wp_before_admin_bar_render&#039;, &#039;disable_new_content&#039; );</pre></div><h2>Disable the Search Icon and Input within the Admin Bar</h2><p>Located to the far right within the toolbar.</p><div
class="mycode"><pre name="code" class="php">/*
 * Disable the Search Icon and Input within the Admin Bar
 */
function disable_bar_search() {
	global $wp_admin_bar;
	$wp_admin_bar-&gt;remove_menu(&#039;search&#039;);
}
add_action( &#039;wp_before_admin_bar_render&#039;, &#039;disable_bar_search&#039; );</pre></div><h2>Disable the Update Menus</h2><div
class="mycode"><pre name="code" class="php">/*
 * Disable the Update Menus
 */
function disable_bar_updates() {
	global $wp_admin_bar;
	$wp_admin_bar-&gt;remove_menu(&#039;updates&#039;);
}
add_action( &#039;wp_before_admin_bar_render&#039;, &#039;disable_bar_updates&#039; );</pre></div><h2>Add a simple menu and link that opens in a new window</h2><p>Add a quick menu and link to the admin bar.</p><div
class="mycode"><pre name="code" class="php">/*
 * Add a simple menu &amp; link that opens in a new window
 * Change the Menu &#039;title&#039; name and &#039;href&#039; link.
 */
function custom_adminbar_menu( $meta = TRUE ) {
	global $wp_admin_bar;
		if ( !is_user_logged_in() ) { return; }
		if ( !is_super_admin() || !is_admin_bar_showing() ) { return; }
	$wp_admin_bar-&gt;add_menu( array(
		&#039;id&#039; =&gt; &#039;custom_menu&#039;,
		&#039;title&#039; =&gt; __( &#039;Menu Name&#039; ),
		&#039;href&#039; =&gt; &#039;http://google.com/&#039;,
		&#039;meta&#039; 	=&gt; array( target =&gt; &#039;_blank&#039; ) )
	);
}
add_action( &#039;admin_bar_menu&#039;, &#039;custom_adminbar_menu&#039;, 15 );
/* The add_action # is the menu position:
10 = Before the WP Logo
15 = Between the logo and My Sites
25 = After the My Sites menu
100 = End of menu
*/</pre></div><h2>Add a Menu to the Theme Editor for Multisite and Standalone WordPress</h2><div
class="mycode"><pre name="code" class="php">/*
 * Add a Menu to the Theme Editor for Multisite and Standalone WordPress
 */
function add_theme_menu() {
	global $wp_admin_bar;
		if ( !is_user_logged_in() ) { return; }
		if ( !is_super_admin() || !is_admin_bar_showing() ) { return; }
	if ( function_exists(&#039;is_multisite&#039;) &amp;&amp; is_multisite() ) {
		$wp_admin_bar-&gt;add_menu( array(
			&#039;id&#039; =&gt; &#039;theme-editor&#039;,
			&#039;title&#039; =&gt; __(&#039;Edit Theme&#039;),
			&#039;href&#039; =&gt; network_admin_url( &#039;theme-editor.php&#039; ) )
		);
	}else{
		$wp_admin_bar-&gt;add_menu( array(
			&#039;id&#039; =&gt; &#039;theme-editor&#039;,
			&#039;title&#039; =&gt; __(&#039;Edit Theme&#039;),
			&#039;href&#039; =&gt; admin_url( &#039;theme-editor.php&#039; ) )
		);
	}
}
add_action( &#039;admin_bar_menu&#039;, &#039;add_theme_menu&#039;, 100 );</pre></div><h2>Add a menu, with a dropdown to link that opens in a new window</h2><div
class="mycode"><pre name="code" class="php">/*
 * Add a menu, with a dropdown to link that opens in a new window
 * Change the Menu title, the link title and and href link.
 */
function custom_adminbar_menu( $meta = TRUE ) {
	global $wp_admin_bar;
		if ( !is_user_logged_in() ) { return; }
		if ( !is_super_admin() || !is_admin_bar_showing() ) { return; }
	$wp_admin_bar-&gt;add_menu( array(
		&#039;id&#039; =&gt; &#039;custom_menu&#039;,
		&#039;title&#039; =&gt; __( &#039;Menu Name&#039; ) ) 		/* set the menu name */
	);
	$wp_admin_bar-&gt;add_menu( array(
		&#039;parent&#039; =&gt; &#039;custom_menu&#039;,
		&#039;id&#039;     =&gt; &#039;custom_links&#039;,
		&#039;title&#039; =&gt; __( &#039;Google&#039;), 			/* Set the link title */
		&#039;href&#039; =&gt; &#039;http://google.com/&#039;,		/* Set the link a href */
		&#039;meta&#039; 	=&gt; array( target =&gt; &#039;_blank&#039; ) )
	);
}
add_action( &#039;admin_bar_menu&#039;, &#039;custom_adminbar_menu&#039;, 15 );</pre></div><h2>Add a menu, with sub-menu, that contains multiple links, that all open in a new window</h2><div
class="mycode"><pre name="code" class="php">/*
 * Add a menu, with sub-menu, that contains multiple links, that all open in a new window
 * Change the Menu &#039;title&#039; name and &#039;href&#039; link.
 */
function custom_adminbar_menu( $meta = TRUE ) {
	global $wp_admin_bar;
		if ( !is_user_logged_in() ) { return; }
		if ( !is_super_admin() || !is_admin_bar_showing() ) { return; }
	$wp_admin_bar-&gt;add_menu( array(
		&#039;id&#039; =&gt; &#039;custom_menu&#039;,
		&#039;title&#039; =&gt; __( &#039;Menu Name&#039; ) ) 			/* set the menu name */
	);
	/* sub-menu */
	$wp_admin_bar-&gt;add_menu( array(
		&#039;parent&#039; =&gt; &#039;custom_menu&#039;,
		&#039;id&#039;     =&gt; &#039;custom_links&#039;,
		&#039;title&#039; =&gt; __( &#039;Sub menu&#039;) )			/* set the sub-menu name */
	);
			/* menu links */
			$wp_admin_bar-&gt;add_menu( array(
				&#039;parent&#039; 	=&gt; &#039;custom_links&#039;,
				&#039;title&#039; 	=&gt; &#039;Google&#039;, 			/* Set the link title */
				&#039;href&#039; 	=&gt; &#039;http://google.com/&#039;,	/* Set the link a href */
				&#039;meta&#039; 	=&gt; array( target =&gt; &#039;_blank&#039; ) )
			);
			$wp_admin_bar-&gt;add_menu( array(
				&#039;parent&#039; 	=&gt; &#039;custom_links&#039;,
				&#039;title&#039; 	=&gt; &#039;Yahoo&#039;, 			/* Set the link title */
				&#039;href&#039; 	=&gt; &#039;http://yahoo.com/&#039;,	/* Set the link a href */
				&#039;meta&#039; 	=&gt; array( target =&gt; &#039;_blank&#039; ) )
			);
}
add_action( &#039;admin_bar_menu&#039;, &#039;custom_adminbar_menu&#039;, 15 );</pre></div><h2>Make Visit Site links open in a new window</h2><p>This is the &#8220;Visit Site&#8221; link found under: My Sites Menu > Site Name > Visit Site</p><div
class="mycode"><pre name="code" class="php">/*
 * Make Visit Site links open in a new window: My Sites &gt; Site Name &gt; Visit Site
 */
function my_site_links() {
	global $wp_admin_bar;
	foreach ( (array) $wp_admin_bar-&gt;user-&gt;blogs as $blog ) {
		$menu_id  = &#039;blog-&#039; . $blog-&gt;userblog_id;
		$wp_admin_bar-&gt;add_menu( array(
			&#039;parent&#039; 	=&gt; $menu_id,
			&#039;id&#039; 	=&gt; $menu_id . &#039;-v&#039;,
			&#039;title&#039; 	=&gt; __( &#039;Visit Site&#039; ),
			&#039;href&#039; 	=&gt; get_home_url( $blog-&gt;userblog_id, &#039;/&#039; ),
			&#039;meta&#039; 	=&gt; array( target =&gt; &#039;_blank&#039; ) )
		);
	}
}
add_action( &#039;wp_before_admin_bar_render&#039;, &#039;my_site_links&#039; );</pre></div><h2>Remove My Sites Sub-Menu Options: Dashboard, New Post, Manage Comments and Visit Site</h2><div
class="mycode"><pre name="code" class="php">/*
 * Remove My Sites Sub-Menu Options: Dashboard, New Post, Manage Comments and Visit Site
 */
function remove_mysites_links () {
	global $wp_admin_bar;
	foreach ( (array) $wp_admin_bar-&gt;user-&gt;blogs as $blog ) {
		$menu_id_d  = &#039;blog-&#039; . $blog-&gt;userblog_id . &#039;-d&#039;;		/* Dashboard var */
		$menu_id_n  = &#039;blog-&#039; . $blog-&gt;userblog_id . &#039;-n&#039;;		/* New Post var */
		$menu_id_c  = &#039;blog-&#039; . $blog-&gt;userblog_id . &#039;-c&#039;;		/* Manage Comments var */
		$menu_id_v  = &#039;blog-&#039; . $blog-&gt;userblog_id . &#039;-v&#039;;		/* Visit Site var */
		$wp_admin_bar-&gt;remove_menu($menu_id_d);				/* Remove Dashboard Link */
		$wp_admin_bar-&gt;remove_menu($menu_id_n);				/* Remove New Post Link */
		$wp_admin_bar-&gt;remove_menu($menu_id_c);				/* Remove Manage Comments Link */
		$wp_admin_bar-&gt;remove_menu($menu_id_v);				/* Remove Visit Site Link */
	}
}
add_action( &#039;wp_before_admin_bar_render&#039;, &#039;remove_mysites_links&#039; );</pre></div><h2>Add Links to My Sites Sub-Menus: Log Out, Media, Links, Pages, Appearance, Plugins, Users, Tools and Settings</h2><p>This example expands the My Sites menu.</p><div
class="mycode"><pre name="code" class="php">/*
 * Add Links to My Sites Sub-Menus: Log Out, Media, Links, Pages, Appearance, Plugins, Users, Tools and Settings
 */
function add_mysites_link () {
	global $wp_admin_bar;
	foreach ( (array) $wp_admin_bar-&gt;user-&gt;blogs as $blog ) {
		$menu_id  = &#039;blog-&#039; . $blog-&gt;userblog_id;
		/* Add a Log Out Link */
		$wp_admin_bar-&gt;add_menu( array(
			&#039;parent&#039; 	=&gt; $menu_id,
			&#039;id&#039; 	=&gt; $menu_id . &#039;-logout&#039;,
			&#039;title&#039; 	=&gt; __( &#039;Log Out&#039; ),
			&#039;href&#039; 	=&gt; get_home_url( $blog-&gt;userblog_id, &#039;/wp-login.php?action=logout&#039; ) )
		);
		/* Media Admin */
		$wp_admin_bar-&gt;add_menu( array(
			&#039;parent&#039; 	=&gt; $menu_id,
			&#039;id&#039; 	=&gt; $menu_id . &#039;-media&#039;,
			&#039;title&#039; 	=&gt; __( &#039;Media Admin&#039; ),
			&#039;href&#039; 	=&gt; get_home_url( $blog-&gt;userblog_id, &#039;/wp-admin/upload.php&#039; ) )
		);
		/* Links Admin */
		$wp_admin_bar-&gt;add_menu( array(
			&#039;parent&#039; 	=&gt; $menu_id,
			&#039;id&#039; 	=&gt; $menu_id . &#039;-links&#039;,
			&#039;title&#039; 	=&gt; __( &#039;Links Admin&#039; ),
			&#039;href&#039; 	=&gt; get_home_url( $blog-&gt;userblog_id, &#039;/wp-admin/link-manager.php&#039; ) )
		);
		/* Pages Admin */
		$wp_admin_bar-&gt;add_menu( array(
			&#039;parent&#039; 	=&gt; $menu_id,
			&#039;id&#039; 	=&gt; $menu_id . &#039;-pags&#039;,
			&#039;title&#039; 	=&gt; __( &#039;Pages Admin&#039; ),
			&#039;href&#039; 	=&gt; get_home_url( $blog-&gt;userblog_id, &#039;/wp-admin/edit.php?post_type=page&#039; ) )
		);
		/* Appearance Admin */
		$wp_admin_bar-&gt;add_menu( array(
			&#039;parent&#039; 	=&gt; $menu_id,
			&#039;id&#039; 	=&gt; $menu_id . &#039;-appearance&#039;,
			&#039;title&#039; 	=&gt; __( &#039;Appearance&#039; ),
			&#039;href&#039; 	=&gt; get_home_url( $blog-&gt;userblog_id, &#039;/wp-admin/themes.php&#039; ) )
		);
		/* Plugin Admin */
		$wp_admin_bar-&gt;add_menu( array(
			&#039;parent&#039; 	=&gt; $menu_id,
			&#039;id&#039; 	=&gt; $menu_id . &#039;-plugins&#039;,
			&#039;title&#039; 	=&gt; __( &#039;Plugin Admin&#039; ),
			&#039;href&#039; 	=&gt; get_home_url( $blog-&gt;userblog_id, &#039;/wp-admin/plugins.php&#039; ) )
		);
		/* Users Admin */
		$wp_admin_bar-&gt;add_menu( array(
			&#039;parent&#039; 	=&gt; $menu_id,
			&#039;id&#039; 	=&gt; $menu_id . &#039;-users&#039;,
			&#039;title&#039; 	=&gt; __( &#039;Users Admin&#039; ),
			&#039;href&#039; 	=&gt; get_home_url( $blog-&gt;userblog_id, &#039;/wp-admin/users.php&#039; ) )
		);
		/* Tools Admin */
		$wp_admin_bar-&gt;add_menu( array(
			&#039;parent&#039; 	=&gt; $menu_id,
			&#039;id&#039; 	=&gt; $menu_id . &#039;-tools&#039;,
			&#039;title&#039; 	=&gt; __( &#039;Tools Admin&#039; ),
			&#039;href&#039; 	=&gt; get_home_url( $blog-&gt;userblog_id, &#039;/wp-admin/tools.php&#039; ) )
		);
		/* Settings Admin */
		$wp_admin_bar-&gt;add_menu( array(
			&#039;parent&#039; 	=&gt; $menu_id,
			&#039;id&#039; 	=&gt; $menu_id . &#039;-settings&#039;,
			&#039;title&#039; 	=&gt; __( &#039;Settings Admin&#039; ),
			&#039;href&#039; 	=&gt; get_home_url( $blog-&gt;userblog_id, &#039;/wp-admin/options-general.php&#039; ) )
		);
	}
}
add_action( &#039;wp_before_admin_bar_render&#039;, &#039;add_mysites_link&#039; );</pre></div><h2>Change My Sites &#8220;Site Names&#8221; to &#8220;Domain.com&#8221; as the displayed name</h2><div
class="mycode"><pre name="code" class="php">/*
 * Change My Sites Menu Names to Domain.com as the menu name
 */
function change_site_names() {
	global $wp_admin_bar;
		$blue_wp_logo_url = includes_url(&#039;images/wpmini-blue.png&#039;);
		$blavatar = &#039;&lt;img src=&quot;&#039; . esc_url($blue_wp_logo_url) . &#039;&quot; alt=&quot;&#039; . esc_attr__( &#039;Blavatar&#039; ) . &#039;&quot; width=&quot;16&quot; height=&quot;16&quot; class=&quot;blavatar&quot;/&gt;&#039;;
	foreach ( (array) $wp_admin_bar-&gt;user-&gt;blogs as $blog ) {
			$menu_id  = &#039;blog-&#039; . $blog-&gt;userblog_id;
			$blogname = ucfirst( $blog-&gt;domain );
		$wp_admin_bar-&gt;add_menu( array(
			&#039;parent&#039; 	=&gt; &#039;my-sites-list&#039;,
			&#039;id&#039; 	=&gt; $menu_id,
			&#039;title&#039; 	=&gt; $blavatar . $blogname,
			&#039;href&#039; 	=&gt; get_admin_url( $blog-&gt;userblog_id ) )
		);
	}
}
add_action( &#039;wp_before_admin_bar_render&#039;, &#039;change_site_names&#039; );</pre></div><h2>Remove the WP Logo from the My Sites Menu</h2><div
class="mycode"><pre name="code" class="php">/*
 * Remove the WP Logo from the My Sites Menu
 */
function remove_wplogo_mysites() {
	global $wp_admin_bar;
	foreach ( (array) $wp_admin_bar-&gt;user-&gt;blogs as $blog ) {
		$menu_id  = &#039;blog-&#039; . $blog-&gt;userblog_id;
		$blogname = empty( $blog-&gt;blogname ) ? $blog-&gt;domain : $blog-&gt;blogname;
		$wp_admin_bar-&gt;add_menu( array(
			&#039;parent&#039; 	=&gt; &#039;my-sites-list&#039;,
			&#039;id&#039; 	=&gt; $menu_id,
			&#039;title&#039; 	=&gt; $blogname,
			&#039;href&#039; 	=&gt; get_admin_url( $blog-&gt;userblog_id ) )
		);
	}
}
add_action( &#039;wp_before_admin_bar_render&#039;, &#039;remove_wplogo_mysites&#039; );</pre></div><h2>Change the WP Logo Icon within the My Sites Menu to any icon you want</h2><p>Create your own icon, upload it to the active themes /images/ directory, then change the NEW-ICON-HERE.png to the proper name.</p><div
class="mycode"><pre name="code" class="php">/*
 * Change the WP Logo Icon within the My Sites Menu to any icon you want
 * Update the NEW-ICON-HERE.png name to match the proper file name.
 */
function add_mysites_logo() {
	global $wp_admin_bar;
	foreach ( (array) $wp_admin_bar-&gt;user-&gt;blogs as $blog ) {
		$menu_id  = &#039;blog-&#039; . $blog-&gt;userblog_id;
		$blogname = empty( $blog-&gt;blogname ) ? $blog-&gt;domain : $blog-&gt;blogname;
		$blavatar = &#039;&lt;img src=&quot;&#039; . get_bloginfo(&#039;template_directory&#039;) . &#039;/images/NEW-ICON-HERE.png&quot; alt=&quot;&#039; . esc_attr__( &#039;Blavatar&#039; ) . &#039;&quot; width=&quot;16&quot; height=&quot;16&quot; class=&quot;blavatar&quot;/&gt;&#039;;
		$wp_admin_bar-&gt;add_menu( array(
			&#039;parent&#039; 	=&gt; &#039;my-sites-list&#039;,
			&#039;id&#039; 	=&gt; $menu_id,
			&#039;title&#039; 	=&gt; $blavatar . $blogname,
			&#039;href&#039; 	=&gt; get_admin_url( $blog-&gt;userblog_id ) )
		);
	}
}
add_action( &#039;wp_before_admin_bar_render&#039;, &#039;add_mysites_logo&#039; );</pre></div><h2>Force the WordPress Admin Bar to display for all visitors</h2><p>Even Logged Out Users can use the Admin Bar.</p><div
class="mycode"><pre name="code" class="php">/*
 * Force the WordPress Admin Bar to display for all visitors
 */
add_filter( &#039;show_admin_bar&#039;, &#039;__return_true&#039; );</pre></div><h2>Create a Menu for Logged Out Users</h2><div
class="mycode"><pre name="code" class="php">/*
 * Create a menu for Logged Out Users
 */
function loggedout_menu( $meta = TRUE ) {
	global $wp_admin_bar;
		if ( is_user_logged_in() ) { return false; }
	$wp_admin_bar-&gt;add_menu( array(
		&#039;id&#039; =&gt; &#039;custom_menu&#039;,
		&#039;title&#039; =&gt; __( &#039;Menu Name&#039; ),
		&#039;href&#039; =&gt; &#039;http://google.com/&#039;,
		&#039;meta&#039; 	=&gt; array( target =&gt; &#039;_blank&#039; ) )
	);
}
add_action( &#039;admin_bar_menu&#039;, &#039;loggedout_menu&#039;, 15 );</pre></div><h2>Add a Log In Link for Logged Out Users to the Admin Bar</h2><div
class="mycode"><pre name="code" class="php">/*
 * Add a Log In Link for Logged Out Users to the Admin Bar
 */
function add_login_link( $meta = FALSE ) {
	global $wp_admin_bar, $blog_id;
	if ( is_user_logged_in() ) { return false; }
	$wp_admin_bar-&gt;add_menu( array(
		&#039;id&#039; =&gt; &#039;custom_menu&#039;,
		&#039;title&#039; =&gt; __( &#039;Login&#039; ),
		&#039;href&#039; =&gt; get_home_url( $blog_id, &#039;/wp-login.php&#039; ) )
	);
}
add_filter( &#039;show_admin_bar&#039;, &#039;__return_true&#039; ); /* turn on adminbar for logged out users */
add_action( &#039;admin_bar_menu&#039;, &#039;add_login_link&#039;, 15 );</pre></div><h2>Change the Opacity of WordPress Admin Bar</h2><div
class="mycode"><pre name="code" class="php">/*
 * Change the opacity of WordPress Admin Bar
 */
function adminbar_opacity() {
	$adminbar_opacity = &#039;&lt;style type=&quot;text/css&quot;&gt;#wpadminbar { filter:alpha(opacity=50); opacity:0.5; }&lt;/style&gt;&#039;;
}
/* wp-admin area */
if ( is_admin() ) {
	add_action( &#039;admin_head&#039;, &#039;adminbar_opacity&#039; );
}
/* websites */
if ( !is_admin() ) {
	add_action( &#039;wp_head&#039;, &#039;adminbar_opacity&#039; );
}</pre></div><h2>Hide the WordPress Admin Bar with CSS, then display the Admin Bar on hover with CSS and jQuery</h2><div
class="mycode"><pre name="code" class="php">/*
 * Hide the WordPress Admin Bar with CSS, then display the Admin Bar on hover with CSS and jQuery
 */
function hide_adminbar() {
	$hide_adminbar = &#039;&lt;script type=&quot;text/javascript&quot;&gt;
		$(document).ready( function() {
			$(&quot;#wpadminbar&quot;).fadeTo( &quot;slow&quot;, 0 );
			$(&quot;#wpadminbar&quot;).hover(function() {
				$(&quot;#wpadminbar&quot;).fadeTo( &quot;slow&quot;, 1 );
			}, function() {
				$(&quot;#wpadminbar&quot;).fadeTo( &quot;slow&quot;, 0 );
			});
		});
	&lt;/script&gt;
	&lt;style type=&quot;text/css&quot;&gt;
		html { margin-top: -28px !important; }
		* html body { margin-top: -28px !important; }
		#wpadminbar {
			-ms-filter:&quot;progid:DXImageTransform.Microsoft.Alpha(Opacity=0)&quot;;
			filter: alpha(opacity=0);
			-moz-opacity:0;
			-khtml-opacity:0;
			opacity:0;
		}
		#wpadminbar:hover, #wpadminbar:focus {
			-ms-filter:&quot;progid:DXImageTransform.Microsoft.Alpha(Opacity=100)&quot;;
			filter: alpha(opacity=100);
			-moz-opacity:1;
			-khtml-opacity:1;
			opacity:1;
		}
	&lt;/style&gt;&#039;;
	return $hide_adminbar;
}
/* wp-admin area */
if ( is_admin() ) {
	add_action( &#039;admin_head&#039;, &#039;hide_adminbar&#039; );
}
/* websites */
if ( !is_admin() ) {
	add_action( &#039;wp_head&#039;, &#039;hide_adminbar&#039; );
}</pre></div><h2>Change the Admin Bar Color Scheme</h2><p>The colors below create a Blue Admin Bar. Modify the #color values to customize the look.</p><div
class="mycode"><pre name="code" class="php">/*
 * Change the Admin Bar Color Scheme
 */
function change_adminbar_colors() {
	$change_adminbar_colors = &#039;&lt;style type=&quot;text/css&quot;&gt;
		#wpadminbar *, #wpadminbar{ color:#ffffff;text-shadow:#444444 0 -1px 0; }
		#wpadminbar{
			background-color:#003399;
			background-image:-ms-linear-gradient(bottom,#000033,#003399 5px);
			background-image:-moz-linear-gradient(bottom,#000033,#003399 5px);
			background-image:-o-linear-gradient(bottom,#000033,#003399 5px);
			background-image:-webkit-gradient(linear,left bottom,left top,from(#000033),to(#003399));
			background-image:-webkit-linear-gradient(bottom,#000033,#003399 5px);
			background-image:linear-gradient(bottom,#000033,#003399 5px);
		}
		/* menu separators */
		#wpadminbar .quicklinks&gt;ul&gt;li{border-right:1px solid #003399;}
		#wpadminbar .quicklinks&gt;ul&gt;li&gt;a,#wpadminbar .quicklinks&gt;ul&gt;li&gt;.ab-empty-item{border-right:1px solid #000033;}
		#wpadminbar .quicklinks .ab-top-secondary&gt;li{border-left:1px solid #000033;}
		#wpadminbar .quicklinks .ab-top-secondary&gt;li&gt;a,#wpadminbar .quicklinks .ab-top-secondary&gt;li&gt;.ab-empty-item{border-left:1px solid #003399;}
		/* menu hover color and hover link color */
		#wpadminbar.nojs .ab-top-menu&gt;li.menupop:hover&gt;.ab-item,#wpadminbar .ab-top-menu&gt;li.menupop.hover&gt;.ab-item{background:#333333;color:#ffffff;}
		#wpadminbar .hover .ab-label,#wpadminbar.nojq .ab-item:focus .ab-label{color:#ffffff;}
		#wpadminbar .menupop.hover .ab-label{color:#ffffff;}
		/* menu, on mouse over hover colors */
		#wpadminbar .ab-top-menu&gt;li:hover&gt;.ab-item,#wpadminbar .ab-top-menu&gt;li.hover&gt;.ab-item,#wpadminbar .ab-top-menu&gt;li&gt;.ab-item:focus,#wpadminbar.nojq .quicklinks .ab-top-menu&gt;li&gt;.ab-item:focus{
			color:#fafafa;
			background-color:#000033;
			background-image:-ms-linear-gradient(bottom,#003399,#000033);
			background-image:-moz-linear-gradient(bottom,#003399,#000033);
			background-image:-o-linear-gradient(bottom,#003399,#000033);
			background-image:-webkit-gradient(linear,left bottom,left top,from(#003399),to(#003399));
			background-image:-webkit-linear-gradient(bottom,#003399,#000033);
			background-image:linear-gradient(bottom,#003399,#000033);
		}
		/* menu item links hover color */
		#wpadminbar .menupop li:hover,#wpadminbar .menupop li.hover,#wpadminbar .quicklinks .menupop .ab-item:focus,#wpadminbar .quicklinks .ab-top-menu .menupop .ab-item:focus{background-color:#ccffcc;}
		/* menu item non-link colors */
		#wpadminbar .ab-submenu .ab-item{color:#333333;}
		/* menu item link colors */
		#wpadminbar .quicklinks .menupop ul li a,#wpadminbar .quicklinks .menupop ul li a strong,#wpadminbar .quicklinks .menupop.hover ul li a,#wpadminbar.nojs .quicklinks .menupop:hover ul li a{color:#0099cc;}
		/* my sites hover color */
		#wpadminbar .quicklinks .menupop .ab-sub-secondary&gt;li:hover,#wpadminbar .quicklinks .menupop .ab-sub-secondary&gt;li.hover,#wpadminbar .quicklinks .menupop .ab-sub-secondary&gt;li .ab-item:focus{background-color:#dfdfdf;}
		/* update menu colors */
		#wpadminbar .quicklinks a span#ab-updates{background:#eeeeee;color:#333333;}
		#wpadminbar .quicklinks a:hover span#ab-updates{background:#ffffff;color:#000000;}
		/* howdy menu */
		#wpadminbar .ab-top-secondary{
			background-color:#003399;
			background-image:-ms-linear-gradient(bottom,#000033,#003399 5px);
			background-image:-moz-linear-gradient(bottom,#000033,#003399 5px);
			background-image:-o-linear-gradient(bottom,#000033,#003399 5px);
			background-image:-webkit-gradient(linear,left bottom,left top,from(#000033),to(#003399));
			background-image:-webkit-linear-gradient(bottom,#000033,#003399 5px);
			background-image:linear-gradient(bottom,#000033,#003399 5px);
		}
		/* Howdy menu, username text color in dropdown */
		#wpadminbar #wp-admin-bar-user-info .display-name{color:#333333;}
		#wpadminbar #wp-admin-bar-user-info .username{color:#999999;}
		/* search */
		#wpadminbar #adminbarsearch .adminbar-input{color:#ccc;text-shadow:#444 0 -1px 0;background-color:rgba(255,255,255,0);}
		#wpadminbar #adminbarsearch .adminbar-input:focus{color:#555;text-shadow:0 1px 0 #fff;background-color:rgba(255,255,255,0.9);}
		#wpadminbar.ie8 #adminbarsearch .adminbar-input{background-color:#003399;}
		#wpadminbar.ie8 #adminbarsearch .adminbar-input:focus{background-color:#fff;}
		#wpadminbar #adminbarsearch .adminbar-input::-webkit-input-placeholder{color:#ddd;}
		#wpadminbar #adminbarsearch .adminbar-input:-moz-placeholder{color:#ddd;}
	&lt;/style&gt;&#039;;
	return $change_adminbar_colors;
}
/* wp-admin area */
if ( is_admin() ) {
	add_action( &#039;admin_head&#039;, &#039;change_adminbar_colors&#039; );
}
/* websites */
if ( !is_admin() ) {
	add_action( &#039;wp_head&#039;, &#039;change_adminbar_colors&#039; );
}</pre></div><h2>PHP Class that enables the Admin Bar for Admins Only and Removes 28px Space</h2><div
class="mycode"><pre name="code" class="php">/*
 * PHP Class that enables the Admin Bar for Admins Only and Removes 28px Space
 */
class admins_only_admin_bar {
	/*
	 * Loads when class is called
	 */
	function __construct() {
		/* disables admin bar */
		remove_action( &#039;init&#039;, &#039;_wp_admin_bar_init&#039; );
		/* calls function to remove 28px space */
		add_action( &#039;admin_head&#039;, array( &amp;$this, &#039;remove_adminbar_margin&#039; ) );
		add_action( &#039;wp_head&#039;, array( &amp;$this, &#039;remove_adminbar_margin&#039; ) );
	}
	/*
	 * Removes the 28px margin for the Admin Bar
	 */
	public function remove_adminbar_margin() {
		$remove_adminbar_margin = &#039;&lt;style type=&quot;text/css&quot;&gt;
			html { margin-top: -28px !important; }
			* html body { margin-top: -28px !important; }
		&lt;/style&gt;&#039;;
		echo $remove_adminbar_margin;
	}
}
/* Admins Only - Call Class */
if ( current_user_can( &#039;manage_options&#039; ) ) {
	$display_admin_bar = new admins_only_admin_bar();
}</pre></div><h2>PHP Class that forces the Admin Bar for logged out users, adds a login link, removes the wp logo, and adds a custom link menu to the Admin Bar.</h2><p>This example, removes the WordPress Logo, adds a Login Link, and creates a menu named &#8220;Our Other Sites&#8221; with two Websites within the dropdown menu.</p><div
class="mycode"><pre name="code" class="php">/*
 * Force Admin Bar for logged out users, add a login link, remove the wp logo, and add a custom link menu
 */
class force_admin_bar {
	/*
	 * Loads when class is called
	 */
	function __construct() {
		/* logged out users only */
		if ( is_user_logged_in() ) { return false; }
		/* remove wp logo */
		add_action( &#039;wp_before_admin_bar_render&#039;, array( &amp;$this, &#039;remove_wp_logo&#039; ) );
		/* force adminbar to logged out users */
		add_filter( &#039;show_admin_bar&#039;, &#039;__return_true&#039; );
		/* call function to add login link to admin bar */
		add_action( &#039;admin_bar_menu&#039;, array( &amp;$this, &#039;logged_out_menus&#039; ), 15 );
	}
	/*
	 * Menus for logged out users
	 */
	function logged_out_menus( $meta = FALSE ) {
		global $wp_admin_bar, $blog_id;
		/* remove logo */
		$wp_admin_bar-&gt;remove_menu(&#039;wp-logo&#039;);
		/* logout menu link */
		$wp_admin_bar-&gt;add_menu( array(
			&#039;id&#039; =&gt; &#039;login_menu&#039;,
			&#039;title&#039; =&gt; __( &#039;Login&#039; ),
			&#039;href&#039; =&gt; get_home_url( $blog_id, &#039;/wp-login.php&#039; ) )
		);
		/* create menus */
		$wp_admin_bar-&gt;add_menu( array(
			&#039;id&#039; =&gt; &#039;custom_menu&#039;,
			&#039;title&#039; =&gt; __( &#039;Our Other Websites&#039; ) ) /* set the menu name */
		);
		/* menu link */
		$wp_admin_bar-&gt;add_menu( array(
			&#039;parent&#039; =&gt; &#039;custom_menu&#039;,
			&#039;id&#039;     =&gt; &#039;techNerdia&#039;, /* unique id name */
			&#039;title&#039;     =&gt; &#039;techNerdia&#039;, /* Set the link title */
			&#039;href&#039;  =&gt; &#039;http://technerdia.com/&#039;, /* Set the link a href */
			&#039;meta&#039;  =&gt; array( target =&gt; &#039;_blank&#039; ) )
		);
		/* menu link */
		$wp_admin_bar-&gt;add_menu( array(
			&#039;parent&#039; =&gt; &#039;custom_menu&#039;,
			&#039;id&#039;     =&gt; &#039;Google&#039;, /* unique id name */
			&#039;title&#039;     =&gt; &#039;Google&#039;, /* Set the link title */
			&#039;href&#039;  =&gt; &#039;http://google.com/&#039;, /* Set the link a href */
			&#039;meta&#039;  =&gt; array( target =&gt; &#039;_blank&#039; ) )
		);
	}
}
/* Call Class */
$force_admin_bar = new force_admin_bar();</pre></div><hr
/><h2>The WordPress Admin Bar is one seriously versatile feature&#8230;..</h2><p>If PHP and customizing WordPress isn&#8217;t you thing&#8230;.. then check out the WordPress Plugin: <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3RlY2huZXJkaWEuY29tL3Byb2plY3RzL2FkbWluYmFyL3BsdWdpbi5odG1s" target=\"_blank\">WP My Admin Bar</a> &#8211; An Admin Bar created for Developers and Bloggers! [<a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3RlY2huZXJkaWEuY29tL3Byb2plY3RzL2FkbWluYmFyL3BsdWdpbi5odG1s" target=\"_blank\">read more</a>]</p><hr
/><h4>Have something to say about this article? Like it, love it, hate it?</h4><p>Drop me some <a
href="http://technerdia.com/feedback.html" target="_blank">feedback</a> and let me know!</p><br
/><p><div
style="border-top:1px dotted #cccccc;clear:both;font-size:14px;font-weight:bold;margin:2px 10px;padding:0 10px;text-align:left;"><ul><li><b>New WordPress Plugin</b> <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3RlY2huZXJkaWEuY29tL3Byb2plY3RzL2FkbWluYmFyL3BsdWdpbi5odG1s" target=\"_blank\">WP My Admin Bar</a> (It's Free, Download Today!)</li><li><b>Reading:</b> <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3RlY2huZXJkaWEuY29tLzExNDBfd29yZHByZXNzLWFkbWluLWJhci5odG1s">30 WordPress Admin Bar Tips and Tricks</a> <b>By:</b> <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cHM6Ly9wbHVzLmdvb2dsZS5jb20vMTA1NDA4MDgyNTcxNDU0MDEwMTUyLw==" target=\"_blank\">tribalNerd</a> <b>From:</b> <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3RlY2huZXJkaWEuY29tLw==" target=\"_blank\">techNerdia - Web Development Tips</a></li><li><b><a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cHM6Ly9wbHVzLmdvb2dsZS5jb20vdS8wLzEwODA0NjIyNTkxMzk2NTMxNTU5NC9wb3N0cw==" target=\"_blank\">Follow techNerdia on Google+</a></li></ul></div><p
align="center">~ <b>Thank you for subscribing to techNerdia.com - Please Share This Post With Others</b> ~</p></p> <img
src="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=1140" width="1" height="1" style="display: none;" />]]></content:encoded> <wfw:commentRss>http://technerdia.com/1140_wordpress-admin-bar.html/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>The Easy To Use Multisite Robots.txt Manager WordPress Plugin</title><link>http://technerdia.com/1135_robots-txt-manager.html</link> <comments>http://technerdia.com/1135_robots-txt-manager.html#comments</comments> <pubDate>Tue, 20 Mar 2012 15:21:59 +0000</pubDate> <dc:creator>tribalNerd</dc:creator> <category><![CDATA[Plugins]]></category> <category><![CDATA[Wordpress]]></category> <guid
isPermaLink="false">http://technerdia.com/?p=1135</guid> <description><![CDATA[A Multisite Network Robots.txt Manager - Quickly manage all Network Websites robots.txt files directly within the Network Admin.<p><div
style="border-top:1px dotted #cccccc;clear:both;font-size:14px;font-weight:bold;margin:2px 10px;padding:0 10px;text-align:left;"><ul><li><b>New Wordpress Plugin</b> <a
href="http://technerdia.com/projects/adminbar/plugin.html" target="_blank">WP My Admin Bar</a> (It's Free, Download Today!)</li><li><b>Reading:</b> <a
href="http://technerdia.com/1135_robots-txt-manager.html">The Easy To Use Multisite Robots.txt Manager WordPress Plugin</a> <b>By:</b> <a
href="https://plus.google.com/105408082571454010152/" target="_blank">tribalNerd</a> <b>From:</b> <a
href="http://technerdia.com/" target="_blank">techNerdia - Web Development Tips</a></li><li><b><a
href="https://plus.google.com/u/0/108046225913965315594/posts" target="_blank">Follow techNerdia on Google+</a></li></ul></div><p
align="center">~ <b>Thank you for subscribing to techNerdia.com - Please Share This Post With Others</b> ~</p></p> ]]></description> <content:encoded><![CDATA[<p
class="textcenter">This Plugin Was Created For Multisite Networks > Network Activations Only!</p><p><a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3RlY2huZXJkaWEuY29tL3Byb2plY3RzL3JvYm90c3R4dC9zY3JlZW5zaG90cy5odG1s" title=\"View Screenshots of the Multisite Robots.txt Manager WordPress Plugin\"><img
src="http://technerdia.com/files/ms-robotstxt-manager.jpg" alt="Multisite Robots.txt Manager WordPress Plugin" width="587" height="190" class="aligncenter" /></a></p><p><em>A Multisite Network Robots.txt Manager &#8211; Quickly manage all Network Websites robots.txt files directly within the Network Admin.</em></p><p><strong>Fast, easy to use, and most important &#8211; it saves you time!</strong></p><ul><li>Manage all Network Websites from one Administration area.</li><li>Instantly add Sitemaps URLs to all Network Websites.</li><li>Mass update the entire Network or update a unique Website.</li><li>Each Website within a Network can have a unique robots.txt file.</li><li>Robots.txt file examples that can be published to Websites or stored as a default.</li></ul><ul
class="buttOptions three"><li><a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3RlY2huZXJkaWEuY29tL3Byb2plY3RzL3JvYm90c3R4dC9zY3JlZW5zaG90cy5odG1s" class=\"postButton\"><span>Screenshots</span></a></li><li><a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3RlY2huZXJkaWEuY29tL3Byb2plY3RzL3JvYm90c3R4dC9mYXEuaHRtbA==" class=\"postButton\"><span>F.A.Q.</span></a></li><li><a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2Rvd25sb2Fkcy53b3JkcHJlc3Mub3JnL3BsdWdpbi9tdWx0aXNpdGUtcm9ib3RzdHh0LW1hbmFnZXIuemlw" class=\"postButton\" target=\"_blank\"><span>Download</span></a></li></ul><div
class="br">&nbsp;</div><p><strong>Before you start, you should know&#8230;</strong></p><ul><li>When you first install the plugin, no robots.txt files are active.</li><li>The default &#8220;Network Wide&#8221; robots.txt file is NOT a live robots.txt file.</li><li>If you deactivate the plugin, no options are removed but the robots.txt file(s) are no longer displayed.</li><li>If you delete this plugin, all options and settings will be removed from the database.</li></ul><p><strong>Making the Plugin Work</strong>: To make the robots.txt live for a Website, either click the &#8220;publish to network&#8221; button or select the Website from the dropdown > then click the &#8220;change sites&#8221; buttons. Next, adjust the displayed robots.txt file, then click the &#8220;update this website&#8221; button. Both methods publish the robots.txt file to the Website(s), making it live. Click the [ view robots.txt ] link next to the Websites dropdown to view the changes within your browser.</p><p>The best way to learn how the tool works is to play around with the features. Start by creating your robots.txt file (even a junk one), network publish it, delete it, rebuild the default(s)&#8230;.and when you&#8217;re ready, set it up how you want, mass update the Network, then enjoy the rest of the day!</p><p
class="textcenter"><strong><a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3RlY2huZXJkaWEuY29tL3Byb2plY3RzL3JvYm90c3R4dC9wbHVnaW4uaHRtbA==">Read more about the Multisite Robots.txt Manager</a></p><hr
/><p
class="textcenter"><a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3RlY2huZXJkaWEuY29tL3Byb2plY3RzL3JvYm90c3R4dC9zY3JlZW5zaG90cy5odG1s">View Screenshots</a> | <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3RlY2huZXJkaWEuY29tL3Byb2plY3RzL3JvYm90c3R4dC9mYXEuaHRtbA==">Read the F.A.Q.</a> | <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2Rvd25sb2Fkcy53b3JkcHJlc3Mub3JnL3BsdWdpbi9tdWx0aXNpdGUtcm9ib3RzdHh0LW1hbmFnZXIuemlw" target=\"_blank\">Download it Today</a></strong></p><hr
/><p><div
style="border-top:1px dotted #cccccc;clear:both;font-size:14px;font-weight:bold;margin:2px 10px;padding:0 10px;text-align:left;"><ul><li><b>New WordPress Plugin</b> <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3RlY2huZXJkaWEuY29tL3Byb2plY3RzL2FkbWluYmFyL3BsdWdpbi5odG1s" target=\"_blank\">WP My Admin Bar</a> (It's Free, Download Today!)</li><li><b>Reading:</b> <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3RlY2huZXJkaWEuY29tLzExMzVfcm9ib3RzLXR4dC1tYW5hZ2VyLmh0bWw=">The Easy To Use Multisite Robots.txt Manager WordPress Plugin</a> <b>By:</b> <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cHM6Ly9wbHVzLmdvb2dsZS5jb20vMTA1NDA4MDgyNTcxNDU0MDEwMTUyLw==" target=\"_blank\">tribalNerd</a> <b>From:</b> <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3RlY2huZXJkaWEuY29tLw==" target=\"_blank\">techNerdia - Web Development Tips</a></li><li><b><a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cHM6Ly9wbHVzLmdvb2dsZS5jb20vdS8wLzEwODA0NjIyNTkxMzk2NTMxNTU5NC9wb3N0cw==" target=\"_blank\">Follow techNerdia on Google+</a></li></ul></div><p
align="center">~ <b>Thank you for subscribing to techNerdia.com - Please Share This Post With Others</b> ~</p></p> <img
src="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=1135" width="1" height="1" style="display: none;" />]]></content:encoded> <wfw:commentRss>http://technerdia.com/1135_robots-txt-manager.html/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Customize the Admin Bar with the WP My Admin Bar WordPress Plugin</title><link>http://technerdia.com/1039_admin-bar.html</link> <comments>http://technerdia.com/1039_admin-bar.html#comments</comments> <pubDate>Wed, 07 Mar 2012 18:36:32 +0000</pubDate> <dc:creator>tribalNerd</dc:creator> <category><![CDATA[Plugins]]></category> <category><![CDATA[Wordpress]]></category> <guid
isPermaLink="false">http://technerdia.com/?p=1039</guid> <description><![CDATA[The ‘Wp My Admin Bar‘ Plugin is a Multisite Plugin, which expands on the default WordPress Admin Bar, adding 3 new quick access menus.<p><div
style="border-top:1px dotted #cccccc;clear:both;font-size:14px;font-weight:bold;margin:2px 10px;padding:0 10px;text-align:left;"><ul><li><b>New Wordpress Plugin</b> <a
href="http://technerdia.com/projects/adminbar/plugin.html" target="_blank">WP My Admin Bar</a> (It's Free, Download Today!)</li><li><b>Reading:</b> <a
href="http://technerdia.com/1039_admin-bar.html">Customize the Admin Bar with the WP My Admin Bar WordPress Plugin</a> <b>By:</b> <a
href="https://plus.google.com/105408082571454010152/" target="_blank">tribalNerd</a> <b>From:</b> <a
href="http://technerdia.com/" target="_blank">techNerdia - Web Development Tips</a></li><li><b><a
href="https://plus.google.com/u/0/108046225913965315594/posts" target="_blank">Follow techNerdia on Google+</a></li></ul></div><p
align="center">~ <b>Thank you for subscribing to techNerdia.com - Please Share This Post With Others</b> ~</p></p> ]]></description> <content:encoded><![CDATA[<p><a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3RlY2huZXJkaWEuY29tL3Byb2plY3RzL2FkbWluYmFyL3NjcmVlbnNob3RzLmh0bWw=" title=\"View Screenshots of the WP My Admin Bar WordPress Plugin\"><img
src="http://technerdia.com/files/myadminbar.jpg" alt="WP My Admin Bar WordPress Plugin" width="587" height="216" class="aligncenter" /></a></p><p><strong>Q) How Do You Customize The WordPress Admin Bar?<br
/> A) With the <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3dvcmRwcmVzcy5vcmcvZXh0ZW5kL3BsdWdpbnMvd3AtbXktYWRtaW4tYmFyLw==" target=\"_blank\">WP My Admin Bar WordPress Plugin</a>, of course!</strong></p><p>The WP My Admin Bar is here because of a friend&#8230; About mid 2011 I created three standalone mu-plugins, a plugin for each of the new menus this plugin creates. The  mu-plugin setup was great, for myself&#8230; but once a friend needed it, the headache of updates quickly became apparent.</p><p>This is what motivated me to migrate the mu-plugin version to a full WordPress plugin, my actual first released plugin through the WordPress plugin repository!</p><p>So&#8230; here you go, <strong>I present to you, the WP My Admin Bar Multisite WordPress Plugin.</strong></p><ul
class="buttOptions three"><li><a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3RlY2huZXJkaWEuY29tL3Byb2plY3RzL2FkbWluYmFyL3BsdWdpbi5odG1s" class=\"postButton\"><span>Plugin Details</span></a></li><li><a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3RlY2huZXJkaWEuY29tL3Byb2plY3RzL2FkbWluYmFyL2ZhcS5odG1s" class=\"postButton\"><span>F.A.Q.</span></a></li><li><a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3RlY2huZXJkaWEuY29tL3Byb2plY3RzL3NjcmVlbnNob3RzLmh0bWw=" class=\"postButton\"><span>Screenshots</span></a></li></ul><div
class="br">&nbsp;</div><p>The <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3dvcmRwcmVzcy5vcmcvZXh0ZW5kL3BsdWdpbnMvd3AtbXktYWRtaW4tYmFyLw==" target=\"_blank\">WP My Admin Bar WordPress Plugin</a> creates three new quick access menus directly on the WordPress Admin Bar.</p><p><strong>The three menus are</strong>: My Sites, My Cache and My Tools.</p><hr
/><p>The Plugin does not remove or disable the current Admin Bar. The menus are added to the current admin bar, which allows the built in WordPress security features and Admin Bar features to function as you would expect.</p><p><strong>Other Features Include</strong>: Being able to remove the WordPress Logo from the Admin Bar, remove the Howdy statement and for multisite setups: Remove the WP Icon from the My Sites menu and replace it with Site ID’s.</p><p
class="textcenter"><strong><a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3RlY2huZXJkaWEuY29tL3Byb2plY3RzL2FkbWluYmFyL3BsdWdpbi5odG1s">Read more about the WP My Admin Bar Wordrpess Plugin</a></p><hr
/><p
class="textcenter"><a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3RlY2huZXJkaWEuY29tL3Byb2plY3RzL2FkbWluYmFyL3NjcmVlbnNob3RzLmh0bWw=">View Screenshots</a> | <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3RlY2huZXJkaWEuY29tL3Byb2plY3RzL2FkbWluYmFyL2ZhcS5odG1s">Read the F.A.Q.</a> | <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3dvcmRwcmVzcy5vcmcvZXh0ZW5kL3BsdWdpbnMvd3AtbXktYWRtaW4tYmFyLw==">Download it Today</a></strong></p><hr
/><p><div
style="border-top:1px dotted #cccccc;clear:both;font-size:14px;font-weight:bold;margin:2px 10px;padding:0 10px;text-align:left;"><ul><li><b>New WordPress Plugin</b> <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3RlY2huZXJkaWEuY29tL3Byb2plY3RzL2FkbWluYmFyL3BsdWdpbi5odG1s" target=\"_blank\">WP My Admin Bar</a> (It's Free, Download Today!)</li><li><b>Reading:</b> <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3RlY2huZXJkaWEuY29tLzEwMzlfYWRtaW4tYmFyLmh0bWw=">Customize the Admin Bar with the WP My Admin Bar WordPress Plugin</a> <b>By:</b> <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cHM6Ly9wbHVzLmdvb2dsZS5jb20vMTA1NDA4MDgyNTcxNDU0MDEwMTUyLw==" target=\"_blank\">tribalNerd</a> <b>From:</b> <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3RlY2huZXJkaWEuY29tLw==" target=\"_blank\">techNerdia - Web Development Tips</a></li><li><b><a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cHM6Ly9wbHVzLmdvb2dsZS5jb20vdS8wLzEwODA0NjIyNTkxMzk2NTMxNTU5NC9wb3N0cw==" target=\"_blank\">Follow techNerdia on Google+</a></li></ul></div><p
align="center">~ <b>Thank you for subscribing to techNerdia.com - Please Share This Post With Others</b> ~</p></p> <img
src="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=1039" width="1" height="1" style="display: none;" />]]></content:encoded> <wfw:commentRss>http://technerdia.com/1039_admin-bar.html/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Add Google Code SyntaxHighlighter to WordPress without using a Plugin</title><link>http://technerdia.com/885_syntaxhighlighter.html</link> <comments>http://technerdia.com/885_syntaxhighlighter.html#comments</comments> <pubDate>Tue, 21 Feb 2012 21:05:51 +0000</pubDate> <dc:creator>tribalNerd</dc:creator> <category><![CDATA[Customizing]]></category> <category><![CDATA[Wordpress]]></category> <category><![CDATA[code]]></category> <category><![CDATA[google]]></category> <category><![CDATA[javascript]]></category> <category><![CDATA[markup]]></category> <category><![CDATA[php]]></category> <category><![CDATA[wp]]></category> <category><![CDATA[xml]]></category> <guid
isPermaLink="false">http://technerdia.com/?p=885</guid> <description><![CDATA[Instantly transform code/scripts/markup (php, html, css, java, etc) into a readable and downloadable example code.<p><div
style="border-top:1px dotted #cccccc;clear:both;font-size:14px;font-weight:bold;margin:2px 10px;padding:0 10px;text-align:left;"><ul><li><b>New Wordpress Plugin</b> <a
href="http://technerdia.com/projects/adminbar/plugin.html" target="_blank">WP My Admin Bar</a> (It's Free, Download Today!)</li><li><b>Reading:</b> <a
href="http://technerdia.com/885_syntaxhighlighter.html">Add Google Code SyntaxHighlighter to WordPress without using a Plugin</a> <b>By:</b> <a
href="https://plus.google.com/105408082571454010152/" target="_blank">tribalNerd</a> <b>From:</b> <a
href="http://technerdia.com/" target="_blank">techNerdia - Web Development Tips</a></li><li><b><a
href="https://plus.google.com/u/0/108046225913965315594/posts" target="_blank">Follow techNerdia on Google+</a></li></ul></div><p
align="center">~ <b>Thank you for subscribing to techNerdia.com - Please Share This Post With Others</b> ~</p></p> ]]></description> <content:encoded><![CDATA[<p>The <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2NvZGUuZ29vZ2xlLmNvbS9wL3N5bnRheGhpZ2hsaWdodGVyLw==" target=\"_blank\">Google Code SyntaxHighlighter</a> instantly transforms code/scripts/markup (php, html, css, java, etc) into a readable and downloadable example code.</p><p><img
src="http://technerdia.com/files/syntaxhighlighter.jpg" alt="Google Syntax Highlighter Example" width="697" height="179" class="aligncenter" /></p><p><strong>Disclaimer:</strong> <em>If your Website has an active Syntax Highlighter installed on it, then you must replace the old Syntax Highlighter wraps with the style used by the Google SyntaxHighlighter. Otherwise your code examples will break.</em></p><p
class="alignCenter"><strong><em>Keep Current Syntax Highlighter Plugins / Scripts Active Until All Old Examples Have Been Replaced!</em></strong></p><hr
/><h2>Why use the Google SyntaxHighlighter?</h2><p>Because it&#8217;s pretty dang good! Of course, having the source code has massive advantages too. Also, not loading more brushes than your site may use, along with the ability to customize the look to your desires.</p><p>The SyntaxHighlighter currently Supports: C++, C#, CSS, Delphi, Java, JavaScript, PHP, Python, Ruby, Sql, VB, and XML/HTML markup and code types. [ <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2NvZGUuZ29vZ2xlLmNvbS9wL3N5bnRheGhpZ2hsaWdodGVyL3dpa2kvTGFuZ3VhZ2Vz" target=\"_blank\">source</a> ]</p><h2>How Does The Google SyntaxHighlighter Work?</h2><p>It uses Javascript to find the HTML Pre tag and parse the &#8216;code&#8217; data within it. The Pre tag contains the type of code being displayed, allowing a filter to be called that translates the code or markup to readable text within the browser rather than rendering it with the Webpage markup.</p><p><strong>Example Pre Tag</strong>:</p><div
class="mycode"><pre name="code" class="html">&lt;pre name=&quot;code&quot; class=&quot;html&quot;&gt;/* html markup here */&lt;/pre&gt;</pre></div><h2>Adding the SyntaxHighlighter to your WordPress Blog</h2><p>First, <strong><a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2NvZGUuZ29vZ2xlLmNvbS9wL3N5bnRheGhpZ2hsaWdodGVyL2Rvd25sb2Fkcy9kZXRhaWw/bmFtZT1TeW50YXhIaWdobGlnaHRlcl8xLjUuMS5yYXI=" target=\"_blank\">download the SyntaxHighlighter rar file</a></strong> from Google Code. After you unRAR (<a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy43LXppcC5vcmcv" target=\"_blank\">7zip</a>) the file, finally open the dp.SyntaxHighlighter directory.</p><p>Within the directory will be three sub-folders:</p><ul><li><strong>Scripts</strong>: Core code and brush script files.</li><li><strong>Styles</strong>: The core CSS file.</li><li><strong>Uncompressed</strong>: Ignore</li></ul><h3>Let&#8217;s Get Started&#8230;</h3><p><strong>The CSS File</strong></p><ul><li>Enter the Styles directory, open the SyntaxHighlighter.css file, select all and copy the entire file.</li><li>Open your themes style.css file, paste the SyntaxHighlighter css data into your themes css file. I put this at the bottom of my css files, below the mobile goodies, sprites, etc.</li><li>Save the file and upload it to your WordPress theme directory.</li></ul><p><strong>The Core</strong></p><ul><li>Go back and into the Scripts directory.</li><li>Find the shCore.js file and right click the file and rename it to: SyntaxHighlighter.js</li></li><li>Open the file in Notepad or <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5mbG9zLWZyZWV3YXJlLmNoL25vdGVwYWQyLmh0bWw=" target=\"_blank\">Notepad2</a> (what I use) or <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL25vdGVwYWQtcGx1cy1wbHVzLm9yZy9kb3dubG9hZC92NS45LjguaHRtbA==" target=\"_blank\">Notepad+</a></li><li>Leave the file open&#8230;.</li></ul><p><strong>The Brushes</strong><br
/> Brushes, is a term (or name) used to identify the highlighter script for a type of code or script being displayed.</p><p>For example, within the Scripts folder is shBrushCSS.js &#8211; This file would be called when displaying a CSS file within the &#8216;pre&#8217; tag.</p><ul><li><a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2NvZGUuZ29vZ2xlLmNvbS9wL3N5bnRheGhpZ2hsaWdodGVyL3dpa2kvTGFuZ3VhZ2Vz" target=\"_blank\">View All Possible Code Languages That Can Be Called.</a></li></ul><p>Most Websites will use only a few Brushes. techNerdia for example uses these brushes: CSS, Javascript, PHP, XML/HTML and SQL. These are the only loaded brushes, the others have been ignored.</p><ul><li>Open the brush files that you&#8217;ll be using on your Website.</li><li>Select all and copy the contents of one of the brush file.</li><li>Return to the already opened SyntaxHighlighter.js file, scroll to the very bottom (last line) and paste the Brush code in.</li><li>Repeat this for each Brush type that you&#8217;ll be using.</li><li>Save the file when done. Uplaod the SyntaxHighlighter.js file to your Website/Server. I uploaded mine to domain.com/js/</li></ul><p><strong>Note</strong>: The Scripts directory contains a flash file named clipboard.swf. I could not get this feature working, so I&#8217;ve excluded it.</p><h3>Turning on the SyntaxHighlighter</h3><p>With the CSS data and SyntaxHighlighter.js files uploaded, it&#8217;s time to activate the highlighter.</p><p>** <strong>Do Not Disable</strong> Other highlighter Plugins Yet!!!</p><ul><li>Open your themes footer.php file, scroll to the bottom and find wp_footer().</li><li>Paste the snip below, above the wp_footer() line and above your Google Analytics code, if it&#8217;s in the footer.</li><li>Adjust the URL to the SyntaxHighlighter.js file, save the file, and upload to your theme or /js directory.</li></ul><div
class="mycode"><pre name="code" class="php">
&lt;?php if( is_singular() ){
&lt;script language=&quot;javascript&quot; src=&quot;http://domain.com/js/SyntaxHighlighter.js&quot;&gt;&lt;/script&gt;
&lt;script language=&quot;javascript&quot;&gt;
	dp.SyntaxHighlighter.HighlightAll(&#39;code&#39;);
&lt;/script&gt;
} ?&gt;
</pre></div><h3>Test the SyntaxHighlighter</h3><p>Easy enough&#8230;.</p><ul><li>Go into your WordPress Admin and CLEAR THE CACHE!</li><li>Create a new post, add the snip below to the body of the post, save the post as a draft, and preview it.</li></ul><div
class="mycode"><pre name="code" class="html"><pre name="code" class="html"><b>It's Working!</b></pre></pre></div><p>The class=&#8221;html&#8221; is what tells the script which brush to load. Change it to php, js, css, etc to display different code/markup types.</p><p>If something isn&#8217;t working, then a step is missing: Check the URL to the SyntaxHighlighter.js file, check that the Brushes have been added to the bottom of the file. Make sure the CSS data has been uploaded or added to your root css file. Ensure the footer call is above the wp_footer() line. Clear the caches again. Try a different brush. Try a different browser.</p><h3>Removing What Isn&#8217;t Used</h3><p>It&#8217;s time to find and replace a few things&#8230; with SyntaxHighlighter.js file open:</p><ul><li>Do a find for: <em>copy to clipboard</em></li><li>Remove the <em>copy to clipboard</em> words <strong>only</strong>.</li><li>Do a find for: <em>print</em> it will be within a label, like: label:&#8217;print&#8217;</li><li>Remove the word <em>print</em> <strong>only</strong>.</li></ul><p>The last removal is optional, it&#8217;s the question mark ? that contains the about information. If you remove this, you should give credit some place&#8230;. like making a blog post about the <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2NvZGUuZ29vZ2xlLmNvbS9wL3N5bnRheGhpZ2hsaWdodGVyLw==" target=\"_blank\">SyntaxHighlighter</a>.</p><ul><li>To remove, do a find for: <em>label:&#8217;?&#8217;</em></li><li>Remove the <em>question mark ?</em> <strong>only</strong>.</li></ul><ul><li>Save your work, re-upload the file and retest.</li></ul><h2>Customizing the Look of the SyntaxHighlighter</h2><p>The Pre tag wrapper for the code has one customization that can be added to it. It&#8217;s a :collapse feature, which closes the code example when the page is loaded, and opening when clicked.</p><p>Example:</p><div
class="mycode"><pre name="code" class="html:collapse">&lt;pre name=&quot;code&quot; class=&quot;html:collapse&quot;&gt;/* html markup here */&lt;/pre&gt;</pre></div><h2>Wrap the Pre Tag Within a Class</h2><p>This isn&#8217;t mandatory to get the code working, but it does help if for some reason the JavaScript brushes do not load, and it makes the code display.</p><p>Add a class called &#8216;mycode&#8217; around the Pre tag of your code, then define it within your themes CSS file.</p><p><strong>Example</strong>:</p><div
class="mycode"><pre name="code" class="html">&lt;div class=&quot;mycode&quot;&gt;&lt;pre name=&quot;code&quot; class=&quot;html&quot;&gt;/* the sample */&lt;/pre&gt;&lt;/div&gt;</pre></div><p><strong>mycode Class</strong>:</p><div
class="mycode"><pre name="code" class="css">
.mycode {
	border-bottom:1px dotted #aaaaaa;
	color:#006400;
	font-size:11px;
	line-height:16px;
	margin: -5px 0 20px 0;
	padding:0;
}
</pre></div><h3>The Main CSS File</h3><p>If the visual display of the code does not match design, then open the CSS file that contains the SyntaxHighlighter CSS data.</p><p><strong>The main wrapper</strong>: .dp-highlighter<br
/> Adjust the background color, typically this color should be different than your body color of your page, to help the code example stand out.</p><p>You may also want to add a line-height, larger than 12px and increase the padding around each line, this helps with readability.</p><p><strong>Example</strong>:</p><div
class="mycode"><pre name="code" class="css">
line-height:22px;
padding:10px 0;
</pre></div><p><strong>Complete</strong>:</p><div
class="mycode"><pre name="code" class="css">
.dp-highlighter {
	background:#ffffff;
	background-color:#ffffff;
	font-family:"Consolas", "Courier New", Courier, mono, serif;
	font-size:12px;
	line-height:22px;
	margin:18px 0 18px 0 !important;
	overflow:auto;
	padding:10px 0;
	width:99%;
}
</pre></div><p><strong>Rounded corners</strong>: Add the CSS below to the .dp-highlighter class.</p><div
class="mycode"><pre name="code" class="css">.dp-highlighter { -moz-border-radius: 9px; -webkit-border-radius: 9px; -khtml-border-radius: 9px; border-radius: 9px; }</pre></div><p><strong>Color Changes</strong>:
If you&#8217;ve adjusted the background color, you&#8217;ll probably want to adjust the other color settings. Do a find for the classes below, and adjust the color or background color setting.</p><div
class="mycode"><pre name="code" class="css">
.dp-highlighter ol /* base number colors */
.dp-highlighter .columns div /* odd number colors, I think */
.dp-highlighter .columns /* even numbers */
.dp-highlighter .tools /* toolbar colors */
.dp-highlighter .tools a /* link color in toolbar */
</pre></div><p>The last bit of the CSS information controls the colors of the code within the example. Adjust as needed.</p><h2>Cleanup And Disable SyntaxHighlighter Plugins</h2><p>Update old posts to use the new Pre tag wrapper, then disable old Syntax Highlighter Plugins and code.</p><p>It may seem obvious, but make sure you check check your work!!!</p><hr
/><h4>Have a comment? Find an error? Would you like to improve on this article?</h4><p>Then shoot me some <a
href="http://technerdia.com/feedback.html" target="_blank">feedback</a>!</p><br
/><p><div
style="border-top:1px dotted #cccccc;clear:both;font-size:14px;font-weight:bold;margin:2px 10px;padding:0 10px;text-align:left;"><ul><li><b>New WordPress Plugin</b> <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3RlY2huZXJkaWEuY29tL3Byb2plY3RzL2FkbWluYmFyL3BsdWdpbi5odG1s" target=\"_blank\">WP My Admin Bar</a> (It's Free, Download Today!)</li><li><b>Reading:</b> <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3RlY2huZXJkaWEuY29tLzg4NV9zeW50YXhoaWdobGlnaHRlci5odG1s">Add Google Code SyntaxHighlighter to WordPress without using a Plugin</a> <b>By:</b> <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cHM6Ly9wbHVzLmdvb2dsZS5jb20vMTA1NDA4MDgyNTcxNDU0MDEwMTUyLw==" target=\"_blank\">tribalNerd</a> <b>From:</b> <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3RlY2huZXJkaWEuY29tLw==" target=\"_blank\">techNerdia - Web Development Tips</a></li><li><b><a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cHM6Ly9wbHVzLmdvb2dsZS5jb20vdS8wLzEwODA0NjIyNTkxMzk2NTMxNTU5NC9wb3N0cw==" target=\"_blank\">Follow techNerdia on Google+</a></li></ul></div><p
align="center">~ <b>Thank you for subscribing to techNerdia.com - Please Share This Post With Others</b> ~</p></p> <img
src="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=885" width="1" height="1" style="display: none;" />]]></content:encoded> <wfw:commentRss>http://technerdia.com/885_syntaxhighlighter.html/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Live jQuery Cart &#8211; Instant Update of Shopping Cart Totals</title><link>http://technerdia.com/758_live-jquery-cart.html</link> <comments>http://technerdia.com/758_live-jquery-cart.html#comments</comments> <pubDate>Thu, 09 Feb 2012 20:53:59 +0000</pubDate> <dc:creator>tribalNerd</dc:creator> <category><![CDATA[jQuery]]></category> <category><![CDATA[formatCurrency]]></category> <category><![CDATA[math]]></category> <category><![CDATA[replaceWith]]></category> <category><![CDATA[shopping cart]]></category> <guid
isPermaLink="false">http://technerdia.com/?p=758</guid> <description><![CDATA[Live Shopping Cart - Update the quantity field, and watch the cart totals update live!<p><div
style="border-top:1px dotted #cccccc;clear:both;font-size:14px;font-weight:bold;margin:2px 10px;padding:0 10px;text-align:left;"><ul><li><b>New Wordpress Plugin</b> <a
href="http://technerdia.com/projects/adminbar/plugin.html" target="_blank">WP My Admin Bar</a> (It's Free, Download Today!)</li><li><b>Reading:</b> <a
href="http://technerdia.com/758_live-jquery-cart.html">Live jQuery Cart &#8211; Instant Update of Shopping Cart Totals</a> <b>By:</b> <a
href="https://plus.google.com/105408082571454010152/" target="_blank">tribalNerd</a> <b>From:</b> <a
href="http://technerdia.com/" target="_blank">techNerdia - Web Development Tips</a></li><li><b><a
href="https://plus.google.com/u/0/108046225913965315594/posts" target="_blank">Follow techNerdia on Google+</a></li></ul></div><p
align="center">~ <b>Thank you for subscribing to techNerdia.com - Please Share This Post With Others</b> ~</p></p> ]]></description> <content:encoded><![CDATA[<p><img
src="http://technerdia.com/files/jquery-cart.gif" alt="jQuery Shopping Cart Example" title="jquery-cart" width="470" height="285" class="aligncenter size-full wp-image-803" /></p><h2>Why a Live jQuery Cart?</h2><p>Customers love a simple shopping experience&#8230; with that, a short join process that includes the totals up front, produces less junk form submits, thus better form conversion ratios. This is uniquely important when it comes to split testing a live cart. Because the live cart has very low junk submits, a micro change to the form (be it design, location of the form, wording, a second step, etc), can &#8220;easily&#8221; be identified as positive or negative in the ratios.</p><ul
class="buttOptions three"><li><a
href="http://demo.technerdia.com/jquery-cart/" target="_blank" class="postButton" onClick="javascript: _gaq.push(['_trackPageview', 'Live jQuery Cart &#8211; Instant Update of Shopping Cart Totals', 'VIEW', 'Live jQuery Cart &#8211; Instant Update of Shopping Cart Totals']);"><span>View the Demo</span></a></li><li><a
href="http://technerdia.com/files/live-jquery-cart.zip" target="_blank" class="postButton" onClick="javascript: _gaq.push(['_trackPageview', '/files/live-jquery-cart.zip', 'ZIP', '/files/live-jquery-cart.zip']);"><span>Download Demo</span></a></li><li><a
href="http://technerdia.com/files/live-jquery-cart.pdf" target="_blank" class="postButton" onClick="javascript: _gaq.push(['_trackPageview', '/files/live-jquery-cart.pdf', 'PDF', '/files/live-jquery-cart.pdf']);"><span>Download PDF</span></a></li></ul><div
class="br">&nbsp;</div><p><em>** Let me know what you think by dropping a quick <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=I2NvbW1lbnQ=">comment below</a>, or hit me up on <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cHM6Ly9wbHVzLmdvb2dsZS5jb20vdS8wLzEwODA0NjIyNTkxMzk2NTMxNTU5NC9wb3N0cw==" target=\"_blank\">Google+</a> or you can <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3RlY2huZXJkaWEuY29tL2ZlZWRiYWNr" target=\"_blank\">email me feedback</a> directly</em>!</p><hr
/><h2>How does the Live jQuery Cart Work?</h2><p>When the quantity field is updated, the jQuery script is called, which takes the value of quantity and multiplies it by the retail and for sale price values. The retail, today&#8217;s price, savings totals and a hidden input price field get instantly updated by using the jQuery replaceWith function.</p><h2>Breaking down the Live jQuery Cart</h2><h3>The Form</h3><p>The form includes three price point displays, the retail cost, today&#8217;s special and current savings. When the quantity input field is modified, the jQuery is called, adjusting the three totals.</p><div
class="mycode"><pre name="code" class="html"><div class="cart">

    <div class="price">
        <div class="retail">
            <p>Retail Cost</p>
            <span class="pRetail">$125.00</span>
        </div>
        <div class="today">
            <p>Today's Special</p>
            <span class="pToday">$80.00</span>
        </div>
        <br style="clear:both" />
    </div>
    <div class="savings">Current Savings: <span class="save">$45.00</span></div>

    <form action="" method="post">
        <input type="hidden" name="price" value="" class="input" />
        <p><label>Quantity: <input type="text" name="quantity" size="2" value="1" /></label></p>
        <input type="submit" class="addCart" />
    </form>
</div></pre></div><h3>The CSS</h3><p>The CSS contains nothing fancy. The only trick to it is the button, which is displayed through a background call so the transparency works.</p><div
class="mycode"><pre name="code" class="css">/*
  Name: Live jQuery Cart
  URI: http://techNerdia.com/
  Author: tribalNerd
*/
.cart {
	margin:0 auto;
	width:430px;
}
.price {
	margin:15px auto;
	text-align:center;
	width:325px;
}
.retail {
	color:#cc0000;
	float:left;
	font-size:14px;
	font-weight:bold;
	margin:0 0 2px 0;
	text-align:center;
	width:43%;
}
.today {
	color:#7241a8;
	float:right;
	font-size:14px;
	font-weight:bold;
	margin:0 0 2px 0;
	text-align:center;
	width:43%;
}
.retail p, .today p { margin:0 0 2px 0; }
.pRetail, .pToday {
	font-size:32px;
	font-weight:bold;
	line-height:34px;
}
.pRetail {
	text-decoration:line-through;
}
.savings, .save {
	color:#337147;
	font-size:22px;
	font-weight:bold;
	text-align:center;
}
.cart form, .cart label {
	margin:0 auto;
	padding:0;
	width:427px;
}
.cart form p, .cart label { text-align:center; }
.addCart {
	background:url('cartButton.png')no-repeat;
	background-image:url('cartButton.png');
	background-position:0 0;
	background-repeat:no-repeat;
	border:0;
	display:block;
	height:110px;
	margin:0 auto;
	padding:0;
	text-indent: -9999px;
	width:427px;
}</pre></div><h3>The jQuery Cart</h3><p>The jquery-cart.js file is a fun one&#8230;.<ul><li>The script starts off by detecting the key change within the quantity field, it then scrubs the form (to blank) if the quantity field starts with a zero, a letter or a period.</li><li>After the input value is good, the script checks to see if the quantity value is blank, zero or set to one &#8211; for display purposes. If so, the default prices kicks in. Else, the quanity field is 2 or more and the math starts.</li><li>The math takes the quantity value and multiplies it by the retail or price value (today&#8217;s cost). The saved value is the difference between the retail cost and today&#8217;s cost.</li><li>Finally the output happens: When the quantity field updates, the the jQuery executes a <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2FwaS5qcXVlcnkuY29tL3JlcGxhY2VXaXRoLw==" target=\"_blank\">replaceWith function</a>. This replaces the 4 html elements above (based on the class names), with the 4 new html lines from the jquery-cart.js file (below the /* output */ line). This is what makes the price values change on the fly.</li></ul><div
class="mycode"><pre name="code" class="js">$('input[name=quantity]').keyup( function() {
	var value = $(this).attr("value");
	while ( value.substring(0, 1) === '0' || value.length > 3 ) { 	/* no leading zero, max 3 chars */
        value = value.substring(1);									/* return to nothing */
    }
	value = value.replace(/[^0-9\.]/g,'');							/* numbers only */
	value = value.replace(/\./g,'');								/* no periods */
	$(this).val(value);
	var real = '125.00'; 	/* retail price */
	var cost = '80.00'; 	/* for sale price */
		if ( value == '' || value == "0" || value == "1" ) { 		/* default */
			var retail = '';
			var saved = '';
			value = '1';
			retail = real;
			saved = real - cost;
		}else{
			var total_cost = '';
			var retail = '';
			var saved = '';
			total_cost = parseInt(value) * cost;
			retail = parseInt(value) * real;
			saved = retail - total_cost;
		}
	var total = '';
	total = parseInt(value) * cost;
/* output */
	$(".pRetail").replaceWith('<span class="pRetail">' + retail + '</span>');
	$(".pRetail").formatCurrency();
	$(".pToday").replaceWith('<span class="pToday">' + total + '</span>');
	$(".pToday").formatCurrency();
	$(".save").replaceWith('<span class="save">' + saved + '</span>');
	$(".save").formatCurrency();
	$(".input").replaceWith('<input type="hidden" name="price" value="' + total + '" class="input" />');
	$(".input").formatCurrency();
} );</pre></div><h2>Required Changes</h2><p>Within the jquery-cart.js file, Lines 9 and 10 need to be updated. Line 9 is the retail price of the product. Line 10 is the for sale price.</p><div
class="mycode"><pre name="code" class="php">var real = '125.00'; /* retail price */
var cost = '80.00'; /* for sale price */</pre></div><p>The jquery-cart.js also contains 4 <strong>replaceWith</strong> lines, when the jQuery file is executed the replaceWith commands updates the HTML in the form.</p><p><strong>The replaceWith lines from the jquery-cart.js file.</strong></p><div
class="mycode"><pre name="code" class="php">$(".pRetail").replaceWith('<span class="pRetail">' + retail + '</span>');
$(".pToday").replaceWith('<span class="pToday">' + total + '</span>');
$(".save").replaceWith('<span class="save">' + saved + '</span>');
$(".input").replaceWith('<input type="hidden" name="price" value="' + total + '" class="input" />');</pre></div><p>The above jQuery lines are: line 28, 30, 32 and 34. Below are related the HTML lines from the form. The lines are: Line 6, Line 10, Line 14 and Line 17. The jQuery lines, update the HTML lines, and it does this by matching the class names.</p><p><strong>Matching lines from the HTML Form.</strong></p><div
class="mycode"><pre name="code" class="html"><span class="pRetail">$125.00</span>
<span class="pToday">$80.00</span>
<span class="save">$45.00</span>
<input type="hidden" name="price" value="" class="input" /></pre></div><p>In most cases, the replaceWith and related HTML lines will need to be updated to match your Websites shopping cart forms. Most shopping carts require extra hidden values to be passed in, like the quantity and many other possible values. Static fields, like store names go into the HTML form directly and would not need to be replaced.</p><h2>The Currency</h2><p>The rounding of the currency and currency used, is managed by <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2NvZGUuZ29vZ2xlLmNvbS9wL2pxdWVyeS1mb3JtYXRjdXJyZW5jeS8=" target=\"_blank\">jQuery Format Currency Plugin</a> available at Google Code.<h3>Demo and Download the Live jQuery Cart</h3><ul
class="buttOptions three"><li><a
href="http://demo.technerdia.com/jquery-cart/" target="_blank" class="postButton" onClick="javascript: _gaq.push(['_trackPageview', 'Live jQuery Cart &#8211; Instant Update of Shopping Cart Totals', 'VIEW', 'Live jQuery Cart &#8211; Instant Update of Shopping Cart Totals']);"><span>View the Demo</span></a></li><li><a
href="http://technerdia.com/files/live-jquery-cart.zip" target="_blank" class="postButton" onClick="javascript: _gaq.push(['_trackPageview', '/files/live-jquery-cart.zip', 'ZIP', '/files/live-jquery-cart.zip']);"><span>Download Demo</span></a></li><li><a
href="http://technerdia.com/files/live-jquery-cart.pdf" target="_blank" class="postButton" onClick="javascript: _gaq.push(['_trackPageview', '/files/live-jquery-cart.pdf', 'PDF', '/files/live-jquery-cart.pdf']);"><span>Download PDF</span></a></li></ul><div
class="br">&nbsp;</div><ul><li><strong>The zip file contains</strong>: jquery-cart.js, form.html, cartButton.png, style.css and the PDF eBook.<li><a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2NvZGUuZ29vZ2xlLmNvbS9wL2pxdWVyeS1mb3JtYXRjdXJyZW5jeS8=" target=\"_blank\">Download the jquery.formatCurrency-1.4.0.js file from Google Code.</a></li></ul><hr
/><h4>Let me know what you thought of this article by leaving me some quick <a
href="http://technerdia.com/feedback.html" target="_blank">feedback</a>.</h4><br
/><p><div
style="border-top:1px dotted #cccccc;clear:both;font-size:14px;font-weight:bold;margin:2px 10px;padding:0 10px;text-align:left;"><ul><li><b>New WordPress Plugin</b> <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3RlY2huZXJkaWEuY29tL3Byb2plY3RzL2FkbWluYmFyL3BsdWdpbi5odG1s" target=\"_blank\">WP My Admin Bar</a> (It's Free, Download Today!)</li><li><b>Reading:</b> <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3RlY2huZXJkaWEuY29tLzc1OF9saXZlLWpxdWVyeS1jYXJ0Lmh0bWw=">Live jQuery Cart &#8211; Instant Update of Shopping Cart Totals</a> <b>By:</b> <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cHM6Ly9wbHVzLmdvb2dsZS5jb20vMTA1NDA4MDgyNTcxNDU0MDEwMTUyLw==" target=\"_blank\">tribalNerd</a> <b>From:</b> <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3RlY2huZXJkaWEuY29tLw==" target=\"_blank\">techNerdia - Web Development Tips</a></li><li><b><a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cHM6Ly9wbHVzLmdvb2dsZS5jb20vdS8wLzEwODA0NjIyNTkxMzk2NTMxNTU5NC9wb3N0cw==" target=\"_blank\">Follow techNerdia on Google+</a></li></ul></div><p
align="center">~ <b>Thank you for subscribing to techNerdia.com - Please Share This Post With Others</b> ~</p></p> <img
src="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=758" width="1" height="1" style="display: none;" />]]></content:encoded> <wfw:commentRss>http://technerdia.com/758_live-jquery-cart.html/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Adding a Link to the WordPress Dashboard Menu that opens an Internal or External Page. [Updated]</title><link>http://technerdia.com/557_dashboard-link-in-wordpress.html</link> <comments>http://technerdia.com/557_dashboard-link-in-wordpress.html#comments</comments> <pubDate>Mon, 23 Jan 2012 09:20:16 +0000</pubDate> <dc:creator>tribalNerd</dc:creator> <category><![CDATA[Admin Area]]></category> <category><![CDATA[Wordpress]]></category> <category><![CDATA[layouts]]></category> <category><![CDATA[php]]></category> <category><![CDATA[statistics]]></category> <category><![CDATA[wp]]></category> <guid
isPermaLink="false">http://technerdia.com/?p=557</guid> <description><![CDATA[Easily add a Custom Link to your Dashboard Menu...<p><div
style="border-top:1px dotted #cccccc;clear:both;font-size:14px;font-weight:bold;margin:2px 10px;padding:0 10px;text-align:left;"><ul><li><b>New Wordpress Plugin</b> <a
href="http://technerdia.com/projects/adminbar/plugin.html" target="_blank">WP My Admin Bar</a> (It's Free, Download Today!)</li><li><b>Reading:</b> <a
href="http://technerdia.com/557_dashboard-link-in-wordpress.html">Adding a Link to the WordPress Dashboard Menu that opens an Internal or External Page. [Updated]</a> <b>By:</b> <a
href="https://plus.google.com/105408082571454010152/" target="_blank">tribalNerd</a> <b>From:</b> <a
href="http://technerdia.com/" target="_blank">techNerdia - Web Development Tips</a></li><li><b><a
href="https://plus.google.com/u/0/108046225913965315594/posts" target="_blank">Follow techNerdia on Google+</a></li></ul></div><p
align="center">~ <b>Thank you for subscribing to techNerdia.com - Please Share This Post With Others</b> ~</p></p> ]]></description> <content:encoded><![CDATA[<p><b>Updated</b>: <em>January 23, 2012</em> &#8211; This tip walks you through adding a Statistics link for Google Analytics within the WordPress Admin under the Dashboard tab. Then how to add multiple links to the Dashboard menu and finally how to open an internal page from the Dashboard menu.</p><p><b>Sources</b>:</p><ul><li><a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2NvZGV4LndvcmRwcmVzcy5vcmcv" target=\"_blank\">The WordPress Codex</a></li><li><a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2NvZGV4LndvcmRwcmVzcy5vcmcvQWRtaW5pc3RyYXRpb25fTWVudXM=" target=\"_blank\">Administration Menus</a></li></ul><h2>Adding a Link to the Dashboard of WordPress</h2><p>The example below is two functions. The second function (dashboardMenu) adds the link within the dashboard, then calls the first function (linkedPage).</p><h2>What To Do&#8230;</h2><ul><li>On Line 8 replace the <b>ENTER-YOUR-GOOGLE-ANALYTICS-URL-HERE</b> with your Google Analytics URL or any URL you wish to open.</li><li>On Line 10 replace YOUR-DOMAIN with your domain.</li></ul> <br
/><div
class="mycode"><pre name="code" class="php">
/* The Redirect Function */
function linkedPage(){
	if(!current_user_can('manage_options')){
		wp_die( __('You do not have sufficient permissions to access this page.'));
	}
?&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
	window.open(&quot;ENTER-YOUR-GOOGLE-ANALYTICS-URL-HERE&quot;); /* Update This Line */
	function delay(){
		window.location.href = &quot;http://YOUR-DOMAIN.com/wp-admin/index.php&quot;; /* Update This Line */
	}
&lt;/script&gt;
&lt;body onLoad=&quot;setTimeout('delay()', 4000)&quot;&gt;
&lt;? } /* end function */
/* Add Dashboard Link */
function dashboardMenu(){
	if(function_exists('add_submenu_page'))
	add_submenu_page('index.php', __('Statistics'), __('Statistics'), 'manage_options', 'stats', 'linkedPage');
} /* end function */
add_action('admin_menu', 'dashboardMenu');
</pre></div><h2>How Does It Work?</h2><p>When the Statistics link is clicked in the dashboard, the linkedPage function is called. This sets two Javascripts in action, the first opens Google Analytics in a tab-less browser window. The second redirect waits a few seconds, then returns back to your WordPress Admin homepage.</p><h2>Adding Multiple Dashboard Links</h2><p>Duplicate the linkedPage function and rename it, and adjust the urls within the Javascript. Then in the dashboardMenu function, duplicate the <em>add_submenu_page</em> line, adjust the link name and finally replace the linkedPage function with the new function name.</p> <br
/><div
class="mycode"><pre name="code" class="php">
/* Multiple Redirects */
function secondFunctionName(){
	if(!current_user_can('manage_options')){
		wp_die( __('You do not have sufficient permissions to access this page.'));
	}
?&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
	window.open(&quot;OUT-GOING-URL&quot;); /* Update This Line */
	function delay(){
		window.location.href = &quot;http://YOUR-DOMAIN.com/wp-admin/index.php&quot;; /* Update This Line */
	}
&lt;/script&gt;
&lt;body onLoad=&quot;setTimeout('delay()', 4000)&quot;&gt;
&lt;? } /* end function */
/* Add Dashboard Link */
function dashboardMenu(){
	if(function_exists('add_submenu_page'))
	add_submenu_page('index.php', __('Statistics'), __('Statistics'), 'manage_options', 'stats', 'linkedPage');
	add_submenu_page('index.php', __('New Link'), __('New Link'), 'manage_options', 'link', 'secondFunctionName');
} /* end function */
add_action('admin_menu', 'dashboardMenu');
</pre></div><h2>Opening an Internal Page</h2><p>Instead of redirecting to an outsideURL, you can open a page directly within the admin, then add all the links and goodies you like to that page.</p><p>The example below offers two methods for display HTML. The first is to include the html within the function &#8211; a much cleaner way of doing it, and the second is to display the html directly within the function.</p> <br
/><div
class="mycode"><pre name="code" class="php">
function linkedPage(){
	if(!current_user_can('manage_options')){
		wp_die( __('You do not have sufficient permissions to access this page.'));
	}
/* Method #1 - Include the HTML */
//include(&quot;full/path/to/file.php&quot;);
/* */
/* Method #2 - HTML within the Function */ ?&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;#&quot; target=&quot;_blank&quot;&gt;Bird is the Word&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;? }
function dashboardMenu(){
	if(function_exists('add_submenu_page'))
	add_submenu_page('index.php', __('My Page'), __('My Page'), 'manage_options', 'mypage', 'linkedPage');
}
add_action('admin_menu', 'dashboardMenu');
</pre></div><h3>Simple Enough!</h3><p>This can save you a bit of time and it can be twisted in many various ways. Add links to Feed Stats, Online Tools, Related Sites, Social Networks and whatever else you like.</p><hr
/><h4>If this article helped you then let me know by leaving some quick <a
href="http://technerdia.com/feedback.html" target="_blank">feedback</a>, thanks!</h4><br
/><p><div
style="border-top:1px dotted #cccccc;clear:both;font-size:14px;font-weight:bold;margin:2px 10px;padding:0 10px;text-align:left;"><ul><li><b>New WordPress Plugin</b> <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3RlY2huZXJkaWEuY29tL3Byb2plY3RzL2FkbWluYmFyL3BsdWdpbi5odG1s" target=\"_blank\">WP My Admin Bar</a> (It's Free, Download Today!)</li><li><b>Reading:</b> <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3RlY2huZXJkaWEuY29tLzU1N19kYXNoYm9hcmQtbGluay1pbi13b3JkcHJlc3MuaHRtbA==">Adding a Link to the WordPress Dashboard Menu that opens an Internal or External Page. [Updated]</a> <b>By:</b> <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cHM6Ly9wbHVzLmdvb2dsZS5jb20vMTA1NDA4MDgyNTcxNDU0MDEwMTUyLw==" target=\"_blank\">tribalNerd</a> <b>From:</b> <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3RlY2huZXJkaWEuY29tLw==" target=\"_blank\">techNerdia - Web Development Tips</a></li><li><b><a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cHM6Ly9wbHVzLmdvb2dsZS5jb20vdS8wLzEwODA0NjIyNTkxMzk2NTMxNTU5NC9wb3N0cw==" target=\"_blank\">Follow techNerdia on Google+</a></li></ul></div><p
align="center">~ <b>Thank you for subscribing to techNerdia.com - Please Share This Post With Others</b> ~</p></p> <img
src="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=557" width="1" height="1" style="display: none;" />]]></content:encoded> <wfw:commentRss>http://technerdia.com/557_dashboard-link-in-wordpress.html/feed</wfw:commentRss> <slash:comments>5</slash:comments> </item> <item><title>Remove slashes and the http from a URL &#8211; PHP Example</title><link>http://technerdia.com/667_domain-only.html</link> <comments>http://technerdia.com/667_domain-only.html#comments</comments> <pubDate>Wed, 18 Jan 2012 13:17:41 +0000</pubDate> <dc:creator>tribalNerd</dc:creator> <category><![CDATA[Functions]]></category> <category><![CDATA[PHP Examples]]></category> <category><![CDATA[domain]]></category> <category><![CDATA[example]]></category> <category><![CDATA[preg_replace]]></category> <category><![CDATA[urldecode]]></category> <guid
isPermaLink="false">http://technerdia.com/?p=667</guid> <description><![CDATA[Simple PHP Snip, decodes an encoded url, strips away the end slash from the url, then remove the http:// from the URL, leaving only the domain.com to deal with.<p><div
style="border-top:1px dotted #cccccc;clear:both;font-size:14px;font-weight:bold;margin:2px 10px;padding:0 10px;text-align:left;"><ul><li><b>New Wordpress Plugin</b> <a
href="http://technerdia.com/projects/adminbar/plugin.html" target="_blank">WP My Admin Bar</a> (It's Free, Download Today!)</li><li><b>Reading:</b> <a
href="http://technerdia.com/667_domain-only.html">Remove slashes and the http from a URL &#8211; PHP Example</a> <b>By:</b> <a
href="https://plus.google.com/105408082571454010152/" target="_blank">tribalNerd</a> <b>From:</b> <a
href="http://technerdia.com/" target="_blank">techNerdia - Web Development Tips</a></li><li><b><a
href="https://plus.google.com/u/0/108046225913965315594/posts" target="_blank">Follow techNerdia on Google+</a></li></ul></div><p
align="center">~ <b>Thank you for subscribing to techNerdia.com - Please Share This Post With Others</b> ~</p></p> ]]></description> <content:encoded><![CDATA[<p>The PHP example below takes an encoded URL, decodes it, then strips away the slashes and http, leaving only the domain.com to deal with.</p><p><strong>The Snip:</strong></p><div
class="mycode"><pre name="code" class="php">preg_replace( "#^[^:/.]*[:/]+#i", "", preg_replace( "{/$}", "", urldecode( $website ) ) );</pre></div><ul
class="buttOptions two"><li><a
href="http://demo.technerdia.com/remove-slashes/" target="_blank" class="postButton" onClick="javascript: _gaq.push(['_trackPageview', 'Remove slashes and the http from a URL &#8211; PHP Example', 'VIEW', 'Remove slashes and the http from a URL &#8211; PHP Example']);"><span>View the Demo</span></a></li><li><a
href="http://technerdia.com/files/php-example-remove-all-slashes.pdf" target="_blank" class="postButton" onClick="javascript: _gaq.push(['_trackPageview', '/files/php-example-remove-all-slashes.pdf', 'PDF', '/files/php-example-remove-all-slashes.pdf']);"><span>Download PDF</span></a></li></ul><div
class="br">&nbsp;</div><h2>Breaking It Down</h2><p>It starts by decoding an encoded URL: It turns, http%3A%2F%2Ftechnerdia.com%2F into http://technerdia.com</p><p>Why is the URL encoded? I use this snip when pulling URLs from a database. The snip still works if the URL isn&#8217;t encoded.</p><p><strong>Decode the Encoded URL</strong><div
class="mycode"><pre name="code" class="php">$website = &quot;http%3A%2F%2Ftechnerdia.com%2F&quot;;
$website = urldecode( $website );
echo $website;
/* Result: http://technerdia.com/ */</pre></div></p><p><strong>Removing Trailing Slash from the URL</strong><div
class="mycode"><pre name="code" class="php">$website = &quot;http://technerdia.com/&quot;;
$website = preg_replace( &quot;{/$}&quot;, &quot;&quot;, $website );
echo $website;
/* Result: http://technerdia.com */</pre></div></p><p><strong>Remove the http:// from the URL</strong><div
class="mycode"><pre name="code" class="php">$website = &quot;http://technerdia.com&quot;;
$website = preg_replace( "#^[^:/.]*[:/]+#i", "", $website );
echo $website;
/* Result: technerdia.com */</pre></div></p><p><strong>That&#8217;s It!</strong></p><p><strong>Make It All One Line</strong><br
/> You can stack it all together and simply echo the line, instead of typing all that out.</p><div
class="mycode"><pre name="code" class="php">$website = &quot;http%3A%2F%2Ftechnerdia.com%2F&quot;;
echo preg_replace( "#^[^:/.]*[:/]+#i", "", preg_replace( "{/$}", "", urldecode( $website ) ) );
/* Result: technerdia.com */</pre></div><ul
class="buttOptions two"><li><a
href="http://demo.technerdia.com/remove-slashes/" target="_blank" class="postButton" onClick="javascript: _gaq.push(['_trackPageview', 'Remove slashes and the http from a URL &#8211; PHP Example', 'VIEW', 'Remove slashes and the http from a URL &#8211; PHP Example']);"><span>View the Demo</span></a></li><li><a
href="http://technerdia.com/files/php-example-remove-all-slashes.pdf" target="_blank" class="postButton" onClick="javascript: _gaq.push(['_trackPageview', '/files/php-example-remove-all-slashes.pdf', 'PDF', '/files/php-example-remove-all-slashes.pdf']);"><span>Download PDF</span></a></li></ul><div
class="br">&nbsp;</div><h2>This little snip of code is a time saver, that&#8217;s its job!</h2><p>When you insert URL&#8217;s into a database and also need the domain.com inserted, use this to strip away the garbage rather than typing in the domain.com each time. On the flip side, maybe you only have the URL and need the domain.com, which is typical in APIs or building URLs for sites like Alexa and Site Explorer Tools, and of course many other reasons.</p><hr
/><h4>Let me know what you thought of this article by leaving me some quick <a
href="http://technerdia.com/feedback.html" target="_blank">feedback</a>.</h4><br
/><p><div
style="border-top:1px dotted #cccccc;clear:both;font-size:14px;font-weight:bold;margin:2px 10px;padding:0 10px;text-align:left;"><ul><li><b>New WordPress Plugin</b> <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3RlY2huZXJkaWEuY29tL3Byb2plY3RzL2FkbWluYmFyL3BsdWdpbi5odG1s" target=\"_blank\">WP My Admin Bar</a> (It's Free, Download Today!)</li><li><b>Reading:</b> <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3RlY2huZXJkaWEuY29tLzY2N19kb21haW4tb25seS5odG1s">Remove slashes and the http from a URL &#8211; PHP Example</a> <b>By:</b> <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cHM6Ly9wbHVzLmdvb2dsZS5jb20vMTA1NDA4MDgyNTcxNDU0MDEwMTUyLw==" target=\"_blank\">tribalNerd</a> <b>From:</b> <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3RlY2huZXJkaWEuY29tLw==" target=\"_blank\">techNerdia - Web Development Tips</a></li><li><b><a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cHM6Ly9wbHVzLmdvb2dsZS5jb20vdS8wLzEwODA0NjIyNTkxMzk2NTMxNTU5NC9wb3N0cw==" target=\"_blank\">Follow techNerdia on Google+</a></li></ul></div><p
align="center">~ <b>Thank you for subscribing to techNerdia.com - Please Share This Post With Others</b> ~</p></p> <img
src="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=667" width="1" height="1" style="display: none;" />]]></content:encoded> <wfw:commentRss>http://technerdia.com/667_domain-only.html/feed</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Using Shortcodes to Display and Manipulate Custom PHP Code within WordPress Posts or Pages</title><link>http://technerdia.com/579_shortcodes.html</link> <comments>http://technerdia.com/579_shortcodes.html#comments</comments> <pubDate>Wed, 11 Jan 2012 19:27:15 +0000</pubDate> <dc:creator>tribalNerd</dc:creator> <category><![CDATA[Shortcodes]]></category> <category><![CDATA[Wordpress]]></category> <category><![CDATA[code]]></category> <category><![CDATA[php]]></category> <category><![CDATA[shortcode]]></category> <category><![CDATA[wp]]></category> <guid
isPermaLink="false">http://technerdia.com/?p=579</guid> <description><![CDATA[Shortcodes are the perfect tool to use for pulling in Affiliate API's directly into posts or pages, by passing in variables within the Shortcode directly, which manipulates the output or display of the API.<p><div
style="border-top:1px dotted #cccccc;clear:both;font-size:14px;font-weight:bold;margin:2px 10px;padding:0 10px;text-align:left;"><ul><li><b>New Wordpress Plugin</b> <a
href="http://technerdia.com/projects/adminbar/plugin.html" target="_blank">WP My Admin Bar</a> (It's Free, Download Today!)</li><li><b>Reading:</b> <a
href="http://technerdia.com/579_shortcodes.html">Using Shortcodes to Display and Manipulate Custom PHP Code within WordPress Posts or Pages</a> <b>By:</b> <a
href="https://plus.google.com/105408082571454010152/" target="_blank">tribalNerd</a> <b>From:</b> <a
href="http://technerdia.com/" target="_blank">techNerdia - Web Development Tips</a></li><li><b><a
href="https://plus.google.com/u/0/108046225913965315594/posts" target="_blank">Follow techNerdia on Google+</a></li></ul></div><p
align="center">~ <b>Thank you for subscribing to techNerdia.com - Please Share This Post With Others</b> ~</p></p> ]]></description> <content:encoded><![CDATA[<p>From <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2NvZGV4LndvcmRwcmVzcy5vcmcvU2hvcnRjb2RlX0FQSQ==" target=\"_blank\">WordPress</a>, a <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2VuLnN1cHBvcnQud29yZHByZXNzLmNvbS9zaG9ydGNvZGVzLw==" target=\"_blank\">Shortcode</a> is: a simple set of functions for creating macro codes for use in post content.</p><div
align="center"><img
src="http://technerdia.com/files/shortcodes.gif" alt="Wordpress Shortcode Examples" title="shortcodes" width="560" height="156" class="aligncenter" /></div><p>Shortcodes are the perfect tool to use for pulling in Affiliate <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2VuLndpa2lwZWRpYS5vcmcvd2lraS9BcHBsaWNhdGlvbl9wcm9ncmFtbWluZ19pbnRlcmZhY2U=" target=\"_blank\">API</a>&#8216;s directly into WordPress, by passing in variables within the Shortcode directly, which manipulates the output or display of the API. Because Shortcodes are built in WordPress Functions, caching plugins will work on them. Another words, using Shortcodes to display API&#8217;s instead of writing a custom plugin, means you don&#8217;t also have to write in extra code for caching!</p><p><strong>The functions.php file</strong><br
/> Shortcode Functions get added directly into the <em>functions.php</em> file of a theme.<h2>A Basic Shortcode Function</h2><p>Shortcodes need a function assigned to them to make them, function. Below is a basic example of this taking place.</p> Place the below within the <i>functions.php</i> file:<div
class="mycode"><pre name="code" class="php">function myShortcode() {
    return 'Hello!';
}
add_shortcode( shortcode_name, myShortcode );</pre></div><p>In the last line above, the add_shortcode Function contains the name of the short code (shortcode_name) and calls the function above it (myShortcode). The name of this shortcode is: shortcode_name and the function name is: myShortcode</p><ul><li>Use a shortcode name that relates to the purpose of the function.</li><li>Always use lowercase letters in your Shortcode names.</li></ul> <strong>Shortcode Call</strong>: The Shortcode will return the text: Hello<div
class="mycode"><pre name="code" class="php">[shortcode_name]</pre></div><p>This is a rather basic example, you can find many ways to use them with a quick <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5nb29nbGUuY29tL3NlYXJjaD9xPXdvcmRwcmVzcytzaG9ydGNvZGUrZXhhbXBsZXM=" target=\"_blank\">Google Search</a>, they are amazingly versatile, so don&#8217;t be afraid to play with them.</p><h2>Passing an Attribute to the Shortcode</h2><p>Rather than simply returning Hello, the Shortcode can have text passed directly to it. The text can be returned, or used to activate an if or switch statement. The example below checks to see if $atts is passed in, if so it returns the results of param, which is Hello World!</p><div
class="mycode"><pre name="code" class="php">function myShortcode( $atts ) {
if ( $atts) {
    return $atts['param'];
}
}
add_shortcode( shortcode_name, myShortcode );</pre></div> <strong>Passing in an Attribute</strong>:<div
class="mycode"><pre name="code" class="php">[shortcode_name param=&quot;Hello World!&quot;]</pre></div><p>Both of the above examples are some what limited, to unlock the full potential of Shortcodes, Attributes need to be passed in.</p><h2>Attributes within Shortcodes</h2><p>Attributes are basically Variables ($a) that get passed into the Shortcode Function.</p> This is done simply by adding in the following to the function:<div
class="mycode"><pre name="code" class="php">extract( shortcode_atts( array( 'variable' =&gt; 'value', ), $atts ) );</pre></div><p>The array() contains a variable(s) that may or may not equal something, in this case the variable equals value. Add more Variables by adding to the Array:<div
class="mycode"><pre name="code" class="php"> 'variable' =&gt; 'value', 'another-var' =&gt; 'another-value', </pre></div> <strong>Full example</strong>:<div
class="mycode"><pre name="code" class="php">extract( shortcode_atts( array( 'variable' =&gt; 'value', 'another-var' =&gt; 'another-value', ), $atts ) );</pre></div><p>Typically using Shortcodes with Attributes means something more complex is happening than displaying a single line of text, being so the output needs to be captured before displaying it.</p><h2>Output Buffering</h2><p>An Advanced Shortcode is basically useless without capturing the output of the code. Without it, code can display at wrong times or locations and depending on what the code does within the Shortcode function, it may return header warnings.</p><p>To correct this we use a few PHP functions: <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3BocC5uZXQvbWFudWFsL2VuL2Z1bmN0aW9uLm9iLXN0YXJ0LnBocA==" target=\"_blank\">ob_start</a>, <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3BocC5uZXQvbWFudWFsL2VuL2Z1bmN0aW9uLm9iLWdldC1jb250ZW50cy5waHA=" target=\"_blank\">ob_get_contents</a> and <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3BocC5uZXQvbWFudWFsL2VuL2Z1bmN0aW9uLm9iLWVuZC1jbGVhbi5waHA=" target=\"_blank\">ob_end_clean</a>. These functions capture the output of the code into a memory first, then displays (or cleans) the output based on the order it was captured in.</p><h2>Example Shortcode Function Using Output Buffering</h2><p>In the example below, we capture the if statements results based on the variable&#8217;s value.</p><div
class="mycode"><pre name="code" class="php">function myShortcode( $atts ) {
	extract( shortcode_atts( array( 'variable' =&gt; '', ), $atts ) );
	ob_start();
		if ( $variable == '' ) { echo &quot;Do Nothing!&quot;; }
		if ( $variable == '1' ) { echo &quot;Do This Code!&quot;; }
		if ( $variable == '2' ) { echo &quot;Do That Code!&quot;; }
	$output_string = ob_get_contents();
	ob_end_clean();
		return $output_string;
}
add_shortcode( short_code_name, myShortcode);</pre></div> <strong>This Shortcode will return</strong>: <em>Do This Code!</em><div
class="mycode"><pre name="code" class="php">[shortcode_name variable=&quot;1&quot;]</pre></div><h2>Advanced Example Shortcode Function</h2><p>This example captures an XML Feed, loads it into a string, then manipulates the output based on the passed in Attributes. This Shortcode can display various outputs based on the value of type. When type=cars a unique API Url is called, then we foreach through each result, correct the HTML entities and cut the description length off at 255 characters before returning them.</p><div
class="mycode"><pre name="code" class="php">function myShortcode( $atts ) {
	extract( shortcode_atts( array( 'type' =&gt; '', 'debug' =&gt; '', ), $atts ) );
	ob_start();
/* start code */
if ( !$type ) { $type = &quot;cars&quot;; }
if ( $type == &quot;cars&quot; ) {
	$apiUrl = file_get_contents(&quot;http://apiurl.com/&quot;);
}
if ( $type == &quot;boats&quot; ) {
	$apiUrl = file_get_contents(&quot;http://apiurl.com/&quot;);
}
if ( $type ) {
	$xml = simplexml_load_string($apiUrl);
	if( $debug ){echo &quot;&lt;pre&gt;&quot;;print_r($xml);echo &quot;&lt;/pre&gt;&quot;; exit;}
}
if ( $type == &quot;cars&quot; ) {
	 foreach($xml-&gt;cars as $car){
		$title = $car-&gt;title;
		$about = $car-&gt;description;
			echo '&lt;h2&gt;'. htmlentities($title); .'&lt;/h2&gt;';
			echo '&lt;p&gt;'. substr($about,0,255); .'&lt;/p&gt;';
	}
}
if ( $type == &quot;boats&quot; ) {
	$name = $xml-&gt;boats-&gt;boat-&gt;name;
	echo $name;
}
/* end code */
	$output_string = ob_get_contents();
	ob_end_clean();
		return $output_string;
}
add_shortcode( short_code_name, myShortcode);</pre></div> <strong>The Shortcodes</strong><div
class="mycode"><pre name="code" class="php">[short_code_name type=&quot;cars&quot;]
[short_code_name type=&quot;boats&quot;]
[short_code_name type=&quot;cars&quot; debug=&quot;1&quot;]</pre></div><p>As you can see, a single Shortcode can contain many &#8220;rules&#8221; before executing the code. As long as you capture the output, it really makes no difference what you do. You could connect to Mysql, run advanced math, call other functions and classes, include other files, and much more &#8211; all within one Shortcode.</p><p>This does not mean you should stack everything into a single Shortcode, but it does mean it&#8217;s possible!</p><h2>What one of my Shortcode functions looks like</h2><p>This is one of my actual Shortcode functions. I pass in several Attributes in, however I only call one or few at a time, each of which manipulate the results of the included api.php file.</p><p>The <i>show</i> variable in the shortcode_atts array is set to <i>full</i> (show=full), this means the default value of show to full, thus if nothing is passed in it&#8217;s value is full, otherwise its value is whatever is passed in from the Shortcode.</p><div
class="mycode"><pre name="code" class="php">function apiData_func( $atts ) {
		extract( shortcode_atts( array('type' =&gt; '', 'show' =&gt; 'full', 'letter' =&gt; '', 'site' =&gt; '', 'start' =&gt; '', 'search' =&gt; '', 'speed' =&gt; '', 'filter' =&gt; 'filter', ), $atts ) );
	ob_start();
	  include('api.php');
	 $output_string = ob_get_contents();
	ob_end_clean();
   return $output_string;
 }
add_shortcode( api_data, apiData_func );</pre></div> <strong>The Shortcode</strong><div
class="mycode"><pre name="code" class="php">[api_data type=&quot;golf&quot; letter=&quot;a&quot; start=&quot;1&quot; ]</pre></div><p>This Shortcode would display golf products, starting with the letter A on page 1, and would &#8216;show&#8217; the &#8216;full&#8217; information template.</p><h2>Enable Shortcodes in Sidebar Widgets</h2><p>Add the line below (as is) to your themes <em>function.php</em> file to turn on Shortcodes within Widgets. Now the same [ShortCodes] used within Posts and Pages can be used within Sidebar Widgets.</p><div
class="mycode"><pre name="code" class="php">add_filter('widget_text', 'do_shortcode', 11);</pre></div><h3>What is the 11?</h3><p>That is the Priority number, this tells WordPress to load <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2NvZGV4LndvcmRwcmVzcy5vcmcvRnVuY3Rpb25fUmVmZXJlbmNlL2RvX3Nob3J0Y29kZQ==" target=\"_blank\">do_shortcode</a> after the WordPress content has started to load. In some unique cases you may need the Shortcode to load before WordPress, like when modifying headers, then the Priority number would be 9 (I believe). Other times you may have nested the Shortcodes, and need them to execute in an order. Typically, it stays 11 or gets excluded all together.</p><hr
size="1" width="99%" /><p>Shortcodes are the ultimate WordPress Shortcuts and when it comes to API&#8217;s &#8211; Shortcodes are a godsend!</p><hr
/><h4>Have something to say? Something to add? Have a Question?</h4><p>Use the <a
href="http://technerdia.com/feedback.html" target="_blank">feedback</a> form to quickly send me your thoughts.</p><br
/><p><div
style="border-top:1px dotted #cccccc;clear:both;font-size:14px;font-weight:bold;margin:2px 10px;padding:0 10px;text-align:left;"><ul><li><b>New WordPress Plugin</b> <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3RlY2huZXJkaWEuY29tL3Byb2plY3RzL2FkbWluYmFyL3BsdWdpbi5odG1s" target=\"_blank\">WP My Admin Bar</a> (It's Free, Download Today!)</li><li><b>Reading:</b> <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3RlY2huZXJkaWEuY29tLzU3OV9zaG9ydGNvZGVzLmh0bWw=">Using Shortcodes to Display and Manipulate Custom PHP Code within WordPress Posts or Pages</a> <b>By:</b> <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cHM6Ly9wbHVzLmdvb2dsZS5jb20vMTA1NDA4MDgyNTcxNDU0MDEwMTUyLw==" target=\"_blank\">tribalNerd</a> <b>From:</b> <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3RlY2huZXJkaWEuY29tLw==" target=\"_blank\">techNerdia - Web Development Tips</a></li><li><b><a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cHM6Ly9wbHVzLmdvb2dsZS5jb20vdS8wLzEwODA0NjIyNTkxMzk2NTMxNTU5NC9wb3N0cw==" target=\"_blank\">Follow techNerdia on Google+</a></li></ul></div><p
align="center">~ <b>Thank you for subscribing to techNerdia.com - Please Share This Post With Others</b> ~</p></p> <img
src="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=579" width="1" height="1" style="display: none;" />]]></content:encoded> <wfw:commentRss>http://technerdia.com/579_shortcodes.html/feed</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Find the Parent Post ID and Children ID&#8217;s of Multiple Nested Posts or Pages &#8211; WordPress Tip</title><link>http://technerdia.com/573_post-ancestors.html</link> <comments>http://technerdia.com/573_post-ancestors.html#comments</comments> <pubDate>Tue, 03 Jan 2012 20:05:40 +0000</pubDate> <dc:creator>tribalNerd</dc:creator> <category><![CDATA[Functions]]></category> <category><![CDATA[Wordpress]]></category> <category><![CDATA[children]]></category> <category><![CDATA[pages]]></category> <category><![CDATA[parent]]></category> <category><![CDATA[php]]></category> <category><![CDATA[wp]]></category> <guid
isPermaLink="false">http://technerdia.com/?p=573</guid> <description><![CDATA[Find the Parent Post ID from a Child Page, when that Child Page is multiple nested levels deep.<p><div
style="border-top:1px dotted #cccccc;clear:both;font-size:14px;font-weight:bold;margin:2px 10px;padding:0 10px;text-align:left;"><ul><li><b>New Wordpress Plugin</b> <a
href="http://technerdia.com/projects/adminbar/plugin.html" target="_blank">WP My Admin Bar</a> (It's Free, Download Today!)</li><li><b>Reading:</b> <a
href="http://technerdia.com/573_post-ancestors.html">Find the Parent Post ID and Children ID&#8217;s of Multiple Nested Posts or Pages &#8211; WordPress Tip</a> <b>By:</b> <a
href="https://plus.google.com/105408082571454010152/" target="_blank">tribalNerd</a> <b>From:</b> <a
href="http://technerdia.com/" target="_blank">techNerdia - Web Development Tips</a></li><li><b><a
href="https://plus.google.com/u/0/108046225913965315594/posts" target="_blank">Follow techNerdia on Google+</a></li></ul></div><p
align="center">~ <b>Thank you for subscribing to techNerdia.com - Please Share This Post With Others</b> ~</p></p> ]]></description> <content:encoded><![CDATA[<p>Google is filled with countless WordPress users asking <i>How to find the Parent Post ID from a Child Page</i>, when that Child Page is multiple nested levels deep. And like those users, I recently found myself asking this same question.</p><p>Unfortunately this is one question that has more answers, solutions, and headaches than even Google can understand. All the solutions I did find did not recursively go through endless children posts, the rest simply didn&#8217;t work.</p><p>So I kept looking and I&#8217;m glad that I did&#8230;.</p><p>Even though this is still a popular topic today, it appears WordPress solved this problem way back in version 2.5, with the function <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2NvZGV4LndvcmRwcmVzcy5vcmcvRnVuY3Rpb25fUmVmZXJlbmNlL2dldF9wb3N0X2FuY2VzdG9ycw==" target=\"_blank\">get_post_ancestors</a>.</p><p>The <strong>get_post_ancestors</strong> function creates an array of Post ID&#8217;s, starting on the first Child Page. So if you&#8217;re 50 nested pages and on the 50th page, this function would display every post id, for every page, up to the parent page.</p><p><u>Note</u>: This function does not display the Parent Post ID IF you are on the Parent Post Page itself &#8211; You must be at least one level deep for it to work.</p><hr
size="1" /><h2>Examples of get_post_ancestors</h2><div
class="mycode"><pre name="code" class="php"> /* Example use of get_post_ancestors */
/*Outside Loop: like the sidebar, footer, etc. */
$ancestors = get_post_ancestors( $wp_query-&gt;post );
/*Within Loop: Pages template. */
$postid = get_the_ID();
$ancestors = get_post_ancestors( $postid );</pre></div><p>The <i>results of get_post_ancestors</i> in now in an Array named, $ancestors. For development purposes you may want to view the results of the array.</p><div
class="mycode"><pre name="code" class="php"> /* Display $ancestors */
echo &quot;&lt;pre&gt;&quot;;
print_r($ancestors):
echo &quot;&lt;/pre&gt;&quot;;</pre></div><div
class="mycode"><pre name="code" class="php"> /* Output of $ancestors */
Array
(
    [0] =&gt; 824
    [1] =&gt; 822
    [2] =&gt; 796
)</pre></div><p>In the example above, the Parent Post ID would be: 796 &#8211; Or the last value in the array.</p><p>You can access the unique value by calling it directly: This would only work if if you are two levels deep from the parent.</p><div
class="mycode"><pre name="code" class="php">echo $ancestors[2];</pre></div><h2>PHP Function in_array</h2><p>In the example below, we use the PHP function <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3BocC5uZXQvbWFudWFsL2VuL2Z1bmN0aW9uLmluLWFycmF5LnBocA==" target=\"_blank\">in_array</a> to look at all the values returned in the Array, rather than calling each value, like above.</p><div
class="mycode"><pre name="code" class="php"> /* http://php.net/manual/en/function.in-array.php */
in_array( &quot;796&quot;, $ancestors );</pre></div><p><b>Example Use</b>: In the example below, if ID 796 is found in the $ancestors Array, the if statement would echo: Found In Array</p><div
class="mycode"><pre name="code" class="php"> /* Full example use of get_post_ancestors */
$ancestors = get_post_ancestors( $wp_query-&gt;post );
if( in_array( &quot;796&quot;, $ancestors ) ){ echo &quot;Found In Array&quot;; }</pre></div><h2>Practical Use</h2><p>I use the <strong>get_post_ancestors</strong> function within the sidebar.php file of a few product related websites. When the parent page or child page of that parent is loaded, a unique sidebar &#038; widget is called based on the ID. The widget contains a unique, yet typical list style menu that contains nested  items within the list.</p> <b>Example Nested List</b>:<div
class="mycode"><pre name="code" class="php">  &lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Parent Page&lt;/a&gt;
   &lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Child Page 1&lt;/a&gt;
	  &lt;ul&gt;
		&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Sub-Child Page 2&lt;/a&gt;
		  &lt;ul&gt;
			&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Sub-Sub-Child Page 3&lt;/a&gt;&lt;/li&gt;
		  &lt;/ul&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Sub-Child Page 4&lt;/a&gt;&lt;/li&gt;
	  &lt;/ul&gt;&lt;/li&gt;
   &lt;/ul&gt;&lt;/li&gt;
  &lt;/ul&gt;</pre></div><h2>Example Use In Sidebar</h2><p>This will display the custom sidebar-widget menu on the Parent Page and all Child Pages of that Parent.</p><div
class="mycode"><pre name="code" class="php"> /* get_post_ancestors in the sidebar */
if( function_exists('dynamic_sidebar') ) {
 $ancestors = get_post_ancestors( $wp_query-&gt;post ); /* Build Ancestors Array*/?&gt;
&lt;div id=&quot;sidebar&quot;&gt;
&lt;?php if( is_page(796) || in_array( &quot;796&quot;, $ancestors ) ){ dynamic_sidebar(Sidebar1); }?&gt;
&lt;/div&gt;</pre></div><p>The <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2NvZGV4LndvcmRwcmVzcy5vcmcvRnVuY3Rpb25fUmVmZXJlbmNlL2lzX3BhZ2U=" target=\"_blank\">is_page</a> function: This function checks to see if the Parent Page is being shown. If you only wanted the custom menu to display on the Child pages, remove is_page() from the above if statement.</p><h2>Custom sidebar.php file using get_post_ancestors</h2><p>A more complete example of using the get_post_ancestors function within the sidebar.php file.</p><div
class="mycode"><pre name="code" class="php"> /* get_post_ancestors in the sidebar */
&lt;?php if( function_exists('dynamic_sidebar') ) {
 $ancestors = get_post_ancestors( $wp_query-&gt;post ); 						/* Build Ancestors Array*/
?&gt;
   &lt;div id=&quot;sidebar&quot;&gt;
&lt;?php /* sidebars */
   if( is_home() ){
	 dynamic_sidebar(Sidebar1);								/* home menu */
   }else{
	if( is_page(796) || in_array( &quot;796&quot;, $ancestors ) ){ dynamic_sidebar(CustomMenu); }	/* widget */
//	if( is_page(###) || in_array( &quot;###&quot;, $ancestors ) ){ dynamic_sidebar(Side-Bar-Name); }	/* example widget */
   }
   if( !is_home() ){ dynamic_sidebar(Sidebar2); }						/* non-home mneu */
?&gt;
   &lt;/div&gt;
} /* end dynamic_sidebar */
?&gt;</pre></div><hr
size="1" /><p>It&#8217;s that simple&#8230; this method can be used throughout a theme, simply make sure you&#8217;re passing the <i>post id</i> into get_post_ancestors, and everything will work perfectly!</p><hr
/><h4>Let me know what you thought of this article by leaving me some quick <a
href="http://technerdia.com/feedback.html" target="_blank">feedback</a>.</h4><br
/><p><div
style="border-top:1px dotted #cccccc;clear:both;font-size:14px;font-weight:bold;margin:2px 10px;padding:0 10px;text-align:left;"><ul><li><b>New WordPress Plugin</b> <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3RlY2huZXJkaWEuY29tL3Byb2plY3RzL2FkbWluYmFyL3BsdWdpbi5odG1s" target=\"_blank\">WP My Admin Bar</a> (It's Free, Download Today!)</li><li><b>Reading:</b> <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3RlY2huZXJkaWEuY29tLzU3M19wb3N0LWFuY2VzdG9ycy5odG1s">Find the Parent Post ID and Children ID&#8217;s of Multiple Nested Posts or Pages &#8211; WordPress Tip</a> <b>By:</b> <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cHM6Ly9wbHVzLmdvb2dsZS5jb20vMTA1NDA4MDgyNTcxNDU0MDEwMTUyLw==" target=\"_blank\">tribalNerd</a> <b>From:</b> <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3RlY2huZXJkaWEuY29tLw==" target=\"_blank\">techNerdia - Web Development Tips</a></li><li><b><a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cHM6Ly9wbHVzLmdvb2dsZS5jb20vdS8wLzEwODA0NjIyNTkxMzk2NTMxNTU5NC9wb3N0cw==" target=\"_blank\">Follow techNerdia on Google+</a></li></ul></div><p
align="center">~ <b>Thank you for subscribing to techNerdia.com - Please Share This Post With Others</b> ~</p></p> <img
src="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=573" width="1" height="1" style="display: none;" />]]></content:encoded> <wfw:commentRss>http://technerdia.com/573_post-ancestors.html/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>10 Steps to Replacing Feedburner With Your Own Feed URL &#8211; with Statistics</title><link>http://technerdia.com/524_removing-feedburner.html</link> <comments>http://technerdia.com/524_removing-feedburner.html#comments</comments> <pubDate>Mon, 11 Apr 2011 19:49:48 +0000</pubDate> <dc:creator>tribalNerd</dc:creator> <category><![CDATA[Customizing]]></category> <category><![CDATA[Wordpress]]></category> <category><![CDATA[feed]]></category> <category><![CDATA[feedburner]]></category> <category><![CDATA[htaccess]]></category> <category><![CDATA[plugins]]></category> <category><![CDATA[rss]]></category> <category><![CDATA[wp]]></category> <category><![CDATA[xml]]></category> <guid
isPermaLink="false">http://technerdia.com/?p=524</guid> <description><![CDATA[This article covers removing Feedburner from your Wordpress Websites and setting up your own RSS Feeds with Statistics, Advertisements and Scraper Protection.<p><div
style="border-top:1px dotted #cccccc;clear:both;font-size:14px;font-weight:bold;margin:2px 10px;padding:0 10px;text-align:left;"><ul><li><b>New Wordpress Plugin</b> <a
href="http://technerdia.com/projects/adminbar/plugin.html" target="_blank">WP My Admin Bar</a> (It's Free, Download Today!)</li><li><b>Reading:</b> <a
href="http://technerdia.com/524_removing-feedburner.html">10 Steps to Replacing Feedburner With Your Own Feed URL &#8211; with Statistics</a> <b>By:</b> <a
href="https://plus.google.com/105408082571454010152/" target="_blank">tribalNerd</a> <b>From:</b> <a
href="http://technerdia.com/" target="_blank">techNerdia - Web Development Tips</a></li><li><b><a
href="https://plus.google.com/u/0/108046225913965315594/posts" target="_blank">Follow techNerdia on Google+</a></li></ul></div><p
align="center">~ <b>Thank you for subscribing to techNerdia.com - Please Share This Post With Others</b> ~</p></p> ]]></description> <content:encoded><![CDATA[<p><img
src="http://technerdia.com/files/feedburner.gif" alt="Feedburner" width="100" height="100" class="alignleft size-full wp-image-528" />This article covers removing Feedburner from your WordPress Websites and setting up your own RSS Feeds with Statistics, Advertisements and Scraper Protection.</p><p><strong>Two Methods To Removing Feedburner.</strong></p><ol><li>Create a temporary Feed that will be used in Feedburner, forcing your readers to update now!</li><li>Using a notice within your current Feeds, allowing your readers to naturally move over to your new Feed.</li></ol><p>Sites like techNerdia, with a relatively low reader count can force readers to update the Feed URL&#8217;s now&#8230; It is not hurting me much, if any because of my size. However, for active sites with a large number of readers, an aggressive change like this will make people unhappy, so giving them a notice is a much better option.</p><p><strong>Before We Start</strong>: Steps 1 ½ (removing plugins), step #3 and step #6 can be skipped by those not wanting to aggressively force readers to update Feed URLs OR if you use the Email Subscriptions feature within Feedburner.</p><p><strong>Why am I removing Feedburner?</strong><br
/> First, it&#8217;s not winning any speed points loading the external Feedburner graphic on my Website. I know it&#8217;s really nothing and I could simply not use it. But in the future I would like to show off my new feed count, and hosting it myself is a speed gain.</p><p>Secondly, I already give Google enough of my freak&#8217;in data&#8230;.. And Finally, this being the real reason &#8211; I added up the time I spent on external services, checking stats or data type information, and it&#8217;s disturbingly a high number of HOURS &#8211; so my goal overall is to reduce the time spent on external services of all types.</p><p>Excuses aside; I&#8217;ve found a way to replace Feedburner, help move subscribers over to my new Feed, with statistics, including advertising, while keeping scrapers at bay, all within WordPress. And I&#8217;m saving some time by not having to visit another external service.</p><p><strong><em>If you&#8217;ve setup your own WordPress Websites and can manage them yourself, then you can do this&#8230;</em></strong></p><h2>Step 1:</h2><h3>WordPress Plugins</h3><p>Starting things off is three WordPress Plugins that need to be installed. After this, you may need to shut a few off if you&#8217;re taking the aggressive route.</p><p>These plugins take care of the dirty work that Feedburner did for you. The other features, such as pinging can be taken care within WordPress and Twitter Posts can easily be done with several plugins or many services that can read your feed.</p><h4>Installing Plugins</h4><ol><li><strong><a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3dvcmRwcmVzcy5vcmcvZXh0ZW5kL3BsdWdpbnMvcnNzLWZvb3Rlci8=" target=\"_blank\" rel=\"nofollow\">RSS Footer</a></strong>: This plugin has two purposes. The first is to help stop scrapers from taking your Feeds  and posting them without credit, and it&#8217;s a way to include advertisements.</li><li><strong><a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3dvcmRwcmVzcy5vcmcvZXh0ZW5kL3BsdWdpbnMvd29yZHByZXNzLWZlZWQtc3RhdGlzdGljcy8=" target=\"_blank\" rel=\"nofollow\">Feed Statistics</a></strong>: As the name suggests, it&#8217;s feed statistics. While it&#8217;s not as good as FeedBurner&#8217;s pretty stats, it does do the job.</li><li><strong><a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3dvcmRwcmVzcy5vcmcvZXh0ZW5kL3BsdWdpbnMvcmVkaXJlY3Rpb24v" target=\"_blank\" rel=\"nofollow\">Redirection</a></strong>: <u>Optional</u>: This Plugin is recommended for Multisite Networks but any WP Install can use it. If your sites are setup on the WordPress Multisite Network then you&#8217;ll need the Redirection Plugin to handle 301 redirects for each unique site. Otherwise, you can use the .htaccess file in the root of your WordPress site to set up redirects. (Explained Below)</li></ol><h4>Shutting Off Plugins &amp; Social Networks.</h4><p><strong>Not everyone needs to do these steps&#8230;.</strong> If you&#8217;re going to naturally move your readers over or if you use Feedburner&#8217;s Email Subscriptions feature then skip these steps.</p><ul><li><a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2ZlZWRidXJuZXIuZ29vZ2xlLmNvbQ==" target=\"_blank\">Log into Feedburner</a>, click the Publicize Tab and shut off Ping Shot and Socialize if they&#8217;re setup.</li><li>Shut Off Plugins that help socialize posts through your Feedburner URL.</li><li>Shut Off Social Networks that use your Feedburner URL for posting updates</li></ul><hr
size="1" /><h2>Step 2:</h2><h3>Setting Up RSS Footer</h3><p>The <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3dvcmRwcmVzcy5vcmcvZXh0ZW5kL3BsdWdpbnMvcnNzLWZvb3Rlci8=" target=\"_blank\" rel=\"nofollow\">RSS Footer Plugin</a> is a key feature to keeping your feeds safe from scrapers or at least making sure you get credit when it happens, and offering some advertising to your readers if you like.</p><p>In the example below, the big red box can be text or an advertisement/promo, put in whatever you like. The bold text below the red box is actually more important. The purpose of not linking the Domain Name is to help stop scrapers from ripping out everything within HTML tags, thus leaving the original source to where the article can be found.</p><p><strong>Example #1</strong> &#8211; HTML that asks readers to Update the Feed URL. This should be used if you&#8217;re not forcing your readers to update (ie: a slow change over), perfect for sites with a large active reader base.</p><div
class="mycode"><pre name="code" class="html"><div style="clear:both;border:2px dashed #c00;text-align:left;font-weight:bold;font-size:16px;padding:8px 10px;margin:40px 10px;text-align:left;"><u>NOTICE - PLEASE READ</u> Please update our Feed URL As Soon As Possible - we're removing Feedburner! Thanks ~tribalNerd <u>NEW Feed URL</u> <a href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3RlY2huZXJkaWEuY29tL2ZlZWQ=" target=\"_blank\">http://technerdia.com/feed</a></div>
<p>Thanks For Reading %%POSTLINK%%</b> from <a href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3RlY2huZXJkaWEuY29tLw==" target=\"_blank\">techNerdia.com</a></p></pre></div><p><strong>What Example #1 Looks Like:</strong><br
/><div
style="clear:both;border:2px dashed #c00;text-align:left;font-weight:bold;font-size:16px;padding:8px 10px;margin:2px 10px 40px 0;text-align:left"><u>NOTICE &#8211; PLEASE READ</u> Please update our Feed URL As Soon As Possible &#8211; we&#8217;re removing Feedburner! Thanks ~tribalNerd <u>NEW Feed URL</u> <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3RlY2huZXJkaWEuY29tL2ZlZWQ=" target=\"_blank\">http://technerdia.com/feed</a></div></p><p>Thanks For Reading %%POSTLINK%%</b> from <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3RlY2huZXJkaWEuY29tLw==" target=\"_blank\">techNerdia.com</a></p><p><strong>Example #2</strong> &#8211; Current HTML I put into my RSS Footer.</p><div
class="mycode"><pre name="code" class="html"><div style="clear:both;border:2px dashed #c00;text-align:left;font-weight:bold;font-size:16px;padding:8px 10px;margin:40px 10px;text-align:center;">Thanks For Reading %%POSTLINK%%</b> from <a href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3RlY2huZXJkaWEuY29tLw==" target=\"_blank\">techNerdia.com</a></div>
<p align="center">~ <b>Visit the New techNerdia.com today</b> ~</p></pre></div><p><strong>What Example #2 Looks Like:</strong><br
/><div
style="clear:both;border:2px dashed #c00;text-align:left;font-weight:bold;font-size:16px;padding:8px 10px;margin:2px 10px 40px 0;text-align:center">Thanks For Reading %%POSTLINK%%</b> from <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3RlY2huZXJkaWEuY29tLw==" target=\"_blank\">techNerdia.com</a></div></p><p
align="center">~ <b>Visit the New techNerdia.com today</b> ~</p><hr
size="1" /><h2>Step 3:</h2><h3>Creating a Temporary RSS Feed</h3><p>This feed is used to replace your Feed URL in Feedburner, giving the viewer a custom message to update the Feed URL, every single day, until they update. It is aggressive, but it works!</p><ul><li><strong>View the <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3RlY2huZXJkaWEuY29tL3NlYXJjaC94bWwvcnNzLXRuLnhtbA==" target=\"_blank\" rel=\"nofollow\">Temp techNerdia Feed</a> that I created.</strong></li><li><strong>View the <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2ZlZWRzMi5mZWVkYnVybmVyLmNvbS9UZWNoLU5lcmRpYQ==" target=\"_blank\" rel=\"nofollow\">Feed at FeedBurner</a> for a different view.</strong></li></ul><p>Grab the example below, <strong>name it</strong>: <u>rss-mySite.xml</u> &#8220;One You Modify It&#8221; FTP to your WordPress install, create a folder called xml (or whatever), then upload the file. <strong>Note</strong>: The file extension should be .xml</p><p><strong>The example below</strong> is really 3 sections. Inside of each section is a title, description, link, and guid link that needs to be modified. The first title section is the name of the feed, the next two title sections would be the updates that are displayed. This script will re-post the same message every day.</p><p><em>* In the example below replace the titles, desc&#8217;s and links to match your own information. It&#8217;s not a perfect feed, but it does the job and that&#8217;s all it needs to do.</em></p><div
class="mycode"><pre name="code" class="xml">&lt;?php echo(&quot;&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?\n&quot;);?&gt;
&lt;rss version=&quot;2.0&quot;&gt;
&lt;channel&gt;
&lt;title&gt;techNerdia [UPDATE]&lt;/title&gt;
&lt;description&gt;Please Update Your Feed URL&lt;/description&gt;
&lt;link&gt;http://technerdia.com/feed&lt;/link&gt;
&lt;lastBuildDate&gt;&lt;?php echo date('l, j M Y');?&gt; 00:00:01 -1600&lt;/lastBuildDate&gt;
&lt;pubDate&gt;&lt;?php echo date('l, j M Y');?&gt; 00:00:01 -1600&lt;/pubDate&gt;
&lt;item&gt;
&lt;title&gt;TechNerdia [UPDATE] Please Change Your Feed URL&lt;/title&gt;
&lt;description&gt;Please Update Your Feed URL to technerdia.com/feed &lt;a href=&quot;http://technerdia.com/feed&quot;&gt;http://technerdia.com/feed&lt;/a&gt; ....then Delete The Feedburner Feed URL that is currently being used. ~ Thanks!&lt;/description&gt;
&lt;link&gt;http://technerdia.com/feed&lt;/link&gt;
&lt;guid isPermaLink=&quot;false&quot;&gt;http://technerdia.com/feed&lt;/guid&gt;
&lt;pubDate&gt;&lt;?php echo date('l, j M Y');?&gt; 00:00:01 -1600&lt;/pubDate&gt;
&lt;/item&gt;
&lt;item&gt;
&lt;title&gt;Questions or Problems?&lt;/title&gt;
&lt;description&gt;If you're having problems or have a question about the feed change or something else, simply &lt;a href=&quot;http://technerdia.com/help&quot;&gt;drop me an email&lt;/a&gt;.&lt;/description&gt;
&lt;link&gt;http://technerdia.com/help&lt;/link&gt;
&lt;guid isPermaLink=&quot;false&quot;&gt;http://technerdia.com/help&lt;/guid&gt;
&lt;pubDate&gt;&lt;?php echo date('l, j M Y');?&gt; 00:00:02 -1600&lt;/pubDate&gt;
&lt;/item&gt;
&lt;/channel&gt;
&lt;/rss&gt;</pre></div><h4>.htaccess</h4><p>Grab the directive below, and upload a .htaccess file <strong>to your /xml/ folder</strong>. This will allow the php to parse the xml, making the feed work.</p><div
class="mycode"><pre name="code" class="php">AddType application/x-httpd-php .php .xml</pre></div><ul><li>Now log into your <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2ZlZWRidXJuZXIuZ29vZ2xlLmNvbQ==" target=\"_blank\" rel=\"nofollow\">Feedburner Account</a>, select the Feed you&#8217;re going to modify, click Edit Feed at the top (next to the rss icon) &#8211; and modify the Feed URL.</li><li>You may need to Subscribe to your feed in a <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5nb29nbGUuY29tL3JlYWRlcg==" target=\"_blank\" rel=\"nofollow\">Reader</a> to view how your readers will see it.</li><li>The message you put into your rss-mySite.xml should now display OR if you&#8217;re doing a natural update your new message should appear.</li></ul><hr
size="1" /><h2>Step 4:</h2><h3>Setting Up Feed Statistics</h3><p>Setting and using the <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3dvcmRwcmVzcy5vcmcvZXh0ZW5kL3BsdWdpbnMvd29yZHByZXNzLWZlZWQtc3RhdGlzdGljcy8=" target=\"_blank\" rel=\"nofollow\">Feed Statistics Plugin</a> is rather straight forward. However, it appears I may have found a bug, which could very well relate to WordPress Multisite, either way &#8211; it&#8217;s easy to correct.</p><p>Access the Feed Menu &gt; Feed Link &#8211; which is the default page when first opened. The end of the first line will tell you how many feed subscribers you currently have.</p><p>The issue I was having was updating the number of days and checking the first box. Every time I changed it to 30 and checked, it reset itself &#8211; even when I made the change in the DB, accessing the script reset the options.</p><p><strong>To beat this, I made some very simple adjustments in the Plugin itself.</strong></p><ul><li>FTP to your /wp-content/plugins folder and go into /wordpress-feed-statistics/ &#8211; Download the <u>feed-statistics.php</u> file.</li><li>Search for two things, both are with functions called &#8216;update_option&#8217;</li></ul><p><strong>Search for:</strong></p><div
class="mycode"><pre name="code" class="php">update_option(&quot;feed_statistics_track_clickthroughs&quot;, &quot;0&quot;);
update_option(&quot;feed_statistics_expiration_days&quot;,&quot;3&quot;);</pre></div><ul><li>Replace the track_clickthroughs lines in two locations.</li><li>Replace the expiration_days change line in one location.</li><li>Save the file and re-upload.</li></ul><p><strong>Replace With:</strong></p><div
class="mycode"><pre name="code" class="php">update_option(&quot;feed_statistics_track_clickthroughs&quot;, &quot;1&quot;);
update_option(&quot;feed_statistics_expiration_days&quot;,&quot;30&quot;);</pre></div><hr
size="1" /><div
align="center" style="font-size:28px"><strong>Making The Change Live</strong></div><h2>Step 5:</h2><h3>Changing / Setting Up Feed URL Redirects</h3><p>If you currently 301 Redirect your Feeds to Feedburner you&#8217;ll need to disable the directs and point them to the root Feed URL on your site, that you put into Feedburner originally. <strong>Something like</strong>: <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3RlY2huZXJkaWEuY29tL2ZlZWQ=" target=\"_blank\" rel=\"nofollow\">http://technerdia.com/feed</a></p><p><strong>Redirects</strong>: You have two choices basically.</p><ul><li>For standalone WordPress sites I recommend setting up the redirects in your root .htaccess file, this is the fastest and most reliable way to do the redirects. The examples below are the long methods to doing redirects, <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5hc2thcGFjaGUuY29tL2h0YWNjZXNzL3JlZGlyZWN0aW5nLXdvcmRwcmVzcy1mZWVkcy10by1mZWVkYnVybmVyLmh0bWw=" target=\"_blank\" rel=\"nofollow\">read this article</a> for RewriteRules for Feedburner that can easily be changed to your own feed URL.</li><li>For WordPress Multisites you can&#8217;t do this without sites conflicting, so I recommend using the <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3dvcmRwcmVzcy5vcmcvZXh0ZW5kL3BsdWdpbnMvcmVkaXJlY3Rpb24v" target=\"_blank\" rel=\"nofollow\">Redirection Plugin</a>, which works perfectly on Multisite installs.</li></ul><p><strong>Example 1</strong> .htaccess files redirects &#8211; Keeping comment, category, and other post feeds while redirecting main Feed URLs into one location.</p><div
class="mycode"><pre name="code" class="html">redirect 301 /wp-commentrss2.php http://your-domain.com/feed
redirect 301 /wp-atom.php http://your-domain.com/feed
redirect 301 /wp-rss2.php http://your-domain.com/feed
redirect 301 /wp-rss.php http://your-domain.com/feed
redirect 301 /feed/atom http://your-domain.com/feed
redirect 301 /feed/rss2 http://your-domain.com/feed
redirect 301 /feed/rss http://your-domain.com/feed
redirect 301 /feed/rdf http://your-domain.com/feed
redirect 301 /rss.php http://your-domain.com/feed
redirect 301 /feeds http://your-domain.com/feed
redirect 301 /rss http://your-domain.com/feed</pre></div><p><strong>Example 2</strong> .htaccess files redirects &#8211; This redirects all Feed URLs, comment, category, archive, and post feeds into one central location. This is what I use on technerdia.com &#8211; If you add /feed to the end of this post, it will redirect you to my root feed: technerdia.com/feed</p><div
class="mycode"><pre name="code" class="html">redirect 301 /wp-commentrss2.php http://your-domain.com/feed
redirect 301 ^/(.*)/feed$ http://your-domain.com/feed
redirect 301 /wp-atom.php http://your-domain.com/feed
redirect 301 /wp-rss2.php http://your-domain.com/feed
redirect 301 /wp-rss.php http://your-domain.com/feed
redirect 301 /feed/atom http://your-domain.com/feed
redirect 301 /feed/rss2 http://your-domain.com/feed
redirect 301 /feed/rss http://your-domain.com/feed
redirect 301 /feed/rdf http://your-domain.com/feed
redirect 301 /htmlfeed http://your-domain.com/feed
redirect 301 /comments http://your-domain.com/feed
redirect 301 /rss.php http://your-domain.com/feed
redirect 301 /feeds http://your-domain.com/feed
redirect 301 /rss http://your-domain.com/feed</pre></div><p><strong>Example3</strong>: Using the above redirects in the <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3dvcmRwcmVzcy5vcmcvZXh0ZW5kL3BsdWdpbnMvcmVkaXJlY3Rpb24v" target=\"_blank\" rel=\"nofollow\">Redirection Plugin</a>.</p><div
class="mycode"><pre name="code" class="html">/wp-commentrss2.php /feed
^/(.*)/feed$ /feed
/wp-atom.php /feed
/wp-rss2.php /feed
/wp-rss.php /feed
/feed/atom /feed
/feed/rss2 /feed
/feed/rss /feed
/feed/rdf /feed
/htmlfeed /feed
/comments /feed
/rss.php /feed
/feeds /feed
/rss /feed</pre></div><hr
size="1" /><h2>Step 6:</h2><h3>Swapping Out Feed URL&#8217;s In Feedburner &amp; Turning Off Services</h3><p>Not everyone will need to do this&#8230;. If you&#8217;re just putting an update notice into your current feed and waiting for the change to happen naturally, ignore the step.</p><ol><li>For everyone else, you need to change the Feed URL in your Feedburner account AND shut off the extra features, like pinging.</li><li>Log into your Feedburner account and click on the Feed in question.</li><li>Then, click on the Publicize Tab and shut off Ping Shot and Socialize options.</li><li>Then click the &#8220;Edit Feed Details&#8221; link at the top and change the URL, to the Temporary RSS Feed that we created in Step 3.</li><li>Mine is set to: <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3RlY2huZXJkaWEuY29tL3NlYXJjaC94bWwvcnNzLXRuLnhtbA==" target=\"_blank\" rel=\"nofollow\">http://technerdia.com/search/xml/rss-tn.xml</a></li></ol><hr
size="1" /><h2>Step 7:</h2><h3>Check Your Work!</h3><p>It&#8217;s time to ensure everything is working before we proceed. Visually check your Feedburner URL in the browser to see if it has updated, then check it in a Reader by adding a new record to make sure it displays correctly. The new temporary RSS Feed Notice should appear or your RSS Footer notice to update the Feed URL.</p><ul><li>Repeat the same steps with your new Feed URL. Make sure the Websites updates appear and that the RSS Footer notice is showing up.</li><li>Check Feed Statistics by clicking on the Feed Menu link &gt; Top Feeds link option to see if Subscribers are showing up. It will take a few days for it to settle down.</li></ul><hr
size="1" /><h2>Step 8:</h2><h3>Update Your Websites</h3><p>Oh the tasks of tasks! It&#8217;s not just Templates it&#8217;s also Widgets.</p><p>FTP to your theme, download the entire theme, open every PHP file in a Text Editor like <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5mbG9zLWZyZWV3YXJlLmNoL25vdGVwYWQyLmh0bWw=" target=\"_blank\" rel=\"nofollow\">Notepad 2</a>. Find &amp; Replace (Edit &gt; Replace or CTRL+H) your Feedburner URL with your Sites default/new Feed URL.</p><p><strong>Do this for every template, once done upload the templates back</strong>.</p><ul><li>Enter your WordPress Admin &gt; Appearance Menu &gt; Widgets. Open your Widgets Areas and view the Widgets. Scan through each (Normally Text &amp; PHP Widgets) and find/replace the Feedburner URL with your new Feed URL.</li><li>Refresh Your Cache.</li></ul><hr
size="1" /><h2>Step 9:</h2><h3>Update the Social Networks &amp; Online Services</h3><p>Many of us have socialized our Feedburner URLs, pinged them, posted them, done all types of stuff with the URL. So first, update your Social Networks from Step #1 1/2 then hunt down every other Social Network or Service that you may have used your Feedburner URL on and replace it with your new pimpin Feed URL.</p><p><em>This task may extend far past today&#8217;s duties depending on what you&#8217;ve done with your Feedburner URL.</em></p><hr
size="1" /><h2>Step 10:</h2><h3>Down The Road</h3><p>I can&#8217;t think of a reason to ever delete your Feedburner feed, unless it&#8217;s fully dead. As the months roll by you should change out the notice to update the Feed URL, maybe add a Video notice in. The final update that I do, will include a self promo landing page within the Feed. If anyone happens to find it, at least I know they&#8217;ll get what I feel is important, some marketing, and information on how to update Feed URLs.</p><hr
size="1" /><p><strong>That&#8217;s It!!!</strong><br
/> I tried to be as detailed as possible with the steps I took&#8230; This may seem like a lot of work, but really it isn&#8217;t bad. I was able to set up and swap out 10 sites Feeds in less than an hour, once you do it once, it&#8217;s a snap after that.</p><hr
/><h4>Have something to say about this article? Like it, love it, hate it?</h4><p>Drop me some <a
href="http://technerdia.com/feedback.html" target="_blank">feedback</a> and let me know!</p><br
/><p><div
style="border-top:1px dotted #cccccc;clear:both;font-size:14px;font-weight:bold;margin:2px 10px;padding:0 10px;text-align:left;"><ul><li><b>New WordPress Plugin</b> <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3RlY2huZXJkaWEuY29tL3Byb2plY3RzL2FkbWluYmFyL3BsdWdpbi5odG1s" target=\"_blank\">WP My Admin Bar</a> (It's Free, Download Today!)</li><li><b>Reading:</b> <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3RlY2huZXJkaWEuY29tLzUyNF9yZW1vdmluZy1mZWVkYnVybmVyLmh0bWw=">10 Steps to Replacing Feedburner With Your Own Feed URL &#8211; with Statistics</a> <b>By:</b> <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cHM6Ly9wbHVzLmdvb2dsZS5jb20vMTA1NDA4MDgyNTcxNDU0MDEwMTUyLw==" target=\"_blank\">tribalNerd</a> <b>From:</b> <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3RlY2huZXJkaWEuY29tLw==" target=\"_blank\">techNerdia - Web Development Tips</a></li><li><b><a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cHM6Ly9wbHVzLmdvb2dsZS5jb20vdS8wLzEwODA0NjIyNTkxMzk2NTMxNTU5NC9wb3N0cw==" target=\"_blank\">Follow techNerdia on Google+</a></li></ul></div><p
align="center">~ <b>Thank you for subscribing to techNerdia.com - Please Share This Post With Others</b> ~</p></p> <img
src="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=524" width="1" height="1" style="display: none;" />]]></content:encoded> <wfw:commentRss>http://technerdia.com/524_removing-feedburner.html/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
