When your website means business.

Snippets: PHP

Display Featured Image on Listing»

How to add featured image to other post types. ADD TO THEME FUNCTIONS // This theme uses post thumbnails add_theme_support( 'post-thumbnails', array( 'plans','listings','news','post' ) ); ON POST-TYPE SPEC 'supports' =>…
Images, PHP, WP/CP | Type: PHP

Namespace; if function exists»

WP-PageNavi CPT LISTING <?php if(function_exists('wp_pagenavi')) { wp_pagenavi(array('query' => $newslist )); //$newslist is name of query for 'news' cpt } else { echo 'Please enable WP-PageNavi!'; } ?> ALTERNATIVELY FOR BLOG…
PHP, WP/CP | Type: PHP

PHP 7.2 Countable issue»

Before PHP 7.2 when passing a non-array to count(), it returned 1. With 7.2, count() emits a warning when you give it a non-array.
PHP | Type: PHP