Jason Jalbuena https://jasonjalbuena.com/ Web Developer & WordPress Specialist Wed, 03 Mar 2021 22:16:30 +0000 en-US hourly 1 https://wordpress.org/?v=5.3.6 World Harvest https://jasonjalbuena.com/world-harvest/ https://jasonjalbuena.com/world-harvest/#respond Wed, 03 Mar 2021 22:11:59 +0000 https://jasonjalbuena.com/?p=2289 World Harvest is an evangelistic ministry on a worldwide mission to take the gospel to the ends of the earth in a radical way. My great designer friends at Hybrid Studios designed the site while I took care of turning their design into a working website. We used a very customizable premium WordPress theme as a […]

The post World Harvest appeared first on Jason Jalbuena.

]]>
World Harvest is an evangelistic ministry on a worldwide mission to take the gospel to the ends of the earth in a radical way.

My great designer friends at Hybrid Studios designed the site while I took care of turning their design into a working website. We used a very customizable premium WordPress theme as a base.

Project Highlights

WordPress Theme Customization

Hybrid provided mockups of the design and the theme to use. Some WordPress themes are very intuitive and straight-forward to install, properly set-up, and customize. Other themes are a direct opposite and are tricky to figure out. This theme was confusing, I’d put it in the middle of the easy to hard to customize scale. It took a while, but I was eventually able to properly set-up and customize the website to the design specifications.

Custom CSS

While most theme customizations will need some custom CSS to get some design elements to look or work in a way different than the theme was programmed for, the CSS required for this site was quite tricky.

Custom CSS was used to give the images used the diagonal cut – i.e. they are not rectangles, but have one or more sides at an angle. Because of the way the theme handles the responsiveness (adaptability to different screen sizes, like from desktop to mobile) of images used in backgrounds, simply cropping the images or adding a white section on top of the images themselves could not be used.

CSS was used so that a white overlay is put on top of the images. This white overlay gives the impression that they have one or more sides on an angle. They are also responsive and works/looks well for devices from the smallest of mobile phones to full-HD screens.

The post World Harvest appeared first on Jason Jalbuena.

]]>
https://jasonjalbuena.com/world-harvest/feed/ 0
How to run multiple Hugo versions https://jasonjalbuena.com/how-to-run-multiple-hugo-versions/ https://jasonjalbuena.com/how-to-run-multiple-hugo-versions/#respond Wed, 17 Feb 2021 19:19:05 +0000 https://jasonjalbuena.com/?p=2280 I recently got a new laptop that runs Pop OS, an OS made by System76 based from Ubuntu. In learning about the best way to install and run Hugo, I learned that APT doesn’t have the latest versions. Also, since some Hugo themes are built for specific versions and they break with the newer versions, […]

The post How to run multiple Hugo versions appeared first on Jason Jalbuena.

]]>
I recently got a new laptop that runs Pop OS, an OS made by System76 based from Ubuntu. In learning about the best way to install and run Hugo, I learned that APT doesn’t have the latest versions. Also, since some Hugo themes are built for specific versions and they break with the newer versions, I thought it might be best to be able to run different Hugo versions as needed. This Stackoverflow question and its answer gave me the best system to use. Other suggestions were more complicated, like running different Docker containers for each version, and I really like simple solutions.

So, just how do you have and use different Hugo versions on the same machine?

First, download the proper Hugo release from github for your machine. In my case, it’s the .deb for version 0.80.0 for Linux 64-bit.

After downloading it, I rename the file to something easier to type, so I rename it to ‘hugo.’

Install Hugo:

sudo dpkg -i hugo

go to the location where it was installed:

cd /usr/local/bin

Rename it so it has the version number. For v0.80.0, I renamed it hugo0800

sudo mv hugo /usr/local/bin/hugo0800

If all I want is one version, I’d be done, but I want to have another version which is what this blog post is about. Download the other version (the 0.76.3 version this time), rename it, and install just like the 0.80.0 version.

sudo dpkg -i hugo

I got a warning, but I suppose it doesn’t matter.

Proceed to rename the binaries…

cd /usr/local/bin
sudo mv hugo /usr/local/bin/hugo0763

