<?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>HighEdWebTech &#187; wordpress</title>
	<atom:link href="http://highedwebtech.com/category/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://highedwebtech.com</link>
	<description>Higher Ed Web Development</description>
	<lastBuildDate>Sat, 12 May 2012 17:53:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>WordPress Inception, or: Adding a user to WordPress the hard way</title>
		<link>http://highedwebtech.com/2012/05/07/wordpress-adding-users/</link>
		<comments>http://highedwebtech.com/2012/05/07/wordpress-adding-users/#comments</comments>
		<pubDate>Mon, 07 May 2012 16:11:52 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[wordpress]]></category>
		<category><![CDATA[add user]]></category>
		<category><![CDATA[theme]]></category>
		<category><![CDATA[wp_generate_password]]></category>
		<category><![CDATA[wp_insert_user]]></category>

		<guid isPermaLink="false">http://highedwebtech.com/?p=2094</guid>
		<description><![CDATA[I recently was helping a friend with their friend&#8217;s WordPress installation that they were having problems logging into. No problem, I thought, this should be easy. Unfortunately, all I had been given was the FTP login for the account. I &#8230; <a href="http://highedwebtech.com/2012/05/07/wordpress-adding-users/">Continued</a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://media.highedwebtech.com/wp-content/uploads/2012/05/xzwp.png"><img class="alignright size-medium wp-image-2095" title="xzwp" src="http://media.highedwebtech.com/wp-content/uploads/2012/05/xzwp-300x199.png" alt="" width="300" height="199" /></a>I recently was helping a friend with their friend&#8217;s WordPress installation that they were having problems logging into. No problem, I thought, this should be easy. Unfortunately, all I had been given was the FTP login for the account. I lacked was a login to the actual WordPress system.</p>
<p>The challenge: un-hack their WordPress then login and make sure everything is cool. The FTP part was easy &#8211; I just re-installed WordPress&#8217; core files. I could go on here about why its important to keep your WordPress up to date, but <a href="http://highedwebtech.com/2009/09/07/make-sure-your-wordpress-is-up-to-date/">I&#8217;ve done that before</a>.</p>
<p>Since the person whose blog this is was out of the country, I couldn&#8217;t contact them to get a login, and since they were having login troubles anyway due to the hack, we were kind of stuck.</p>
<p>One of the things I like about WordPress is that it&#8217;s user-friendly for end-users, but underneath the hood is a pretty serious framework. I&#8217;m constantly finding new features, functions and calls to do things I want WordPress to do that it might not ordinarily by default.</p>
<p>In my case, I needed to get a user into WordPress. After some poking around and reading documentation, I found a WordPress function, <code>wp_insert_user</code>, which will put a user into the system. I found you couldn&#8217;t just call this from a post or a page, but I found wrapping it in a function, putting it in the functions.php file of the theme and calling it on page_init worked pretty well. Here&#8217;s the code:</p>
<pre class="brush: php; title: ; notranslate">
function ft_insert_user(){
	$newUserData = array (
	   'ID' =&gt; '',
	   'user_pass' =&gt; wp_generate_password(),
	   'user_login' =&gt; 'mike',
	   'user_nicename' =&gt; 'mike',
	   'user_url' =&gt; '',
	   'user_email' =&gt; 'mike@highedwebtech.com',
	   'display_name' =&gt; 'Mike',
	   'nickname' =&gt; 'Mike',
	   'first_name' =&gt; 'Mike',
	   'user_registered' =&gt; '2011-10-16 08:54:47',
	   'role' =&gt; 'Administrator'
	);

	$newUserId = wp_insert_user( $newUserData );
}
add_action( 'wp_head', 'ft_insert_user' );
</pre>
<p>The trick with this is I let WordPress generate me a password. I didn&#8217;t get a password in my email, but it was easily reset and I was able to login. However, I wasn&#8217;t an admin (I&#8217;m sure my code about could be better.) After some Googling, I found this PHP script which can be run outside of WordPress (but in your web root) that will assign a specific role to a specific user. This script assumes you know your user ID.</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php
/*
 * Updates user role using WordPress function wp_update_user.
 *
 * Simple script to be run at webroot. Update user_id and new_role to taste
 * and run as regular PHP file on command line.
 *
 * @package WordPress
 */

require( './wp-load.php' );

// id of user to update
$user_id = 2;

/*
 * Basic list of user roles
 *
 * administrator
 * editor
 * author
 * contributor
 * subscriber
 *
 */

// user role to update to
$new_role = 'administrator';

// update user role using wordpress function
wp_update_user( array ('ID' =&gt; $user_id, 'role' =&gt; $new_role ) ) ;

?&gt;
</pre>
<p>Now, I was an admin user and could check the theme and all other settings that are available to administrators, including installing plugins, starting with <a href="https://wordpress.org/extend/plugins/better-wp-security/">Better WP Security</a>, developed by higher ed&#8217;s own <a href="http://bit51.com/">Chris Wiegman</a>.</p>
<p>The thing to remember is that with method, you need to have FTP or shell access to the area that contains the theme or web root. You can&#8217;t just use these functions on any WordPress site.</p>
]]></content:encoded>
			<wfw:commentRss>http://highedwebtech.com/2012/05/07/wordpress-adding-users/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Caching Expensive Queries in WordPress</title>
		<link>http://highedwebtech.com/2012/03/26/caching-expensive-queries-in-wordpress/</link>
		<comments>http://highedwebtech.com/2012/03/26/caching-expensive-queries-in-wordpress/#comments</comments>
		<pubDate>Mon, 26 Mar 2012 13:45:46 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[APC]]></category>
		<category><![CDATA[WordPress APC Caching]]></category>
		<category><![CDATA[wordpress caching]]></category>

		<guid isPermaLink="false">http://highedwebtech.com/?p=2055</guid>
		<description><![CDATA[You can make WordPress faster by using PHP and APC to do caching to make your pages load faster for your site visitors. ]]></description>
			<content:encoded><![CDATA[<p>I love WordPress. One thing to know about it, though, is that it queries MySQL for a lot of data. This is fine for most single sites, but at our institution we&#8217;re running a very large multisite install and every query or call I can reduce means I can generate pages faster. Faster is always better, and even though we&#8217;re doing WordPress caching with the <a href="http://wordpress.org/extend/plugins/wp-super-cache/">WP Super Cache</a> plugin, there&#8217;s always opportunities to improve the speed.</p>
<p>One way is help WordPress (which is built on PHP) and MySQL by caching some expensive queries, that is, queries that return large result sets or you join lots of tables together on certain values. In our case, we&#8217;ve installed <a href="http://php.net/manual/en/book.apc.php">APC</a> on our dedicated server and are trying it out as a user and opcode cache for some WordPress data to help speed things up. Here&#8217;s some ways you can do the same:</p>
<p>On one of our page templates, we query WordPress for a custom post type, in our case a calendar of events. Since some of our sites have many events, this query can take a bit of time to execute. We can help out by storing the result of the MySQL in memory and calling that as needed.  Here&#8217;s some code:</p>
<pre class="brush: php; title: ; notranslate">
$cachequery = &quot;bb_&quot;.$blog-&gt;ID;
$cacheexpire = 1800;

if($mypost = apc_fetch($cachequery)){
 echo &quot;&lt;!-- cached query --&gt;&quot;;
}else{
 $mypost = query_posts($args);
 apc_store($cachequery,$mypost,$cacheexpire);
 echo &quot;&lt;!-- caching this --&gt;&quot;;
}
</pre>
<p>The first we do is declare a variable, <code>$cachequery</code>, which is specificially generated per site, using the blog&#8217;s ID and a prefix depending on what template and query we&#8217;re using. In our case, the bb_ stands for big button, a template that looks like <a href="http://sites.jcu.edu/alumni/">this</a>.</p>
<p>At this point we also define how long we want this data to be cached. In this case, I say 1800 seconds, which is 30 minutes. This could probably be longer, such as 3600 seconds, but I&#8217;m working to find a sweet spot of speed and making sure the user is always seeing good data.</p>
<p><a href="http://media.highedwebtech.com/wp-content/uploads/2012/03/Screen-Shot-2012-03-25-at-6.37.55-PM.png"><img class="alignright size-thumbnail wp-image-2062" title="Screen Shot 2012-03-25 at 6.37.55 PM" src="http://media.highedwebtech.com/wp-content/uploads/2012/03/Screen-Shot-2012-03-25-at-6.37.55-PM-150x150.png" alt="" width="150" height="150" /></a>On line 4, you&#8217;ll see that we need to do is see if APC and PHP are currently storing any data for our variable. If there is good data, it is stored in the <code>$mypost</code> variable, and we echo a response, which is optional.</p>
<p>If PHP doesn&#8217;t a result from APC, the data hasn&#8217;t been cached yet. So we run the query, store it in the <code>$mypost</code> variable, and write the value to the APC store. Also, if the data is older than 1800 seconds, APC will return an invalid response and the query will be run fresh. This happens because we set the expiration time in the <code>apc_store</code> function.</p>
<p>APC has a nice PHP page you can install that will give you a report of how APC is doing and what data is being cached. It makes some nice graphs, but also allows you to explore the user-generated data, such as what we cached above. Let&#8217;s look at one of our stored variables and what APC is actually caching.</p>
<p><a href="http://media.highedwebtech.com/wp-content/uploads/2012/03/Screen-Shot-2012-03-25-at-6.38.40-PM.png"><img class="aligncenter size-full wp-image-2066" title="Screen Shot 2012-03-25 at 6.38.40 PM" src="http://media.highedwebtech.com/wp-content/uploads/2012/03/Screen-Shot-2012-03-25-at-6.38.40-PM.png" alt="" width="600" /></a></p>
<p>If we view the detail for an entry, we can see what&#8217;s being stored, in this case the array that WordPress returns when we use the <code>get_posts</code> or <code>query_posts</code> functions.</p>
<p><a href="http://media.highedwebtech.com/wp-content/uploads/2012/03/Screen-Shot-2012-03-25-at-6.53.48-PM.png"><img class="aligncenter size-medium wp-image-2069" title="Screen Shot 2012-03-25 at 6.53.48 PM" src="http://media.highedwebtech.com/wp-content/uploads/2012/03/Screen-Shot-2012-03-25-at-6.53.48-PM-300x252.png" alt="" width="300" height="252" /></a></p>
<p>I&#8217;ve been keeping an eye on WordPress and the APC status for a few days now, and all seems well. I think this is also something I&#8217;d look into when building a non-WordPress PHP application as well. Faster is always better.</p>
]]></content:encoded>
			<wfw:commentRss>http://highedwebtech.com/2012/03/26/caching-expensive-queries-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>SendGrid + WordPress = Happy Web Developer</title>
		<link>http://highedwebtech.com/2012/02/15/sendgrid-transactional-email/</link>
		<comments>http://highedwebtech.com/2012/02/15/sendgrid-transactional-email/#comments</comments>
		<pubDate>Wed, 15 Feb 2012 17:03:20 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Cloud]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[Outsourcing]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[SendGrid]]></category>
		<category><![CDATA[transactional email]]></category>
		<category><![CDATA[transactional emails]]></category>

		<guid isPermaLink="false">http://highedwebtech.com/?p=1979</guid>
		<description><![CDATA[SendGrid integrates nicely into WordPress to ensure that transactional email is sent quickly, easily, and reaches its correct destination.]]></description>
			<content:encoded><![CDATA[<p><img alt="SendGrid Logo" src="http://media.marketwire.com/attachments/201111/44612_SendGridLogo1.jpg" title="SendGrid Logo" class="alignright" width="294" height="88" />Over the past 18 months, we&#8217;ve been rolling out WordPress to our campus users. The process has been going really well, but we found ourselves struggling in one particular area: transactional email to users.</p>
<p>These types of emails would include account setups, password resets, etc. Since we host our WordPress installation off-campus, somewhere in the tubes between there and our mail system here the mails were being eaten, quite possibly by a large, scary email-eating koala bear. In reality, it was probably an overzealous filter somewhere on our campus end that couldn&#8217;t guarantee that emails coming from our Rackspace box to campus really were legit and really were from a University account. </p>
<p>This made creating user accounts very labor intensive. Instead of just emailing login details, password reset requests and more directly to the user, we found ourselves creating an account for a person and immediately resetting their password, and then giving them the login details. Same went for password changes, they were never getting the transactional email to reset their passwords, so they were calling us. Not efficient.</p>
<p>Enter <a href="http://sendgrid.com/">SendGrid</a>. They are one of a few providers of email service, but unlike MailChimp or Constant Contact, they aren&#8217;t about the marketing and list management end of emails. They are about providing a delivery gateway to ensure that emails reach their intended destinations with a high degree of reliability. </p>
<p>After setting up an account at SendGrid (look for the free plan at the bottom of <a href="http://sendgrid.com/pricing.html">this page</a> to try it out. You get 200 emails per day and we&#8217;ve never come close to reaching that), SendGrid&#8217;s documentation directed us to a page about <a href="http://docs.sendgrid.com/documentation/get-started/integrate/examples/wordpress/">integrating SendGrid with WordPress</a>. </p>
<p>Using the <a href="http://wordpress.org/extend/plugins/wp-mail-smtp/">WP Mail SMTP plugin</a>, we are able to now avoid using the default <code>wp_mail()</code> and PHP mail commands from our server and instead we have our transactional email sent via SendGrid. To keep the admin panel from showing up and potentially confusing users, even admin users, the plugin allows you to put some details in your <code>wp-config.php</code> file. That code looks like this:</p>
<pre class="brush: php; title: ; notranslate">
define('WPMS_ON', true);
define('WPMS_MAIL_FROM', 'webmaster@gallifrey.edu');
define('WPMS_MAIL_FROM_NAME', 'Gallifrey University CMS');
define('WPMS_MAILER', 'smtp');
define('WPMS_SET_RETURN_PATH', 'false');
define('WPMS_SMTP_HOST', 'smtp.sendgrid.net');
define('WPMS_SMTP_PORT', 587); //
define('WPMS_SSL', '');
define('WPMS_SMTP_AUTH', true);
define('WPMS_SMTP_USER', 'YOURACCOUNTNAME');
define('WPMS_SMTP_PASS', 'YourAccountPasword');
</pre>
<p>And what do you know, they&#8217;re getting through. Our support calls and requests have dropped, and we can focus more of our limited resources on developing great sites and content with our campus partners. Win-win for everyone. </p>
<p>SendGrid isn&#8217;t just for these types of emails &#8211; it does much more as you can see in this video:</p>
<p><iframe src="http://player.vimeo.com/video/23283604?title=0&amp;byline=0&amp;portrait=0" width="400" height="225" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe></p>
<p>As you dig more into their system, you&#8217;ll see they offer email handling, reports and all sorts of other analytics &#8211; they don&#8217;t just handle transactional email.</p>
<p>So, SendGrid is and will be a part of any web projects for us (and me outside of John Carroll) going forward. It&#8217;s just one more thing I won&#8217;t have to worry about.</p>
<p>And that, my friends, is a good thing. </p>
]]></content:encoded>
			<wfw:commentRss>http://highedwebtech.com/2012/02/15/sendgrid-transactional-email/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WordPress: Giving Editors Access to Gravity Forms</title>
		<link>http://highedwebtech.com/2011/12/16/wordpress-giving-editors-access-to-gravity-forms/</link>
		<comments>http://highedwebtech.com/2011/12/16/wordpress-giving-editors-access-to-gravity-forms/#comments</comments>
		<pubDate>Fri, 16 Dec 2011 22:24:13 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[add_cap]]></category>
		<category><![CDATA[get_role]]></category>
		<category><![CDATA[gravity forms]]></category>
		<category><![CDATA[wordpress forms]]></category>

		<guid isPermaLink="false">http://highedwebtech.com/?p=1907</guid>
		<description><![CDATA[We&#8217;ve been testing Gravity Forms here as part of our WordPress CMS, allowing users easy access to be able to make forms and manage them right inside WordPress. So far, our tests have been positive, and we&#8217;re set to open &#8230; <a href="http://highedwebtech.com/2011/12/16/wordpress-giving-editors-access-to-gravity-forms/">Continued</a>]]></description>
			<content:encoded><![CDATA[<div style="float:right;padding:10px;"><a href="https://www.e-junkie.com/ecom/gb.php?cl=54585&#038;c=ib&#038;aff=177044" title="Gravity Forms Contact Form Plugin for WordPress"><img src="http://gravityforms.s3.amazonaws.com/banners/125x125_2.gif" alt="Gravity Forms Plugin for WordPress" width="125" height="125" style="border:none;" /></a></div>
<p>We&#8217;ve been testing <a href="https://www.e-junkie.com/ecom/gb.php?cl=54585&#038;c=ib&#038;aff=177044" target="_blank">Gravity Forms</a> here as part of our WordPress CMS, allowing users easy access to be able to make forms and manage them right inside WordPress. So far, our tests have been positive, and we&#8217;re set to open it up to all our users.</p>
<p>We&#8217;ve run into a challenge though as we get ready to roll this out. When set up and turned on in one of our sites (we run multi-site), only administrative users could access and see Gravity Forms. </p>
<p>We set up our campus users as editors, so they can&#8217;t go and switch themes and install rogue plugins. Even though the plugin was installed, editors couldn&#8217;t see Gravity Forms. They could see all our other functions and custom post types, but not Gravity Forms. </p>
<p>I wrote to their support, who suggested I use yet another plugin. That&#8217;s fine if I was just running one site, but at 140 sites and growing, I can&#8217;t be spending all day in that plugin turning things on and off. I figured there&#8217;d have to be a way to give the editor role access. </p>
<p>Enter some code. It&#8217;s one of the things that I really love about WordPress. With a bit of good code, you can do a lot of different things. </p>
<p>I added the following to my functions.php file, making Gravity Forms see that the user role of editor had the correct privileges and could run it. After some trial and error, I found the following snippet of code worked for an editor:</p>
<pre class="brush: plain; title: ; notranslate">
	function add_grav_forms(){
		$role = get_role('editor');
		$role-&gt;add_cap('gform_full_access');
	}
	add_action('admin_init','add_grav_forms');
</pre>
<p>So far, so good. I can make new forms, see entries and more as an editor, and I think I won&#8217;t have to manage this with a plugin, which is good to avoid that overhead where possible. Here&#8217;s what an editor sees now. The other things (taters, tots, etc) are custom post types we&#8217;ve developed. </p>
<p><a href="http://media.highedwebtech.com/wp-content/uploads/2011/12/Screen-shot-2011-12-16-at-5.13.45-PM.png"><img src="http://media.highedwebtech.com/wp-content/uploads/2011/12/Screen-shot-2011-12-16-at-5.13.45-PM.png" alt="" title="Screen shot 2011-12-16 at 5.13.45 PM" width="162" height="275" class="alignleft size-full wp-image-1910" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://highedwebtech.com/2011/12/16/wordpress-giving-editors-access-to-gravity-forms/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>I fed WordPress too much and it got a bellyache</title>
		<link>http://highedwebtech.com/2011/11/03/i-fed-wordpress-too-much-and-it-got-a-bellyache/</link>
		<comments>http://highedwebtech.com/2011/11/03/i-fed-wordpress-too-much-and-it-got-a-bellyache/#comments</comments>
		<pubDate>Thu, 03 Nov 2011 14:15:18 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://highedwebtech.com/?p=1834</guid>
		<description><![CDATA[I fed WordPress too much and it got a bellyache]]></description>
			<content:encoded><![CDATA[<p><img alt="" src="http://soundnet.cs.princeton.edu/OMLA/study/AphasiaFox/dict/medicine/abdominal-pain1.jpg" title="Upset tummy" class="alignright" width="104" height="125" style="padding:20px;" />I fed WordPress too much and it got a belly ache.</p>
<p>Each year, we do a &#8220;donor honor roll,&#8221; or a listing of all the people who gave money to my University in the past year. We&#8217;ve transitioned it from a print publication, sometimes inserted as part of our alumni magazine, to a stand-alone web-based site.</p>
<p>Basically, it&#8217;s a ton of text broken into pages based on giving levels. Some of the pages are rather short &#8211; like those that gave over $50,000. The longest list, unsurprisingly, was our list of people who gave under $1,000. It was near 30,000 words long &#8211; which is a LOT of text in one WordPress page.</p>
<p>As a donor to this University (and in the under $1k group), I was able to find myself using WordPress&#8217;s built-in search tool. When I went to the full list page, it was blank. Well, our header, sidebars and footer was there, but the actual page content, the stuff being pulled by the <code>the_content()</code> tag, was missing.</p>
<p>It was in the database, but WordPress wasn&#8217;t actually displaying it on the page. At all. </p>
<p>After some poking, I discovered that it was too much data for PHP to do any functions/plugin actions on it before it was displayed. I didn&#8217;t really want to break it into multiple pages, so I Googled around and found other people having similar problems with very long pages and posts.</p>
<p>The solution: change some PHP settings to up certain buffer sizes. The lines I used were this:</p>
<pre class="brush: php; title: ; notranslate">
/** Trick for long posts */
ini_set('pcre.recursion_limit',20000000);
ini_set('pcre.backtrack_limit',10000000);
</pre>
<p>Those two lines, placed in either your php.ini file or your wp-config.php file, give PHP a bit more space and power to process large amounts of text and make sure there&#8217;s enough room to do all the processing on a post that WordPress has to do. </p>
<p>We host our sites on a dedicated machine, so I&#8217;m not sure what, if any, effect this will have on WordPress sites hosted on a shared server. Otherwise, I&#8217;d recommend breaking them into multiple pages or posts.</p>
]]></content:encoded>
			<wfw:commentRss>http://highedwebtech.com/2011/11/03/i-fed-wordpress-too-much-and-it-got-a-bellyache/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Tracking Specific Actions in WordPress &amp; Google Analytics</title>
		<link>http://highedwebtech.com/2011/09/21/tracking-specific-actions-in-wordpress-google-analytics/</link>
		<comments>http://highedwebtech.com/2011/09/21/tracking-specific-actions-in-wordpress-google-analytics/#comments</comments>
		<pubDate>Wed, 21 Sep 2011 14:14:56 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Analytics]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Analytics]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[XHTML]]></category>
		<category><![CDATA[event tracking wordpress]]></category>
		<category><![CDATA[event tracking wp]]></category>
		<category><![CDATA[google analytics]]></category>
		<category><![CDATA[google analytics event tracking]]></category>
		<category><![CDATA[google analytics events tracking]]></category>
		<category><![CDATA[wordpress google analytics]]></category>
		<category><![CDATA[wp ga event tracking]]></category>

		<guid isPermaLink="false">http://highedwebtech.com/?p=1770</guid>
		<description><![CDATA[As part of our rollout of WordPress as our CMS, we&#8217;ve given our users several custom post types, allowing them to create and manage assets such as rotating display banners and graphical link buttons. We want to be able to &#8230; <a href="http://highedwebtech.com/2011/09/21/tracking-specific-actions-in-wordpress-google-analytics/">Continued</a>]]></description>
			<content:encoded><![CDATA[<p>As part of our rollout of WordPress as our CMS, we&#8217;ve given our users several custom post types, allowing them to create and manage assets such as rotating display banners and graphical link buttons. We want to be able to easily track actions on these banners and buttons, and want to be able to see that information easily in Google Analytics.</p>
<p>One of the new features in the newer versions of Google Analytics (GA) is the ability to track <a href="http://code.google.com/apis/analytics/docs/tracking/eventTrackerGuide.html">event actions</a> on a link. This can be not only clicks, in our case, on a button, link or graphic, but you can setup javascript triggers when a user starts, stops or pauses a video, for example.</p>
<p>Setting this up is pretty straightforward. First, you&#8217;ll need to add a quick snippet to your GA embed code, if you aren&#8217;t already. It&#8217;s the <code>trackPageview</code> function. You&#8217;ll add it under the line in your GA code where you&#8217;re account code is. For example:</p>
<pre class="brush: jscript; highlight: [4]; title: ; wrap-lines: false; notranslate">&lt;script type=&quot;text/javascript&quot;&gt;

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-XXXXX-X']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

&lt;/script&gt;</pre>
<p>That will allow you to start tracking events on your pages. To add the event tracking action to a specific element on your page, you add a line of code that looks like this to your <code>a</code> tags. </p>
<pre class="brush: jscript; title: ; notranslate">onClick=&quot;_gaq.push(['_trackEvent', 'Videos', 'Play', 'Baby\'s First Birthday']);&quot;</pre>
<p>There are three fields there to pay attention to. The first is the category field. In the above example, it&#8217;s <code>Videos</code>. You can have multiple categories on a certain page. On our WordPress sites, we&#8217;re specifically tracking banners and small image buttons, often on the same page. </p>
<p>The second field is the action variable &#8211; which in the example above is <code>Play</code>.  For our WordPress pages, we use the term <code>Click</code>. Through javascript and PHP variables, you can make your actions very specific, such as:</p>
<pre class="brush: jscript; title: ; notranslate">
_gaq.push(['_trackEvent', 'Videos', 'Play - Mac Chrome');
_gaq.push(['_trackEvent', 'Videos', 'Play - Windows Chrome');
</pre>
<p>And finally, the label. Above, it's <code>Baby's First Birthday</code>. For our uses, we tailor this to the specific banner or button getting clicked. After a few days, we realized it would also be good to know what site the visitor was on. As with the other fields, this should be tailored to the specific content being clicked on. In the video example, you'd have something like this for different videos being played:</p>
<pre class="brush: jscript; title: ; notranslate">
_gaq.push(['_trackEvent', 'Videos', 'Play', 'Gone With the Wind']);
_gaq.push(['_trackEvent', 'Videos', 'Play', 'Huckleberry Finn']);
</pre>
<p>To our user, our links look like this:</p>
<pre class="brush: xml; auto-links: true; html-script: false; light: false; pad-line-numbers: false; smart-tabs: true; tab-size: 4; title: ; toolbar: false; notranslate">
&lt;a href=&quot;http://sites.jcu.edu/newsroom/?p=1697&quot; onClick=&quot;_gaq.push(['_trackEvent', 'Taters', 'Click', 'Princeton Review Best in the Midwest (Site: JCU Newsroom ID: 1694)']);&quot;&gt;
&lt;img src=&quot;http://webmedia.jcu.edu/newsroom/files/2011/08/princeton_review-700x230.jpg&quot; alt=&quot;Princeton Review Best in the Midwest&quot; /&gt;
&lt;/a&gt;
</pre>
<p>In our WordPress templates, it looks like this:</p>
<pre class="brush: php; auto-links: true; html-script: false; light: false; pad-line-numbers: false; smart-tabs: true; tab-size: 4; title: ; toolbar: false; notranslate">
&lt;a href=&quot;&lt;?php echo $url; ?&gt;&quot; onClick=&quot;_gaq.push(['_trackEvent', 'Taters', 'Click', '&lt;?php echo get_the_title($ID).&quot; (Site: &quot;.get_bloginfo('name').&quot; ID: &quot;.$id.&quot;)&quot;; ?&gt;']);&quot;&gt;
&lt;img src=&quot;&lt;?php echo $img[0]; ?&gt;&quot; alt=&quot;&lt;?php echo get_the_title($ID); ?&gt;&quot; /&gt;
&lt;/a&gt;
</pre>
<p>We are tracking the individual banner that was clicked on, as well as the site the banner appears on. We add an additional field for our own, the actual ID of the banner asset. We do that just in case we need to find one quickly, or two banners get named the same thing. It&#8217;s happened. </p>
<p>That gives us a very nice report in GA that looks like this:</p>
<p><a href="http://media.highedwebtech.com/wp-content/uploads/2011/09/Screen-shot-2011-09-06-at-12.03.54-PM.png"><img src="http://media.highedwebtech.com/wp-content/uploads/2011/09/Screen-shot-2011-09-06-at-12.03.54-PM.png" alt="" title="Screen shot 2011-09-06 at 12.03.54 PM" width="580" class="aligncenter size-full wp-image-1811" /></a></p>
<p>We can very easily filter by a specific site to see what buttons and graphics are getting clicked on. You could also add this to any static link as well, but I&#8217;m specifically interested on what specific calls to action are getting noticed by our users. </p>
]]></content:encoded>
			<wfw:commentRss>http://highedwebtech.com/2011/09/21/tracking-specific-actions-in-wordpress-google-analytics/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Improving the WordPress Editor Experience for Users</title>
		<link>http://highedwebtech.com/2011/08/12/improving-the-wordpress-editor-experience-for-users/</link>
		<comments>http://highedwebtech.com/2011/08/12/improving-the-wordpress-editor-experience-for-users/#comments</comments>
		<pubDate>Fri, 12 Aug 2011 16:26:22 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[add_editor_style();]]></category>
		<category><![CDATA[editor-style.css]]></category>
		<category><![CDATA[Visual Editor CSS]]></category>
		<category><![CDATA[WordPress Editor CSS]]></category>
		<category><![CDATA[WordPress Visual Editor]]></category>

		<guid isPermaLink="false">http://highedwebtech.com/?p=1741</guid>
		<description><![CDATA[Here's how to style your WordPress visual editor.]]></description>
			<content:encoded><![CDATA[<p>We&#8217;re well over 100 sites into our WordPress Content Management rollout here at <a href="http://www.jcu.edu">John Carroll University</a>, and it&#8217;s been going swimmingly.</p>
<p>One of the reasons we selected WordPress was its Word-like interface for working with copy. For our users who had been using Dreamweaver for years, they&#8217;ve found it to be an easy transition.</p>
<p>The feedback we were getting is that what they were typing in the visual editor in WordPress wasn&#8217;t what they were seeing once when they previewed or saved their pages. They wanted to see actual line spacing, bulleted lists, blockquotes and more look more like what they&#8217;ll be like once they are published.</p>
<p>For our users, we want them to not see this:</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://highedwebtech.com/wp-content/uploads/2011/08/Screen-shot-2011-08-12-at-12.19.39-PM.png" alt="Screen shot 2011 08 12 at 12 19 39 PM" width="575" height="308" border="0" /></p>
<p>But see this:</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://webmedia.jcu.edu.s3.amazonaws.com/webupdates/files/2011/06/Screen%2Bshot%2B2011-05-31%2Bat%2B3.37.27%2BPM.png" alt="WP Editor Fancy" width="575" /></p>
<p>Luckily for us, it&#8217;s pretty easy to do this in WordPress. Here&#8217;s how:</p>
<p>Create a file in your theme&#8217;s main directory called <code>editor-style.css</code>. This is where you will style the HTML elements such as p, a, ul and so on for viewing in the editor. We made sure it matched up with our site&#8217;s CSS. Here are a few lines from it:</p>
<pre class="brush: plain; title: ; notranslate">
body, input, textarea, p{
  font-size: 14px;
  line-height: 24px;
 font-family: Helvetica, Arial, sans-serif;
  }

a{
	color: #003969;
  font-weight: bold;
  text-decoration: none;
}

blockquote{
	border: 4px solid #ebefef;
  border-width: 4px 0;
  margin: 0 0 32px -20px;
  font-family: 'MuseoSlab500', Georgia, &quot;Times New Roman&quot;, Times, serif;
  padding: 8px 20px 0 40px;
}

blockquote p{
	margin-bottom: 8px;
	font-family: 'MuseoSlab500', Georgia, &quot;Times New Roman&quot;, Times, serif;
}
</pre>
<p>Once that&#8217;s saved in your theme&#8217;s directory, open your <code>functions.php</code> file. You&#8217;ll need to insert this line somewhere in there:</p>
<pre class="brush: plain; title: ; notranslate">add_editor_style();</pre>
<p>Reload your editor and text put in the editor or using TinyMCE&#8217;s buttons should be styled correctly. Depending on your site&#8217;s CSS, you can add additional tags if you are styling them a certain way, such as hr or img.</p>
]]></content:encoded>
			<wfw:commentRss>http://highedwebtech.com/2011/08/12/improving-the-wordpress-editor-experience-for-users/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Scaling WordPress for high traffic sites video</title>
		<link>http://highedwebtech.com/2011/03/02/scaling-wordpress-for-high-traffic-sites-video/</link>
		<comments>http://highedwebtech.com/2011/03/02/scaling-wordpress-for-high-traffic-sites-video/#comments</comments>
		<pubDate>Wed, 02 Mar 2011 21:25:05 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[wordpress]]></category>
		<category><![CDATA[high performance]]></category>
		<category><![CDATA[scalability]]></category>

		<guid isPermaLink="false">http://highedwebtech.com/?p=1691</guid>
		<description><![CDATA[Matt Herzberger tweeted a link to this presentation by Ryan Allen, talking about how Envato uses WordPress for their sites, which does millions of pageviews a month. It&#8217;s not as much about scaling as about a look at some tools &#8230; <a href="http://highedwebtech.com/2011/03/02/scaling-wordpress-for-high-traffic-sites-video/">Continued</a>]]></description>
			<content:encoded><![CDATA[<p>Matt Herzberger <a href="http://twitter.com/mherzber/status/42945823629258752">tweeted</a> a link to this presentation by Ryan Allen, talking about how Envato uses WordPress for their sites, which does millions of pageviews a month. It&#8217;s not as much about scaling as about a look at some tools which you can use to monitor your hardware and identify bottleneck points in your WordPress and hardware implementation. There are some good tips in this video. </p>
<p><embed src="http://blip.tv/play/AYKnsiYC" type="application/x-shockwave-flash" width="480" height="390" allowscriptaccess="always" allowfullscreen="true"></embed></p>
<p>Things mentioned:</p>
<ul>
<li><A href="http://scalingwp.com">Scaling WordPress Site</a></li>
<li><a href="http://twitter.com/scalingwp">@scalingwp</a></li>
<li><a href="http://newrelic.com/index.html">New Relic</a></li>
<li><a href="http://pingdom.com/">Pingdom</a></li>
</ul>
<p>Want to learn more about WordPress and using it at your institution? Check out <a href="http://higheredexperts.com/edu/webinar/wordpress-university/">this webinar series</a> at HigherEdExperts going on in a few weeks.</p>
]]></content:encoded>
			<wfw:commentRss>http://highedwebtech.com/2011/03/02/scaling-wordpress-for-high-traffic-sites-video/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sitemaps: Is there such a thing as too big?</title>
		<link>http://highedwebtech.com/2011/01/27/sitemaps-is-there-such-a-thing-as-too-big/</link>
		<comments>http://highedwebtech.com/2011/01/27/sitemaps-is-there-such-a-thing-as-too-big/#comments</comments>
		<pubDate>Thu, 27 Jan 2011 12:00:00 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[wordpress]]></category>
		<category><![CDATA[sitemap]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[XML sitemap]]></category>

		<guid isPermaLink="false">http://highedwebtech.com/?p=1677</guid>
		<description><![CDATA[I use the Google XML-Sitemap plugin in all my WordPress installations. It&#8217;s a great way to tell Google, Yahoo and Bing when my site updates, and for them to easily see what&#8217;s new. It&#8217;s a nice set-and-forget kind of plugin. &#8230; <a href="http://highedwebtech.com/2011/01/27/sitemaps-is-there-such-a-thing-as-too-big/">Continued</a>]]></description>
			<content:encoded><![CDATA[<p><img style="display:block; margin-left:auto; margin-right:auto;" src="http://media.highedwebtech.com/wp-content/uploads/2011/01/Screen-shot-2011-01-26-at-3.01.40-PM.png" alt="Screen shot 2011-01-26 at 3.01.40 PM.png" border="0" width="500" height="191" /></p>
<p>I use the <a href="http://wordpress.org/extend/plugins/google-sitemap-generator/">Google XML-Sitemap plugin</a> in all my WordPress installations. It&#8217;s a great way to tell Google, Yahoo and Bing when my site updates, and for them to easily see what&#8217;s new. It&#8217;s a nice set-and-forget kind of plugin.</p>
<p>I&#8217;ve been noticing something strange on one of my sites lately &#8211; the sitemap keeps timing out and producing nothing but a blank screen. That&#8217;s never good &#8211; so I&#8217;ve been digging into the site to suss out the issue.</p>
<p>I think part of the problem is that this particular site has over 2,700 blog posts. Building the sitemap for that site, and including all the tags and categories was killing the process.</p>
<p>My question today is this &#8211; should we be limiting the number of items we put in our sitemap.xml file? Should I cut it off at an arbitrary number, such as 25, or leave all 2,700 in there knowing that only the most recent 5 or so posts are the ones I really want Google to see. </p>
]]></content:encoded>
			<wfw:commentRss>http://highedwebtech.com/2011/01/27/sitemaps-is-there-such-a-thing-as-too-big/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>It&#8217;s Nice To Be Noticed</title>
		<link>http://highedwebtech.com/2010/11/17/its-nice-to-be-noticed/</link>
		<comments>http://highedwebtech.com/2010/11/17/its-nice-to-be-noticed/#comments</comments>
		<pubDate>Wed, 17 Nov 2010 18:53:04 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://highedwebtech.com/?p=1624</guid>
		<description><![CDATA[It&#8217;s very nice when work that we do on the web is noticed. It&#8217;s even better when it&#8217;s noticed in a positive way. Two weeks ago, my VP and I were interviewed by the campus newspaper. They&#8217;ve noticed the improvements &#8230; <a href="http://highedwebtech.com/2010/11/17/its-nice-to-be-noticed/">Continued</a>]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s very nice when work that we do on the web is noticed. It&#8217;s even better when it&#8217;s noticed in a positive way. </p>
<p>Two weeks ago, my VP and I were interviewed by the campus newspaper. They&#8217;ve noticed the improvements we&#8217;ve been doing and wanted to know more about the process and why these changes were important. The article came out well, which, when you&#8217;re dealing with writers at a college paper, isn&#8217;t always a given. I should know &#8211; I wrote and edited my college newspaper.</p>
<p>The following week, the newspaper ran an <a href="http://www.jcunews.com/2010/11/11/jcu-website-receives-facelift/">positive editorial</a> about the direction the web is taking and why the web is important. It was a nice pat on the back and is helping set expectations as we get ready to roll out a redesign in the new year. </p>
<p>My favorite bit was this editorial cartoon that ran with the story. I lol&#8217;d. </p>
<p><a href="http://media.highedwebtech.com/wp-content/uploads/2010/11/20101117104440577.gif"><img src="http://media.highedwebtech.com/wp-content/uploads/2010/11/20101117104440577.gif" alt="" title="20101117104440577" width="450" height="370" class="aligncenter size-full wp-image-1628" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://highedwebtech.com/2010/11/17/its-nice-to-be-noticed/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

