Hot answers tagged


Tell your boss that Visual Composer is the cancer of WordPress. Tell your boss that you've separated content concerns from visual ones, and that you're not tied into an abhorrent shortcode nightmare should you ever wish to move away from VC and/or change the layout. To elaborate, "VC vs ACF" isn't really a question - they are two completely different ...


You can use pathinfo() and getimagesize(): $info = pathinfo($image); if ( @getimagesize($info['dirname'] . '/' . $info['filename'] . '.' . $extension_to_check) ) { // do something }


When using ACF you should use the methods described in their website documentation because ACF does not store data in the normal Wordpress way. You can use the get_field or the_field functions to retrieve data from your fields. For example to get data for your field 'cover_photo' you could do: $user_id = get_query_var( 'author' ) $cover_photo = get_field('...


The type argument in your meta query is wrong. It spells NUMERICAL but the correct value is NUMERIC. $meta_query = array( array( 'key' => 'bpm', 'value' => array($bpm_start, $bpm_finish), 'type' => 'NUMERIC', 'compare' => 'BETWEEN' ) );

Only top voted, non community-wiki answers of a minimum length are eligible