Common issue on shared hosting. Debug is unable to be deactivated due to host settings.
ini_set('error_reporting', E_ALL );
Membership type websites need to be customized to prevent Subscribers from accessing certain areas of WordPress core. After setting up a front-end Profile page or Dashboard, it is necessary to redirect to these areas for the appropriate user types.Read More
In the past I’ve manually changed the content of the jquery file (I know, bad bad bad), or used a plugin to make this editable for me (also, bad bad bad). This snippet helps avoid those two methods and lets the edit occur within your theme.Read More
I recently built a website with a large featured banner on their home page, and events page. Banners information was held in a Custom Post Type, and Events were created by The Events Calendar plugin.
The client wanted to combine these two items to show all of the banners on the Home page, to more readily promote their events.Read More
The site health widget can alert you to issues on the website, but this can also be confusing to clients and increase maintenance requests to resolve “issues” when the website is functioning properly. Hide this widget using the following snippet.
Place in functions.php
remove_meta_box('dashboard_site_health', 'dashboard', 'normal');
Annual events (festivals, haunts, etc.) generally occur within the same month each year. Use this function to force update all of your calendar views so scheduled events are seen first without having to navigate through month / week views.Read More
I used this on a custom page template showing only Past Events.Read More
I’ve seen a lot of suggestions online to copy the Logout link shown in the WordPress backend into a Custom Link when using wp_nav_menu().
However, this will redirect users to the Logout Confirmation screen, and they will be prompted to logout once more.Read More
December 18, 2019
Style images differently according to weather the image is landscape, portrait, or even square.Read More
August 07, 2019
Want to hide the editor from the WordPress editor because:
- there are several users accessing the WordPress backend
- a client has requested this feature be disabled
- you never user it
Add the following line to wp-config.php above the “That’s it, happy blogging” comment line.
define('DISALLOW_FILE_EDIT', true );Read More
August 22, 2018
I previously attempted this using post_parent, grandparent and ancestor information in an if statement, but I find this method is cleaner.Read More
I use this fairly often. I find working with plugins I already have installed is better than installing additional plugins to resolve the issue I’m trying to accomplish more reliable.Read More
February 14, 2018
If your website has several News / Blog contributors, you can display a list of Authors by role and link back to their individual landing pages (author.php).Read More
WordPress has so many different “stock” template types that are not used on every type of website. For example, a small business website, may not use the Archive, Blog or Single page layouts.
In my seven years of building WordPress website, I have yet to come across a single client that uses the “Attachment Page” layout (properly, at least).Read More
November 01, 2017
If you have transitioning content on your website, such as a Templated Page that will be launching at a certain date or time, you can setup a custom countdown landing container, and use a custom field to automatically update the content at a scheduled date and time.Read More
Building custom menus and filters is unavoidable. If you’re not comfortable triggering the active item with jQuery to add an active class, you can find the current page ID, and use existing WordPress CSS classes to reapply styles already within your stylesheet.Read More
I work with Gravity Forms, and Gravity Forms User Registration a lot, so being able to redirect users to a custom template instead of a front end user profile (such as Theme My Login) would be preferred.
With Gravity Forms, I’m able to enable custom notifications based on the fields that are updated.Read More
I recently worked in a website that had multiple skins within a single domain. The different themes were controlled and activated by their related parent pages. I’ve already gone over how to add an ancestor class to the body, but I needed to add a couple additional features to this website as well.Read More
<?php $tax_slug = get_query_var( 'taxonomy_category' ); ?>
Comes in handy if you’re working with custom post types, or external plugin archive pages.Read More
A deep number of page levels in a website can make navigation difficult for front end users. In addition to breadcrumbs, it is worthwhile to maintain your Top-Most Page Title in all areas to help your visitors find their way between the hierarchical sections of your site.Read More
April 05, 2017
The All in One Event Calendar by Time.ly is extremely flexible if you need to place several widgets and event shortcodes on your website.
Using the Plugin to generate your own custom query and feeds of your Event information is not very intuitive, and finding valid information a long process.Read More
This is a continued modification of my earlier post for toggling multiple embedded YouTube videos into a larger playing div.
Since I was already using Posts to embed the videos, enabling a Featured Image for a Poster, and using the Content editor for a text overlay was a simple feat to accomplish.Read More
December 07, 2016
Sometimes when building arrays for directories, or archives, we have to list all of the content (even the empty ones).
In the unfortunate circumstance when you have no choice but to use the foreach loop, here is a handy workaround to check if the loop is empty, and display a custom messageRead More
You can achieve more stylistic versatility within your WordPress backend, and theme, if you’re able to inject fonts within the WYSIWYG editor.
This is possible if you are using embedded fonts, or if you are using fonts from a hosted library using the below function, and the Advanced TinyMCE plugin addon.Read More
Creating dynamic layouts can make it easier on your clients (and yourself) to update your content without worrying about checking the front end to make sure the selections are correct, or having to update various posts / content areas following updating new content.
The following example shows how to add a colour class to your container using the_loop, php and with some CSS adjustments, possibilities are endless!Read More
A useful addendum to queries when multiple products / post types are going to be featured with the same / similar names. This will prevent the need to add alphanumeric differential identifiers to the titles, and the links, slugs or categories assigned to the content can be used to divide up the information accordingly.Read More