Ok, now we have 2 versions installed. We use them the same way as plain ‘hugo’ but with the new names. Let’s confirm they work as expected. First, let’s see if they report the right versions…

hugo0763 version
hugo0800 version

It’s looking really good. Then let’s test with an actual site….

hugo0763 server -D
hugo0800 server -D

Browsing to http://localhost:1313/ shows that the site works for either version

Done! Repeat for other Hugo versions as needed.

Small side note:
I’ve switched from a 2013 Macbook air with macOS 10.15.7 Catalina, 1.7 GHz dual-core Intel i7 and 8GB RAM. For this site am working on, it took that maching 8000-9000 ms to build…

My new machine is a System76 Lemur Pro running Pop!_OS 20.04 with an 11th Gen 4.7 GHz Intel i7 (4 cores, 8 threads) with 25 GB RAM and it takes it 61ms to build! What a huge difference!!

The post How to run multiple Hugo versions appeared first on Jason Jalbuena.

]]>
https://jasonjalbuena.com/how-to-run-multiple-hugo-versions/feed/ 0
Travis Stauffer for State Representative https://jasonjalbuena.com/travis-stauffer-for-state-representative/ https://jasonjalbuena.com/travis-stauffer-for-state-representative/#respond Tue, 07 Apr 2020 00:42:55 +0000 https://jasonjalbuena.com/?p=2262 Travis4staterep.com is a small mini-site for Travis Stauffer‘s campaign for State Representative in Pennsylvania – he’s running locally, not in the state level. The website gives him a web presence and also a way for him to be contacted and receive donations. A website was already started with Wix.com but wasn’t completed because of complications […]

The post Travis Stauffer for State Representative appeared first on Jason Jalbuena.

]]>
Travis4staterep.com is a small mini-site for Travis Stauffer‘s campaign for State Representative in Pennsylvania – he’s running locally, not in the state level. The website gives him a web presence and also a way for him to be contacted and receive donations.

A website was already started with Wix.com but wasn’t completed because of complications with receiving donations and design.

Project Highlights

Server, WordPress, and setup

Because the old site was on Wix, a new server on another host was created and a new install of WordPress was deployed for this project. To keep costs low, an applicable non-premium theme was installed together with all the plugins that this website would need.

Content from the first site was imported over and the theme was customized. The site layout and outline were implemented to make a very clean website.

Contact form and donations

One requirement was for there to be a contact form present on the site so that visitors could contact Travis and volunteer for his campaign. A forms plugin was installed and a contact form was configured.

Another requirement was for the website to be able to receive donations thru First Data’s Payeezy. A suitable solution was used, which also enabled the collection of the donor’s place of employment for donations over $250.00.

The post Travis Stauffer for State Representative appeared first on Jason Jalbuena.

]]>
https://jasonjalbuena.com/travis-stauffer-for-state-representative/feed/ 0
How to run a Stackbit Hugo site locally on Windows 10 https://jasonjalbuena.com/how-to-run-a-stackbit-hugo-site-locally-on-windows-10/ https://jasonjalbuena.com/how-to-run-a-stackbit-hugo-site-locally-on-windows-10/#comments Thu, 20 Feb 2020 05:01:59 +0000 https://jasonjalbuena.com/?p=1925 Background I’ve been playing around with Jamstack sites and really like them. Yes, I was interested in a few of the JS frameworks but nothing like this. Those frameworks fell short with on-site SEO. Sure, ways around the SEO issues were developed later on but I haven’t seen or heard of them proving they worked […]

The post How to run a Stackbit Hugo site locally on Windows 10 appeared first on Jason Jalbuena.

]]>
Background

I’ve been playing around with Jamstack sites and really like them. Yes, I was interested in a few of the JS frameworks but nothing like this. Those frameworks fell short with on-site SEO. Sure, ways around the SEO issues were developed later on but I haven’t seen or heard of them proving they worked thru SEO experimentation. Not that I looked too deep, just a few times here and there. Anyway, I never did get to really learn any of them because of this and thus haven’t moved far from my WordPress focus.

Until now. I like Gatsby but am really enjoying Hugo. I also found Stackbit, which helps you set-up Jamstack sites. It makes setting new production sites as easy as click, click, click – choose a theme, what SSG (static site generator, Hugo is my current choice) to use, which headless CMS to use, and connect your github and Netlify hosting accounts – and it auto-magically sets it all up for you.

