Work This Week – Week 4


flickr photo shared by Australian National Maritime Museum on The Commons with no copyright restriction (Flickr Commons)

WP Upgrades & Feed WordPress Error

WordPress 4.7 came out. It does some good things and internalizes the JSON API stuff.

Upgrades went well on most of our installs. We did have some issues though. Feed WordPress didn’t/doesn’t play nicely with 4.7 and the fix has some repercussions with other things we use.

The ALT Lab site also broke for a bit and I had to do a fresh install. Not a big deal but ate up some time.

The anth101 site also stalled out for a bit because of a conflict with another plugin.

Luckily, the latter two issues were restricted the admin aspects and viewers wouldn’t have been impacted.

Empty Widgets?

I had one blog on rampages that wouldn’t load the customizer. Everything else about it worked fine.

Tim Owens from Reclaim Hosting ended up helping me out as it’s fairly strange issue where the customizer won’t load if there are no widgets in it.

It did lead to the following list of error variables that I tend to test against. With a bit of work, it might be a useful list. I’ll have to think through what order makes the most sense in terms of likelihood of solving the issue.

Persists across themes
Persists across permalink permutations
Persists over time
Persists across users
Persists across browsers

Vue JSON

I wanted to try using Vue with the WordPress API endpoint.

Vue has a JSON fetching example so it wasn’t too hard. The structure is a bit different from Angular (v1 anyway) which is the last JS library like this that I’ve used in a similar way.

The raw html display hung me up for a minute or two but was easy to deal with once I actually read the documentation.

I also threw in a hover animation library that’s pretty slick. I intend to use this more in the future.

See the Pen vue json test by Tom (@twwoodward) on CodePen.

Gulp/SASS

I’m working on a new theme based off of Understrap and using both Gulp and SASS. I’ve started to try both Gulp and SASS a few times before but a combination of short deadlines and knowing exactly how I’d do it if I wasn’t doing this stupid-freaking-new-garbage thing resulted in abandonment.

I am up and running1 this time. Certainly not fully using SASS to its potential but I’m headed to better days and faster stuff. Gulp is also going to be very useful and will increase speed in a number of ways.

Favorite Plugin Display

I’ve used different plugins to allow favoriting of posts but that was mainly to add value to the posts/post authors- kind of a rating system. This request was to allow authors on a multi-author blog to favorite other users’ posts to create a favorites page for their reference.

I considered doing this from scratch as I am getting arrogant these days and think I can program. But, in partial control of my hubris, I opted to look around first and found Favorites. It does exactly what I need and has a nice solid set of readily visible functions.

<?php 
				$the_favs = get_user_favorites($user_id = null, $site_id = null, $filters = null);
				$fav_number = count($the_favs);
				$i = 1;
				echo '<div class="team-content"><div class="masonry">';

				while ($i <= $fav_number) {

					$fav_id = $the_favs[$i];	
					echo '<div class="item">';
					echo '<a href="' . get_the_permalink($fav_id) . '"';
					echo get_the_title($fav_id) . '<br>';
					$fav_img = get_the_post_thumbnail($fav_id, 'large' );
					if ($fav_img){
						echo $fav_img;
					}
					else {
						echo 'fish'; //This will be something else eventually 
					}
					
					echo '</a></div>';
					$i++;

			     }
			     echo '</div></div>';
				?>

Qatar – Virtual Art History Courses

Roughly 8 hours of calls this week . . . rough.

I’m mainly playing guide/translator/project manager. I mainly restate what the faculty say and then restate what the web developer says. I try to use lots of metaphors (a la carte was a popular one).

I’d much rather build things but it’s a necessary role at times and given our low staffing at the moment I can’t really take on another large project (even if I’d like to).


1 Staggering may be a better term but moving forward anyway.

Comments on this post

No comments.

Leave a Reply

Trackbacks and Pingbacks on this post

  1. 2016 week 49 in review – D’Arcy Norman dot net said on December 11, 2016 at 11:28 am

    […] Woodward: Work This Week – Week 4 (another case of FeedWordPress blowing up with WP 4.7. Glad I didn’t update UCalgaryBlogs […]

TrackBack URL