<?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 &#187; wp</title> <atom:link href="http://technerdia.com/tag/wp/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>If you've enjoyed this article then please leave me some <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=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>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>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>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=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>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 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=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>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=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>If you've enjoyed this article then please leave me some <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=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> <item><title>WP Function that protects your wp-login.php with PHP Auth [UPDATED]</title><link>http://technerdia.com/313_wp-login-protection.html</link> <comments>http://technerdia.com/313_wp-login-protection.html#comments</comments> <pubDate>Mon, 21 Mar 2011 14:15:29 +0000</pubDate> <dc:creator>tribalNerd</dc:creator> <category><![CDATA[Security]]></category> <category><![CDATA[Wordpress]]></category> <category><![CDATA[function]]></category> <category><![CDATA[htaccess]]></category> <category><![CDATA[php]]></category> <category><![CDATA[security]]></category> <category><![CDATA[wp]]></category> <guid
isPermaLink="false">http://technerdia.com/?p=313</guid> <description><![CDATA[A simple WP Function that password protects the wp-login.php file on Wordpress setups.<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/313_wp-login-protection.html">WP Function that protects your wp-login.php with PHP Auth [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><img
src="http://technerdia.com/files/protect-wp-login.gif" alt="Protect Your WordPress Login Page" width="250" height="250" class="alignleft size-full wp-image-326" />The Function below adds a simple layer of security to your WordPress Websites. When anyone visits the wp-login.php page an authentication window will pop prompting the visitor to enter a Username and Password before they can access the wp-login.php file.</p><p>This is a simple protection solution for any WordPress site with Registrations turned off and for sites with very few or only one person that manages them.</p><p>Place the function below into your functions.php file for each WordPress Theme/site that you want to protect. Swap out the YOUR-USERNAME and YOUR-PASSWORD with your user/pass info, and it&#8217;s ready to go!</p><div
class="mycode"><pre name="code" class="php">
 if ( $_SERVER['PHP_SELF'] == "/wp-login.php" ) { add_action( 'init', 'login_init' ); /* Do Action */ }