So much more can be said about Jamstack and what makes it so great, but that’s not what this post is about.

The problem

As a dev working on a site, I need to be able to work on its theme and to do so I need to be able to work on it locally. Stackbit provides instructions for how to do this but I hit a wall because it doesn’t work on Windows (no issues getting it working on my Mac). Googling didn’t find me any help, so am documenting what I did to help others and my future self.

To be clear, I used Stackbit to start a Hugo site paired with the Netlify CMS. It works great in production but I couldn’t get the site to work locally in my Windows machine. The git repo for the site (created in my Github account by Stackbit) has the following instructions:

In a Windows machine, steps 1 and 2 are no problem. Step 3 and 4 (maybe) won’t work as the instructions are for Macs. I should note that you already should’ve cloned your site’s repo locally. So what to do…

The solution

STEP 3

The ‘export’ command doesn’t work in Windows. This command is for assigning environment variables. To assign environment variables in Windows, follow the instructions here. Add a new variable STACKBIT_API_KEY with your API key as the value.

Skipping step 4, the site will run fine. Run ‘hugo server -D’ in the root folder of your site. Go to https://localhost:1313/ to see the local version of your site. Edits to files immediately appear. I got an error trying to use the local Netlify CMS at https://localhost:1313/admin, so I proceeded with step 4.

STEP 4

If you have Node installed, then this step should work for you. Otherwise, install Node first. I have chocolatey installed so I used choco install nodejs in PowerShell. Restart your computer and test Node to make sure it is installed.

In PowerShell, go to your site’s folder and run the command for Step 4. Then start up your site with the ‘hugo server -D’ command.

The local site ran fine again but trying to login to the local CMS still gave me an error. I revisited the admin URL again (https://localhost:1313/admin) and it logged me in.

A note on using the local CMS while working on the local site: Making content changes will cause it to commit to the live Github repo, which will then deploy changes to your live website. Therefore, don’t use the CMS if you’re testing locally. Use your local tools to work on the theme and content files.

The post How to run a Stackbit Hugo site locally on Windows 10 appeared first on Jason Jalbuena.

]]>
https://jasonjalbuena.com/how-to-run-a-stackbit-hugo-site-locally-on-windows-10/feed/ 5
Install Let’s Encrypt SSL on Free Plan of ServerPilot on a Site Already Active on Cloudflare https://jasonjalbuena.com/free-ssl-lets-encrypt-serverpilot-cloudflare/ https://jasonjalbuena.com/free-ssl-lets-encrypt-serverpilot-cloudflare/#comments Tue, 05 Sep 2017 05:03:38 +0000 https://jasonjalbuena.com/?p=903 Back when Cloudflare announced free SSL, I tried to use their flexible SSL option, which is suitable for when: You cannot configure HTTPS support on your origin, even with a certificate that is not valid for your site. Visitors will be able to access your site over HTTPS, but connections to your origin will be […]

The post Install Let’s Encrypt SSL on Free Plan of ServerPilot on a Site Already Active on Cloudflare appeared first on Jason Jalbuena.

]]>
Back when Cloudflare announced free SSL, I tried to use their flexible SSL option, which is suitable for when:

You cannot configure HTTPS support on your origin, even with a certificate that is not valid for your site. Visitors will be able to access your site over HTTPS, but connections to your origin will be made over HTTP.

I don’t remember the exact issues I faced, but I concluded that I wouldn’t try again until I had a proper SSL certificate installed on my server.

I’d pretty much forgotten all about getting SSL, but Google’s push for all websites to have SSL has urged me try again. A lot has changed since then, including the launch of Let’s Encrypt and my now using Serverpilot.

I manage a couple of websites using the free plan of Serverpilot, which doesn’t provide a way to automatically configure SSL certificates on your servers. So, here’s how I managed to install Let’s Encrypt SSL certificates on my servers on the free Serverpilot plan on sites already active on Cloudflare.

But first, a brief introduction to those services in case you don’t know what they are:

Let’s Encrypt – provides free, automated SSL certificates.

Serverpilot – is a secure control panel optimized for hosting WordPress and PHP websites on cloud servers.

