Filtering from advance custom field data

This is a little more complicated. You have to loop through the elements first, and create a twodimensional array containing weekday and time. $entries = array(); while ( have_rows(‘tag’) ) : the_row(); //clean thisentry $thisentry = array(); // set aufguss and sauno for thisentry $thisentry[‘aufguss’] = get_sub_field(‘aufguss’); $thisentry[‘sauna’] = get_sub_field(‘sauna’); // populate array for wochentag/uhrzeit … Read more

How to do a wp_query with two acf-fields, sorting on one of them

You are just confusing the array levels, ordering is not done inside the meta_query level but on the main query level. It is the difference between two classes: https://codex.wordpress.org/Class_Reference/WP_Query https://codex.wordpress.org/Class_Reference/WP_Meta_Query Also, as the meta query codex says: “Custom field value can be an array only when compare is ‘IN’, ‘NOT IN’, ‘BETWEEN’, or ‘NOT BETWEEN’”… … Read more

Create shortcode in WordPress, using one variable in 3 functions?

use function to call variable function give_value(){ $acfvalue = get_field( ‘short_title’ ); return $acfvalue; } function hprice(){ return ‘<h2>’. give_value() . ” Price list in India” .'</h2>’; } add_shortcode( ‘pprice’, ‘hprice’ ); function hspecs(){ return ‘<h2>’. give_value() . ” Full Specification” . ‘</h2>’; } add_shortcode( ‘pspecs’, ‘hspecs’ ); function hreview(){ return ‘<h2>’. give_value() . ” … Read more

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