Search for images that width and height is more than 500

You can run your $matches through the getimagesize() function to check it’s dimensions, the problem is this function requires a path to the image but your content will provide full URL’s so you’ll need to see if the image is also saved in your media library and if so grab the relative path only. If … Read more

Position a repeated article blocks

Your is_int function is always returning true, because $count/2 is always an integer. is_int from the looks of it, just returns true if the parameter supplied is a number (integer), or false, if its anything else (string). Try changing if(is_int($count / 2)){ … } to if($count % 2 == 0) { //Code for even result … Read more

ACF Post Content Not Being Searched

Advanced Custom Fields does not automatically output the fields you add in the_content(). You need to use ACF’s template functions. Refer to the documentation for more. Based on your comment, yours will look something like: <div class=”contentarea”> <div id=”content” class=”content_right”> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <div id=”post-<?php … Read more

Nested DIV’s across functions in PHP, do not seem to work

The return command does exactly what it says, it returns the data and then returns back to the script. So, any lines after it will not be executed. You have this function in your code: function vc_make_graph() { $db_handle = new DBController(); # Show the customer dropdown ?> <div id=”overall”><?php $results = show_customer_dropdown($db_handle); if (isset($results)) … Read more

Display specific main Sub Nav on Woocommerce product pages

Yes you can with conditional tags. https://docs.woocommerce.com/document/conditional-tags/ So depending on whether you wanted it to appear on all woocommerce pages (the listing page as well as the individual product pages) you could use is_woocommerce() if you wanted just on individual product pages you could use is_product() So you would use an if statement to check … Read more

Use header option on wp-login page with a second logo

For anything other than simple CSS tweaks your best bet is to use wp_login_form() in a custom Page Template and filter login_url to return that instead of wp-login.php: add_filter( ‘login_url’, ‘wpse276598_login_page’, 10, 3 ); function wpse276598_login_page( $login_url, $redirect, $force_reauth ) { return home_url( ‘/my-login-page/?redirect_to=’ . $redirect ); } If you wanted to redirect all successfully … Read more