Tag Archives: Snippets

How to order wordpress posts and custom post_types

When working on a recent project i needed to display a custom post_type in a specific order, to do this we need to hook into the main wordpress for the post or custom post_types archive and override the default arguments with our custom order and any other parameters we wish to change.

Continue Reading →

Create Custom Post Status in WordPress using register_post_status()

This article explains how-to create a custom post status, populating the post status drop down menu with your status giving you the ability to change post status from the wordpress post editor seciton.

Continue Reading →

Hard Code WordPress Menu Items, logout example

This guide will take you though using and installing a Wordpress menu onto your theme, showing you how to add menu items through Wordpress’s administration interface and how to hard code them via your themes functions.php file

Continue Reading →

WordPress disable specific plugin from being updated

Want to stop a certain plugin from being updated by a client, maybe the last release of the plugin before a major update change.

Continue Reading →

WordPress: Password protecting a post

An introduction to changing your posts viability, and how to remove Protected: and Private from your post titles.

Continue Reading →

WordPress is child to selected page

This snippet of code is very useful when creating sub navigation in WordPress. It allows you to check if a page is a child of a specific page.

Continue Reading →

get_the_content() not formatting when output

Using get_the_content() instead of the_content() function in your theme, to modify the content before displaying it on the website but the output is different when using the_content(). WordPress get_the_content() does not run its formatting functions.

Continue Reading →

get_terms not showing any results

Trying to display a list of all your wordpress categories or any other taxonomy, but no results are being displayed? WordPress get_terms() function by default does not show any empty taxonomies.

Continue Reading →

Modifying WordPress Search Results, Excluding Pages

When developing a single page website, allowing the client to customise each individual section of the page by editing them as sub-page. Once this was working, a problem appeared when testing the search box by all these pages showing up in the results. This article will explain how to tailor WordPress search results.

Continue Reading →

WordPress Excerpt Customise – the_excerpt()

This article is a collection of snippets that can be used to modify the look and feel of excerpts on your WordPress Theme, to use any of these snippets copy and paste them into your functions.php file within your themes directory.

Continue Reading →