WordPress nonces are an easy piece of security measure you can implement into your plugins or themes to prevent your users from Cross Site Request Forgery attacks. But how do WordPress nonces really work? You heard they were valid for 24 … Keep on reading
How to Override The WordPress Template Hierarchy
The basic functionality WordPress renders the theme files using the template hierarchy. Depending on the content type, it will select the file to use to render the layout for that specific content. Looking at the visual overview of the … Keep on reading
All You Need to Know About Content Restriction on WordPress
One topic that I often see coming up is how to restrict a certain category, tag, topic, post type, custom taxonomy, or what not from visitors of a WordPress site, to only people we want to allow access to. The answer is pretty simple. It … Keep on reading
How to Retrieve a Custom Post Type Capababilities
In order to retrieve a list of capabilities registered for a post type, you can use the get_post_type_object( $post_type ) function and print out it's capabilities like so $book = get_post_type_object( 'books' ); print_r( $book->cap … Keep on reading
Rename the Filter Posts List Quick Link in WordPress
If you want to register a new post status in WordPress, you can do so with the function register_post_status(). But WordPress as some predefined statuses that cannot be renamed without interfering with the core functionalities i.e. the … Keep on reading
Filter Genesis H1 Entry Title
If you want to change h1 html tag to a h2 because you already used the h1 tag in your template, or because you need to add some classes to the entry title, use this code to filter out the output of the entry title. This snippet goes into … Keep on reading
WordPress config: Get Users Real IP When Behind a Proxy or Load Balancer
Having your WordPress site behind a Load Balancer is essential if you want to achieve High Availability (HA) for your site. But this could have some unwanted behaviours for your WP installation. One of those unwanted behaviour is not … Keep on reading
Customize allowed HTML Tags in WP Comments
The following snippets will allow you to add html tags that are not allowed by default in WordPress Core. We hook into pre_comment_on_post that runs just before a comment is saved to your database. Here's two version of snippets. The first … Keep on reading
WordPress Template Hierarchy
Efficiency In order to make efficient Wordpress themes and to help in maintaining a clean code structure, knowing the priority WordPress gives to a custom page in the loading sequence is essential to achieve this task. Here's the … Keep on reading