Cloudflare – is a CDN & security provider that protects and accelerates any website online.

All of these services have tiers that are free and paid.

Ok, let’s start:

For your own purposes, please change the following when applicable:
appname to your own Serverpilot app’s name
user@domain.com to your email address
example.com to your domain name

1. Sign in as root using SSH:

ssh root@yourserverip

2. Download the Let’s Encrypt client from its GitHub repository:

git clone https://github.com/letsencrypt/letsencrypt

3. Enter the newly downloaded directory:

cd letsencrypt

4. Execute the downloaded client and set a couple of flags:
To add additional domains/subdomains, add an additional -d www.example.com

./letsencrypt-auto certonly --webroot --webroot-path /srv/users/serverpilot/apps/appname/public --renew-by-default --email user@domain.com --text --agree-tos -d example.com

Ok, you should have your SSL certificates ready to use. You should’ve received an onscreen confirmation message like so:

Congratulations! Your certificate and chain have been saved at:
/etc/letsencrypt/live/appname/fullchain.pem
Your key file has been saved at:
/etc/letsencrypt/live/appname/privkey.pem
Your cert will expire on YYYY-MM-DD. To obtain a new or tweaked
version of this certificate in the future, simply run
letsencrypt-auto again. To non-interactively renew *all* of your
certificates, run “letsencrypt-auto renew”

Now, we need to configure the server to use the SSL certificates:

5. Go to the nginx configuration directory:

cd /etc/nginx-sp/vhosts.d

6. Create/edit a new configuration to use:

sudo nano appname.ssl.conf

7. Paste the following in:

server {
	listen 443 ssl http2;
	listen [::]:443 ssl http2;
	server_name example.com;

	ssl on;

	# letsencrypt certificates
	ssl_certificate      /etc/letsencrypt/live/appname/fullchain.pem;
	ssl_certificate_key  /etc/letsencrypt/live/appname/privkey.pem;

        #SSL Optimization
	ssl_session_timeout 1d;
	ssl_session_cache shared:SSL:20m;
	ssl_session_tickets off;

        # modern configuration
	ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
        ssl_prefer_server_ciphers on;

        ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!3DES:!MD5:!PSK'; 

        # OCSP stapling 
        ssl_stapling on; 
        ssl_stapling_verify on; 

        # verify chain of trust of OCSP response 
        ssl_trusted_certificate /etc/letsencrypt/live/appname/chain.pem;

        #root directory and logfiles 
        root /srv/users/serverpilot/apps/appname/public; 

        #index files
        index index.php index.html index.htm;

        access_log /srv/users/serverpilot/log/appname/appname_nginx.access.log main; 
        error_log /srv/users/serverpilot/log/appname/appname_nginx.error.log; 

        #proxyset 
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-SSL on; 
        proxy_set_header X-Forwarded-Proto $scheme; 

        #includes 
        include /etc/nginx-sp/vhosts.d/appname.d/*.nonssl_conf; 
        include /etc/nginx-sp/vhosts.d/appname.d/*.conf; 
}

Note:
A) This configuration is copied from https://bjoernfranzen.com/how-to-set-up-a-letsencrypt-ssl-certificate-for-your-wordpress-website-on-a-digital-ocean-server-managed-with-a-serverpilot-free-account/, an excellent write-up and a worthwhile read.
B) I added the #index files section as my server was causing index files to save on my browser’s downloads folder and was not simply opening them in the browser.
C) to add additional domains/subdomains, simply list them on the server_name line, like so: server_name example.com www.example.com;

8. Restart nginx

service nginx-sp restart

On the cloudflare side, be sure to switch SSL on via the Crypto tab, like so:

And that’s it! Go to the https:// version of your website to test. If you’re using WordPress, the Really Simple SSL pluginis an excellent plugin to use to rewrite all your URLs and generally use SSL on your website.

Renewing all your certificates is as easy as SSH’ing as root again and using:

cd letsencrypt
./letsencrypt-auto renew

The post Install Let’s Encrypt SSL on Free Plan of ServerPilot on a Site Already Active on Cloudflare appeared first on Jason Jalbuena.

]]>
https://jasonjalbuena.com/free-ssl-lets-encrypt-serverpilot-cloudflare/feed/ 7
WordPress Plugin: Simple Bulk Episodes https://jasonjalbuena.com/simple-bulk-episodes/ https://jasonjalbuena.com/simple-bulk-episodes/#respond Sat, 23 Apr 2016 16:57:12 +0000 http://jasonjalbuena.com/?p=864 Simple Bulk Episodes provides a simple way to add a bulk of episodes for use by the Seriously Simple Podcasting plugin. Seriously Simple Podcasting (SSP) is an awesome podcasting plugin that provides everything you’d need to publish a podcast. I’ve been using it extensively and it is truly simple and very straight-forward to use. What […]

The post WordPress Plugin: Simple Bulk Episodes appeared first on Jason Jalbuena.

]]>
Simple Bulk Episodes provides a simple way to add a bulk of episodes for use by the Seriously Simple Podcasting plugin.

Seriously Simple Podcasting (SSP) is an awesome podcasting plugin that provides everything you’d need to publish a podcast. I’ve been using it extensively and it is truly simple and very straight-forward to use.

What problem does this plugin address?

The only issue I had was that adding multiple podcast episodes at a time is a time-consuming and laborsome process. This isn’t really an issue with SSP as it uses the standard WordPress admin. This also may not be an issue for most podcasters as they probably record and publish no more than one episode per day at a time. As for myself, I upload and publish/schedule a months’ worth of daily episodes at a time. The actual process for me to add episodes with SSP is:

  1. click add new episode from within the WordPress admin
  2. Wait for the add episode page to load
  3. Copy episode title from spreadsheet
  4. Paste it to WordPress
  5. Open a Word/text document with the post content of the episode
  6. Copy content from the document
  7. Paste it to WordPress
  8. Copy URL of MP3 file
  9. Paste it to WordPress
  10. Enter length of episode (my episodes are uploaded outside the WP install and thus SSP is unable to auto-detect this)
  11. Edit the publish date-time to a specified date using the admin UI
  12. Schedule (publish in the future) the episode
  13. Wait for the page to process your episode and reload
  14. Repeat everything above for every episode needed for the month (20-22 times for a weekday only podcast)

Simple Bulk Episodes aims to speed up that process!

It’s as simple as entering all your relevant podcast episode information to a spreadsheet, copying the info and pasting it into the plugin’s Bulk Episodes page in the WordPress Admin.

For my process, I already receive a spreadsheet with the month’s worth of episodes that includes episode info such as the title, publish date, and MP3 Url. I need to add the episode length and copy / paste episode text content (html formatted, in one line – no spaces). Once all the podcast episode information is ready on the spreadsheet, adding all the episodes thru the plugin’s admin page is as simple as:

1. Copy all data from the spreadsheet and paste it to the plugins text field. Click on Continue

2. The next screen that loads is the verification screen. If all the data is displayed properly, click on Verify and Submit near the page bottom to submit the data and add all episodes to WordPress/Seriously Simple Podcasting. If data isn’t correct, click on start over near the top so you can repaste your spreadsheet data – this essentially takes you back to step 1.

 

 

 

3. If everything was good to go on step 2 and you clicked on Verify and Submit on step 2, you are taken to the confirmation screen. Done!! This screen gives you a listing of all the episodes added as well the links to edit and view each one of them.

How to get it

You can install the plugin thru the WordPress Plugins -> Add New page and searching for Simple Bulk Episodes or download it at the WordPress.org repository here: Simple Bulk Episodes.

You can contribute to or fork the plugin thru its project page on GitHub: Simple Bulk Episodes.

The post WordPress Plugin: Simple Bulk Episodes appeared first on Jason Jalbuena.

]]>
https://jasonjalbuena.com/simple-bulk-episodes/feed/ 0
Google search operator bookmarklets https://jasonjalbuena.com/google-search-bookmarklets/ https://jasonjalbuena.com/google-search-bookmarklets/#respond Thu, 07 Jan 2016 18:56:54 +0000 http://jasonjalbuena.com/?p=860 Bookmarklets have been around for a looong time and I’ve used more than a few over the years, however am a newcomer when it comes around to making my own. What’s a bookmarklet you ask? Simply, it’s a browser “bookmark” that extends the use of your browser. More technically, when a bookmarklet is clicked on […]

The post Google search operator bookmarklets appeared first on Jason Jalbuena.

]]>
Bookmarklets have been around for a looong time and I’ve used more than a few over the years, however am a newcomer when it comes around to making my own.

What’s a bookmarklet you ask? Simply, it’s a browser “bookmark” that extends the use of your browser. More technically, when a bookmarklet is clicked on it runs javascript on the browser – which could be programmed to do a huge variety of different things.

With that in mind, I decided to make a few of my own to simplify a couple of SEO research related tasks that I do from time to time.

To make these bookmarklets your own, drag the corresponding bookmarklet icon from below to your browsers bookmark area. If that doesn’t work on your browser, check out this guide from marklets.com. I’ve tested these on the following browsers: Chrome 46, Firefox , IE , and Safari.

Link:

Link bookmarklet

when clicked on this bookmarklet will search Google for the current displayed URL using the link: search operator. In effect, it will return pages that link to the URL you are on when clicked.

Site:

Site bookmarklet

when clicked on this bookmarklet will search Google for all URLs found in Google’s index for the current website. It uses the site: search operator and works best when used on a website’s home page.

Related:

Related bookmarklet

When used this bookmarklet will return a google search page showing other URLs that Google thinks is related to the current URL. This uses the related: search operator.

Info:

Info bookmarklet

This bookmarklet when clicked will return information regarding the currently displayed URL. It basically provides links to other URL related search results for the current URL. This uses the info: search operator.

For a full list of Google’s “official” search operators click here.

The post Google search operator bookmarklets appeared first on Jason Jalbuena.

]]>
https://jasonjalbuena.com/google-search-bookmarklets/feed/ 0
Summit Sounds Studio https://jasonjalbuena.com/summit-sounds-studio/ https://jasonjalbuena.com/summit-sounds-studio/#respond Thu, 24 Dec 2015 03:33:39 +0000 http://jasonjalbuena.com/?p=857 Summit Sounds Studio is the recording studio of Summit International School of Ministry. It is used to teach their students about music technology and for rent for sessions or recording projects. Summit needed a new website to showcase their studio and contracted my great designer friends Hybrid Studios for the overall visual design and I […]

The post Summit Sounds Studio appeared first on Jason Jalbuena.

]]>
Summit Sounds Studio is the recording studio of Summit International School of Ministry. It is used to teach their students about music technology and for rent for sessions or recording projects.

Summit needed a new website to showcase their studio and contracted my great designer friends Hybrid Studios for the overall visual design and I took care of turning their design, a custom implementation of a premium WordPress theme, into the final website.

Project Highlights

Server setup and WordPress installation

A new installation of WordPress was needed for this project. Summit’s existing web server was prepped for this new website and WordPress, the theme, and required plugins were installed.

Photoshop PSD of customized WordPress theme to working website

Hybrid provided me with PSDs of their design and the theme with which to do the work with. Some WordPress themes are very intuitive and straight-forward to install, properly set-up, and customize. Other themes, including this one, was not. It had way too many confusing options, used language and grammar that was not user-friendly for most users, and required a number of plugins installed and used in a particular way. I was able to properly set-up and customize the website to their specifications.

The post Summit Sounds Studio appeared first on Jason Jalbuena.

]]>
https://jasonjalbuena.com/summit-sounds-studio/feed/ 0
Disable WordPress update notifications and nags, properly https://jasonjalbuena.com/disable-wordpress-update-notifications/ https://jasonjalbuena.com/disable-wordpress-update-notifications/#comments Wed, 12 Aug 2015 15:09:57 +0000 http://jasonjalbuena.com/?p=852 So, I needed to disable all upgrade notifications and nags in a WordPress install. Searching the web yielded many results, most of which work and are pretty similar. What doesn’t work Some of what I found included code to remove wp_version_check and pre_option_update_core, like: add_action( 'init', create_function( '$a', "remove_action( 'init', 'wp_version_check' );" ), 2 ); […]

The post Disable WordPress update notifications and nags, properly appeared first on Jason Jalbuena.

]]>
So, I needed to disable all upgrade notifications and nags in a WordPress install. Searching the web yielded many results, most of which work and are pretty similar.

What doesn’t work

Some of what I found included code to remove wp_version_check and pre_option_update_core, like:

add_action( 'init', create_function( '$a', "remove_action( 'init', 'wp_version_check' );" ), 2 );

and

add_filter('pre_option_update_core', create_function( '$a', "return null;" ));

…but neither alone nor together work to remove WordPress Update notifications.

What Works

A lot of what I found look something like this:

function remove_core_updates () {
     global $wp_version;
     return(object) array(
          'last_checked'=> time(),
          'version_checked'=> $wp_version
     );
}
add_filter('pre_site_transient_update_core','remove_core_updates');
add_filter('pre_site_transient_update_plugins','remove_core_updates');
add_filter('pre_site_transient_update_themes','remove_core_updates');

This works well to remove all WordPress update notifications.

Since there is more than one way to achieve the same goal, other code samples would attempt to remove core (not theme or plugin) update notifications by using variations on pre_site_transient_update_core, such as:

add_filter( 'pre_site_transient_update_core', create_function( '$a', "return null;" ) );

or

add_filter('pre_site_transient_update_core','__return_null');

They all work to remove update notifications. There are also plugins available to achieve the same goal, but they contain the same code.

The problem with what works

Now, the code above works, but there is a problem. In an environment where debugging is turned on (such as on a local testing environment or server), the code produces a bunch of error notices in the Updates page, like so:

disable wp update notifications error notices

I aim to ship error-free code, so seeing any number of error notices is unacceptable.

The fix is to set an empty array to the updates property of the object returned by the filter to pre_site_transient_update_core, like so:

'updates' => array()

So all the code you would need to properly remove all update notifications from a WordPress install is:

function remove_core_updates () {
     global $wp_version;
     return(object) array(
          'last_checked'=> time(),
          'version_checked'=> $wp_version,
          'updates' => array()
     );
}
add_filter('pre_site_transient_update_core','remove_core_updates');
add_filter('pre_site_transient_update_plugins','remove_core_updates');
add_filter('pre_site_transient_update_themes','remove_core_updates');

And it results in a clean, error-free Updates page.

disable-wp-update-notifications-no-errors

Notes:
1. The code should go into your theme’s functions.php file or in a plugin.

2. It is a good idea to wrap everything in an if statement, that way you could disable the notifications for certain users, environments, or whatever criteria you may have. In my case, notifications are disabled in the live/production environment but is present in local testing.

The post Disable WordPress update notifications and nags, properly appeared first on Jason Jalbuena.

]]>
https://jasonjalbuena.com/disable-wordpress-update-notifications/feed/ 2
South Bronx Early College Academy Charter School https://jasonjalbuena.com/sbecacs/ https://jasonjalbuena.com/sbecacs/#respond Tue, 02 Jun 2015 01:14:13 +0000 http://jasonjalbuena.com/?p=834 The South Bronx Early College Academy Charter School is a NYSED authorized New York State charter school. They had an almost complete website, but needed help in getting the last leg of work done to get it ready for their website’s launch. They had purchased a premium WordPress theme and needed help with changes that […]

The post South Bronx Early College Academy Charter School appeared first on Jason Jalbuena.

]]>
The South Bronx Early College Academy Charter School is a NYSED authorized New York State charter school.

They had an almost complete website, but needed help in getting the last leg of work done to get it ready for their website’s launch. They had purchased a premium WordPress theme and needed help with changes that the theme’s options didn’t provide.

Project Highlights

Website design layout

sbecacs-home-oldsbecacs-home-new
SBECACS wanted to change their website’s layout changed on site-wide. They needed changes to their site’s header/navigation area and to remove their content’s “floating page” appearance. The images above compare their previous homepage (left) and the homepage after changes were complete (right).

Homepage Options Admin

SBECAC homepage adminSBECACS also asked for the ability to have a rotating banner carousel and an announcements area on their homepage. To make it easy for them to update their requested homepage features, I made a custom, easy-to-use admin page with which they could quickly add or remove announcements and add or remove rotating banners.

The post South Bronx Early College Academy Charter School appeared first on Jason Jalbuena.

]]>
https://jasonjalbuena.com/sbecacs/feed/ 0