A collection of WordPress functions I use often.

Link to Home:

Include another php file:

*File name separated on ‘-‘ between two inputs to function. So if named include-content-blocks.php call is:

Custom field images (not featured):

Get image values in array instead of outputting image:

Retrieving featured images is a different function:

Get Image Caption

 

Conditionals to check post type Inside Loop:

Conditionals to check on single page (like in functions.php or header.php to change common things in templates):

Keep selected taxonomies and categories in hierarchical order and not on top in admin:

Reset $post variable:

Use after calling setup_postdata($post), $query->the_post() or ACF repeaters/flexible content the_row()

Retrieve public query variable in the WP_Query class of the global $wp_query object:

Get all pages that use a certain template:

Call shortcode from template:

Obfuscate Email:

See https://codex.wordpress.org/Function_Reference/antispambot for more details