function login_init() {
 $user = "YOUR-USERNAME";
 $pass = "YOUR-PASSWORD";
  get_option('get_header');
if( $_SERVER['PHP_AUTH_USER'] != $user &#038;&#038; $_SERVER['PHP_AUTH_PW'] != $pass ) {
    header("WWW-Authenticate: Basic realm=""");
    header("HTTP/1.0 401 Unauthorized");
exit;
  }
}
</pre></div><h2>Version 2</h2><p>If the above example works, but a correct username &amp; password doesn&#8217;t seem to be accepted, the issue might be that PHP can not access the PHP_AUTH_USER and PHP_AUTH_PW functions.</p><p>To correct this you&#8217;ll need use a RewriteRule.</p><h2>The RewriteRule</h2><p>Use ONE of the following RewriteRules in your Websites root .htaccess file. I do not fully understand this rule, but it appears that:</p><blockquote>The PHP_AUTH_USER and PHP_AUTH_PW functions and values of them, when entered into the auth box, is loaded into a variable called HTTP_AUTHORIZATION. The PHP afterward then gets the PHP_AUTH_USER and PHP_AUTH_PW values by accessing the HTTP_AUTHORIZATION variable.</blockquote><p>** Test your Website after adding the rewrite rule. Posts, Pages and Images will 404 if you have the incorrect one.</p><p><strong>Worked On WordPress Multisite</strong> &#8211; Put the Rule directly below <i>RewriteEngine On</i> line, within the .htaccess file of your Website.</p><div
class="mycode"><pre name="code" class="php">RewriteRule .? - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]</pre></div><p><strong>Other Possible RewriteRules</strong>: The first RewriteRule below is the most common use rule.</p><div
class="mycode"><pre name="code" class="html">RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]</pre></div><div
class="mycode"><pre name="code" class="html">RewriteEngine On
RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization},last]</pre></div><div
class="mycode"><pre name="code" class="html">RewriteEngine On
RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization}]</pre></div><p><strong>The Code</strong><br
/> Place the function below into your functions.php file for each WordPress Theme/site that you want to protect. Swap out the YOUR-USERNAME and YOUR-PASSWORD with your user/pass info.</p><div
class="mycode"><pre name="code" class="php">
if ( $_SERVER['PHP_SELF'] == "/wp-login.php" ) {
    add_action( 'init', 'login_init' );
}
function login_init() {
    $user = "YOUR-USERNAME";
    $pass = "YOUR-PASSWORD";
    get_option('get_header');
    list( $_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW'] ) = explode( ':', base64_decode( substr( $_SERVER['HTTP_AUTHORIZATION'], 6 ) ) );
    if ( $user == $_SERVER['PHP_AUTH_USER'] &#038;&#038; $pass == $_SERVER['PHP_AUTH_PW'] ) {
        header('WWW-Authenticate: Basic realm=""');
        header("HTTP/1.0 401 Unauthorized");
        echo '';
        exit;
    }
 }</pre></div><ul><li>You can use the same username and password for each site, however I recommend each site has at least a unique password.</li><li>Do Not use the same username and password that you use to access the WordPress Admin.</li><li>Don&#8217;t forget to sometimes change your username and passwords up.</li><li>Use Password <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3RlY2huZXJkaWEuY29tLzI4NF9wYXNzd29yZC1tYW5hZ2VyLmh0bWw=">Management Software like KeePass</a> to manage your passwords.</li><li>Remember, this is simply an extra layer of security, it for sure is NOT a solid solution for protection &#8211; you should still select a very complex master username and password to access the Admin along with other WordPress Security Plugins.</li></ul><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=aHR0cDovL3RlY2huZXJkaWEuY29tLzMxM193cC1sb2dpbi1wcm90ZWN0aW9uLmh0bWw=">WP Function that protects your wp-login.php with PHP Auth [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=313" width="1" height="1" style="display: none;" />]]></content:encoded> <wfw:commentRss>http://technerdia.com/313_wp-login-protection.html/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>10 WordPress Forum Plugins</title><link>http://technerdia.com/176_forum-plugins.html</link> <comments>http://technerdia.com/176_forum-plugins.html#comments</comments> <pubDate>Tue, 27 Jan 2009 16:43:18 +0000</pubDate> <dc:creator>tribalNerd</dc:creator> <category><![CDATA[Plugins]]></category> <category><![CDATA[Wordpress]]></category> <category><![CDATA[bbs]]></category> <category><![CDATA[board]]></category> <category><![CDATA[forums]]></category> <category><![CDATA[plugin]]></category> <category><![CDATA[web boards]]></category> <category><![CDATA[wp]]></category> <guid
isPermaLink="false">http://technerdia.com/?p=176</guid> <description><![CDATA[The top 5 standalone Wordpress Forum Plugins and the Top 5 Plugins that bridge external Forum software with a Wordpress Website.<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/176_forum-plugins.html">10 WordPress Forum Plugins</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>This list consists of two main types of Forums that can be adapted to WordPress. The first are the plugins, all of which directly integrate the forum within WordPress. The second is standalone forum software, which have plugins that allow features of the Forum to be added to Themes.</p><ul><li>All links will open in a  new tab/window.</li></ul> <br
/><h2>5 Standalone Worpdress Forum Plugins</h2><br
/><h3>Simple:Press &#8211; Simple Press</h3><p>Simple Press is a customizable, scalable, feature rich, and completely integrated WordPress. <br
/> <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3NpbXBsZS1wcmVzcy5jb20vZG93bmxvYWQv" target=\"_blank\"><img
src="files/forum_simple-press.jpg" alt="Simple Press WordPress Plugin" width="600" height="125" class="aligncenter" style="border:1px solid #333333" /></a></p><div
align="center" style="margin-bottom:75px">[ <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3NpbXBsZS1wcmVzcy5jb20vZG93bmxvYWQv" target=\"_blank\">Visit Simple-press.com</a> ]</div><h3>bbPress</h3><p>bbPress is known for being plain and simple, however this plugin contains many features, it&#8217;s highly customizable, and has a rather easy to use admin interface.<br
/> <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3dvcmRwcmVzcy5vcmcvZXh0ZW5kL3BsdWdpbnMvYmJwcmVzcy8=" target=\"_blank\"><img
src="files/forum_bbpress.jpg" alt="bbPress WordPress Plugin" width="600" height="125" class="aligncenter" style="border:1px solid #333333" /></a></p><div
align="center" style="margin-bottom:75px">[ <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3dvcmRwcmVzcy5vcmcvZXh0ZW5kL3BsdWdpbnMvYmJwcmVzcy8=" target=\"_blank\">Downlaod bbPress</a> ]</div><h3>WP Forum Server</h3><p>The ForumPress WordPress Plugin is a complete forum system build within the WordPress system, meaning it integrates easily into your Website.<br
/> <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3dvcmRwcmVzcy5vcmcvZXh0ZW5kL3BsdWdpbnMvZm9ydW0tc2VydmVyLw==" target=\"_blank\"><img
src="files/forum_forumpress.jpg" alt="WP Forum Server WordPress Plugin" width="600" height="125" class="aligncenter" style="border:1px solid #333333" /></a></p><div
align="center" style="margin-bottom:75px">[ <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3dvcmRwcmVzcy5vcmcvZXh0ZW5kL3BsdWdpbnMvZm9ydW0tc2VydmVyLw==" target=\"_blank\">Download WP Forum</a> ]</div><h3>Mingle Forum</h3><p>Keep it Simple with Mingle Forum&#8217;s lightweight, solid, secure and easy to setup WordPress Plugin.<br
/> <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3dvcmRwcmVzcy5vcmcvZXh0ZW5kL3BsdWdpbnMvbWluZ2xlLWZvcnVtLw==" target=\"_blank\"><img
src="files/forum_mingleforum.jpg" alt="Mingle Forum WordPress Plugin" width="600" height="125" class="aligncenter" style="border:1px solid #333333" /></a></p><div
align="center" style="margin-bottom:75px">[ <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3dvcmRwcmVzcy5vcmcvZXh0ZW5kL3BsdWdpbnMvbWluZ2xlLWZvcnVtLw==" target=\"_blank\">Download Mingle Forum</a> ]</div><h3>BuddyPress</h3><p>BuddyPress is bit more than just a Forum or just a Plugin. It&#8217;s more of an extension pack for WordPress, adding several social networking features. Like friends, private messages, extended profiles and of course Forums.<br
/> <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3dvcmRwcmVzcy5vcmcvZXh0ZW5kL3BsdWdpbnMvYnVkZHlwcmVzcy8=" target=\"_blank\"><img
src="files/forum_buddypress.jpg" alt="BuddyPress Social Network for WordPress" width="600" height="125" class="aligncenter" style="border:1px solid #333333" /></a></p><div
align="center" style="margin-bottom:75px">[ <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3dvcmRwcmVzcy5vcmcvZXh0ZW5kL3BsdWdpbnMvYnVkZHlwcmVzcy8=" target=\"_blank\">Download BuddyPress</a> ]</div> <br
/><h2>5 External Forum Scripts with WordPress Plugins</h2><br
/><h3>wp2bb &#8211; WordPress to phpBB</h3><p>Wp2BB allows you to connect your phpBB Forum to WordPress. When new posts to the blog are made, the forum is updated and even the comments on the blog can be updated from the forum.<br
/> <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5waHBiYi5jb20v" target=\"_blank\"><img
src="files/forum_phpbb.jpg" alt="phpBB Forum Software" width="600" height="125" class="aligncenter" style="border:1px solid #333333" /></a></p><div
align="center" style="margin-bottom:75px">[ <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5waHBiYi5jb20v" target=\"_blank\">Visit Phpbb.com</a> ][ <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3dvcmRwcmVzcy5vcmcvZXh0ZW5kL3BsdWdpbnMvd3AyYmIv" target=\"_blank\">wp2bb Plugin</a> ]</div><h3>WordBB &#8211; myBB Bridge to WordPress</h3><p>WordBB offers the ability to create a thread for each blog post in a particular section so that the forum can be used as a replacement for the WordPress blog comment system.<br
/> <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5teWJiLmNvbS8=" target=\"_blank\"><img
src="files/forum_mybb.jpg" alt="WordBB Forum Software" width="600" height="125" class="aligncenter" style="border:1px solid #333333" /></a></p><div
align="center" style="margin-bottom:75px">[ <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5teWJiLmNvbS8=" target=\"_blank\">Visit Mybb.com</a> ][ <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3dvcmRwcmVzcy5vcmcvZXh0ZW5kL3BsdWdpbnMvd29yZGJiLw==" target=\"_blank\">myBB Plugin</a> ]</div><h3>punBB Latest Topics Widget</h3><p>punBB Latest Topics Plugin currently displays the most recent topics from all of your punBB forums.<br
/> <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3B1bmJiLmluZm9ybWVyLmNvbS8=" target=\"_blank\"><img
src="files/forum_punbb.jpg" alt="punBB Forum Software" width="600" height="125" class="aligncenter" style="border:1px solid #333333" /></a></p><div
align="center" style="margin-bottom:75px">[ <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3B1bmJiLmluZm9ybWVyLmNvbS8=" target=\"_blank\">Visit Website</a> ][ <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3dvcmRwcmVzcy5vcmcvZXh0ZW5kL3BsdWdpbnMvcHVuYmItbGF0ZXN0LXRvcGljcy8=" target=\"_blank\">punBB Plugin</a> ]</div><h3>Simple Machines</h3><p>WP-SMF-Bridge is a simple user registration and login bridge between WordPress and Simple Machine Forum.<br
/> <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5zaW1wbGVtYWNoaW5lcy5vcmcv" target=\"_blank\"><img
src="files/forum_simplemachine.jpg" alt="Simple Machines Forum Software" width="600" height="125" class="aligncenter" style="border:1px solid #333333" /></a></p><div
align="center" style="margin-bottom:75px">[ <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5zaW1wbGVtYWNoaW5lcy5vcmcv" target=\"_blank\">Visit Simplemachines.org</a> ][ <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3dvcmRwcmVzcy5vcmcvZXh0ZW5kL3BsdWdpbnMvd3Atc21mLWJyaWRnZS8=" target=\"_blank\">Simple Machines Plugin</a> ]</div><h3>vBulletin</h3><p>vBulletin is the largest forum software on the &#8216;net, however it&#8217;s not free&#8230; but because it&#8217;s extremely powerful &amp; very tested, it&#8217;s worth listing.<br
/> <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cHM6Ly93d3cudmJ1bGxldGluLmNvbS8=" target=\"_blank\"><img
src="files/forum_vbulletin.jpg" alt="vBulletin Forum Software" width="600" height="125" class="aligncenter" style="border:1px solid #333333" /></a></p><div
align="center" style="margin-bottom:75px">[ <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cHM6Ly93d3cudmJ1bGxldGluLmNvbS8=" target=\"_blank\">Visit Simplepie.org</a> ][ <a
href="http://technerdia.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3dvcmRwcmVzcy5vcmcvZXh0ZW5kL3BsdWdpbnMvc2VhcmNoLnBocD9xPXZCdWxsZXRpbg==" target=\"_blank\">vBulletin Plugins</a> ]</div> <br
/><br
/><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=aHR0cDovL3RlY2huZXJkaWEuY29tLzE3Nl9mb3J1bS1wbHVnaW5zLmh0bWw=">10 WordPress Forum Plugins</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=176" width="1" height="1" style="display: none;" />]]></content:encoded> <wfw:commentRss>http://technerdia.com/176_forum-plugins.html/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
