Get custom field value from the function.php

Found a solution: add_filter( ‘facetwp_preload_url_vars’, function( $url_vars ) { //get the id of the current page $url=”http://” . $_SERVER[ ‘HTTP_HOST’ ] . $_SERVER[ ‘REQUEST_URI’ ]; $current_post_id = url_to_postid( $url ); //get the offer_type (custom field) from the current page id $offer_id = get_field(‘offer_type’, $current_post_id); //returns an id //get the taxonomy slug from the offer_id $term … Read more

How do I stop an Image Address from loading in the Browser?

Would it be a case that it is not possible to disable the Right Click option when loading the original image, by entering its Image address into the Browser? No. You can’t control this. Assuming this is the case, is it possible to prevent the Image from loading when entering the Image Address directly within … Read more

Adding variable in WordPress shortcode

Rather than passing the variable contents in to the shortcode, you would probably be better to pass in the URL parameter you are setting, i.e. [post color=”color” width=”980″ heigh=”610″]. Because your shortcode will execute during load in PHP, you can then tell your shortcode function to store the value of $_GET[‘color’] to later use in … Read more