WordPress only show content for logged in admin user

Sometimes one might only want to show some content for logged in admin users, or a specific admin user – for testing purposes etc.

you can use this code:

$current_user = wp_get_current_user();
if($current_user->user_email == "email@address.co")
  function(); // this function will only happen when this one admin user is logged in.
<p>This HTML will only show when the user is logged in</p>

For content to be shown when a user is logged in as an admin in general, this can be used:

<?php if ( is_user_logged_in() ) {
  echo "This will be shown if a user is logged into the admin section.";
} ?> 

Google Algorithm Change – Penguin 2.1

Valuing non-standard words and longer sentences?~ sounds like a recipe for long windedness and interesting language ~ may be more fun to read – but not the best when you want answers fast.

My reply:

It would quite undoubtedly be gained, by reading this masterous literary piece, which has given me some informational enlightenment on the collection of thoughts at hand, that the discourse which is brought to publication on the interconnected systems which erect the Internet’s structures will move in the trajectory of loquaciousness and heterogeneousness alike.

Hiding title tags for links and images using JQUERY

I was trying to hide all title popup boxes for one website – this may not be the most elegant solution – but it is something if you need it in a pinch – post better solutions below:

$("a").each(function(e) {
 var title = $(this).attr('title');
 function() {
 function() {
 $(this).attr('title', title);
 function() {
 $(this).attr('title', title);
$("img").each(function(e) {
 var title = $(this).attr('title');
 function() {
 function() {
 $(this).attr('title', title);
 function() {
 $(this).attr('title', title);

How to get your Google Plus ID with a Vanity Name URL

If you have a vanity name in your URL on Google+ rather than just an ID number, you can search for yourself, and your profile picture in the search results links to your ID number – so you can copy URL and extract the number from the link.

Here is a GIF animation showing how that is done ~ 



July 05, 2014 – I deleted my facebook account for the 3rd time or something.

In high school – we used MySpace, since facebook didn’t exist, and then in time for uni, 2007 – you had to register for facebook with a university email (it started in USA only, then to educational members, then open to the public.)

In uni, I thought my account got hacked, so I deleted all my friends or something – then when Google+ was invented, I decided to migrate, so I deleted all my posts and set everything to private, though I was the only one that wanted to move @-@

I was inspired by this video:

Though, I have been hanging out with real people in real life more, recently – and it’s wonderful.

I would also rather use my time reading, lifting weights and making YouTube videos rather than wasting my life on facebook – and there is always email, sms and Google+ with which to contact people ~ 

Maybe I’ll be back – but hopefully not.

(By the way – this was just when facebook gained access to the phone microphone and started automatically tagging music and shows into posts by listening to the users surroundings @-@) 

Blocked Blacklisted Sites from Google Search

I am starting a list of blocked websites/ domains from Google search.

  • forbes.com
    • When linking directly to an article page – there is a blank landing page, then the user needs to click through to the actual page – then on load, a huge explanatory banner pops up covering the article… If I’m going to read or share articles, I want to see the article immediately… If Forbes ever fixes this, tag me/ tell me in the comments below and I’ll remove this filter… ~ There are so many news sources – ain’t nobody got time for that ~
  • upworthy.com
    • Congratulations on becoming a huge website in a short amount of time, but if that means pushing subscription pop-ups on me every time I visit your page – I don’t want a part of it. I’m all for feminism, equality and the anti-destruction of humans/ the world – but that doesn’t mean I will subscribe to your website. Click the YouTube logo in the corner of the video and send me that link, not the UpWorthy landing page. 
  • lyricsmania.com
    • Upon loading the site, a popup asks you to like/ share on social media.. But I know nothing about how good your site is, and I’d rather block it from search results and share the website on this list than share on social media…

List without notes/ formatting:


Chrome Extension for filtering Google Search results


Excel Spreadsheet Google Sheets XLS Notes

The following are some Excel  functions I use for data processing. I use Google Drive/ Google Docs/ Google Sheets.

Repeat count for each element in a list

In the 1st column of the sheet, have a list of items, then in the 2nd column, first cell, add this code:

 =ArrayFormula(QUERY(A:A&{"",""},"select Col1, count(Col2) where Col1 != '' group by Col1 label count(Col2) 'Count'",1))

The code will generate a list of unique items that make up the 1st list, and next to it in the 3rd column, will show the counts. (EG: if the 1st list is completely unique, nothing repeating, it will generate the same list with “1” next to each item)

I found the code on this Stack Overflow thread, submitted by Adam L.


Various JavaScript Programming Notes

To make a 2 dimensional array

var v=new Array();
var v2=new Array();
v[0]=1; v[1]=7; v2[0]=v;
var x = v2[0][0] // x is 1;

Add to an array


Function – If string S is in array A, then return true

function inArray(string, array){
 for(var i = 0;i < array.length;i++){
 if (array[i]==string){
 return true;
 return false;



Phone Idea from 2007 – Automatic phone sound profiles

I found a funny draft email in an old email account with my revolutionary phone idea I emailed to some companies.. 

It is now possible to do this with Android apps – I use it to auto-switch my phone to aeroplane mode at night, and turn to silent during weekly lectures or meetings.


As a user of mobile phones, I have an idea that would revolutionize the phone experience.
There is a feature that no phone company has thought of and one that almost every person in the world with a phone needs.

The idea is a build on the “theme” feature of most phones, a profile for your phone for specific times (e.g. in car, meetings, outside etc.), in which you can change the volume of ringing, ring tone, vibration etc. This is a very convenient feature, but it is inconvenient to constantly change themes, especially when you always change it at the same times, in a pattern.

If you could set alarm like times for your different themes, You would never have a phone go off in class, or at work, or in a meeting; and you would never miss a call because you forget to turn your phone off silent, or if your on public transport and forget to turn your phone on loud.

There could be settings for changing themes at different times every day (9 to 5 job, same every day) or a weekly set up for different times every day (uni, with different classes)

For the interface, you could have visual calendar-like screen for planning the times for the week, or you could add changes to the theme one by one using drop down boxes (selecting, day, time, what theme, etc.)

 You can get several different apps to do this – I recommend AutomateIt 

Get it on Google Play


Apple iCloud Verification Email not sending or arriving

I wanted to try out the Apple version of Google Docs (Pages, Numbers, Keynote) but I’ve been using Google and Android for my digital life for many years, so though I registered an iCloud account when it was just starting for free, it wasn’t verified.

My login failed because it said that I needed to check my email account for the verification email, but it wasn’t sending any. It was asking to find the original one.

To receive your Apple iCloud verification email on Windows – download the iCloud application and install it, then login to your Apple ID account and click “resend verification email”