WordPress loop based on url sting

use $_GET[‘Price’] and $_GET[‘Region’] to get the price and region values from the url and add them to your query args. It is rather hard without any code to start from, but try something like $queryPrice = (strpos($_GET[‘Price’],’-‘) ? explode(‘-‘, $_GET[‘Price’]) : array($_GET[‘Price’], $_GET[‘Price’])); $queryRegion = $_GET[‘Region’]; $args = array( // all your args here … Read more

Sort by multiple options in custom field

I think that if you make your choices list a value=>label list, this should work: https://wordpress.stackexchange.com/a/11454/20807 Instead of your current list, 1 : Ultimate Plus 2 : Ultimate 3 : Professional 4 : Commercial 5 : Business 6 : Free It can also be in the order that you currently have 6 : Free 5 … Read more

How to query posts by meta keys AND under specific category?

Are you using a checkbox or similar for the ‘acf_platform’ field using ACF for more than one selection? Advanced Custom Fields stores these as a serialised array, so a meta_query with ‘compare’ => ‘=’ may not work. The ACF documentation suggests using ‘compare’ => ‘LIKE’ $args = array( ‘meta_query’ => array( array( ‘key’ => ‘field_name’, … Read more

ACF Shortcode bringing in my shortcode is adding unnecessary line breaks

It was solved by a coworker. function removebreaks($content) { $content = str_replace(‘<br>’, ”, $content); $content = str_replace(‘<br/>’, ”, $content); $content = str_replace(‘<br />’, ”, $content); $content = str_replace(‘<BR>’, ”, $content); $content = str_replace(‘<BR/>’, ”, $content); $content = str_replace(‘<BR />’, ”, $content); return $content; } add_filter(‘acf_the_content’, ‘removebreaks’);

Add routes between multiple ACF google maps markers [closed]

I’ve managed to work around this by using Gmaps.js. function initMap($el) { var bounds = []; var waypts = []; var $markers = $($el).find(‘.marker’); var map = new GMaps({ div: $el, scrollwheel: false, zoomControl : true, zoomControlOpt: { style: ‘LARGE’, position: ‘TOP_RIGHT’ }, panControlOpt: { position: ‘TOP_RIGHT’ } }); $markers.each(function() { // DEFINE CURRENT/NEXT MARKER … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)