Support

Account

Home Forums Front-end Issues ACF + GEO targeting problem

Unread

ACF + GEO targeting problem

  • <?php
    $b = ["FI", "US"]; // works
    $c = get_sub_field('country'); // has exactly same content but does not work
    
    	// Get location of user
    	$record = geoip_detect2_get_info_from_current_ip();
    	// Match array
    	if ( in_array($record->country->isoCode, $c)) { ?>
    		
    	
    				CONTENT
    	
    	
    <?php } ?>

    How to get this geo thing to work? Whats wrong with this?

Viewing 1 post (of 1 total)

The topic ‘ACF + GEO targeting problem’ is closed to new replies.