Category: Code

New Archive Page Title Filters in WP 5.5

WordPress 5.5 adds a couple new filters that should be useful to adjust the page title displayed in the archive.php template. See this article for more details. The first is a filter named get_the_archive_title_prefix which can be used to change or remove the prefix returned when using the function get_the_archive_title to write out the page […]

List Categories and Taxonomies in Template.

All regular Post Categories All Terms in Taxonomy See possible parameters to get_terms(). No single function to get all terms as links. Example below to loop through get_terms() result with links.

Single Post/CPT Category/Taxonomy Template Tags

Below are functions to display categories or taxonomies attached to a single post or custom post type. Some functions work only on the built in Post ‘category’. Others work on taxonomies which can be attached to the built in Post or a Custom Post Type. Display Single Post’s Categories as links Display Single Post’s Categories […]

Yoast Breadcrumbs for Custom Post Types and Blog Posts

There are a couple tricky settings that affect how Yoast’s breadcrumbs display for Custom Post Types and Blog Posts. It can be a bit frustrating when breadcrumbs are not displaying correctly and you don’t know why. I figured out today, it’s all in the settings. Custom Post Types Breadcrumbs When creating Custom Post Types with […]

Events Calendar tribe_get_events and timezones

Today I spent a frustratingly amount of time trying to list upcoming Events Calendar events on a website, and getting them to stay listed through the start and end time of the event. The reason why events were falling off early is because of the timezone. Events Calendar’s documentation (which I have found to be […]

Remove Post Tags from WordPress Admin

Remove from Posts sub menu in left side WordPress Admin Menu: Remove Tags column from List of Posts in Admin: Remove Tags Side Box when editing/creating post:

Single Post Template Functions

Prints date even if on second post on same day. $post_id is optional if inside of posts loop. See Formatting_Date_and_Time for $format value. Does not print date if displaying second post on same day in loop, or second time used on single post. (For example, if you use this function to display the time and also […]

Retrieve Pages by Path or Template in WordPress

By Template: Check if got anything and use it from query above: By Path: