• Resolved supaiku

    (@supaiku)


    Is it possible to have the querly loop return posts with meta data that matches a dynamic term? For instance:

    1. a term passed via a url query
    2. a term passed via a search box
    3. any other solution?

      Thank you!
      Sweet and powerful plugin! ??
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support fernandoazarcon2

    (@fernandoazarcon2)

    Hi there,

    It’s possible.

    You have to grab it via PHP and filter it in. A filter you can use is generateblocks_dynamic_content_output

    Here’s a sample code for a Headline with class get_url_query for URL query parameter custom_param.

    add_filter('generateblocks_dynamic_content_output', function($content, $attributes, $block){
    	if ( ! empty( $attributes['className'] ) && strpos( $attributes['className'], 'get_url_query' ) !== false ) {
    		$customParamValue = get_query_var('custom_param');
    		if($customParamValue){
    			return $customParamValue;
    		}
    	}
    	return $content;
    }, 10, 3);
    Plugin Support fernandoazarcon2

    (@fernandoazarcon2)

    Hi there! We haven’t heard back from you for a while now so we’re going to go ahead and set this topic as resolved. Feel free to open a new topic if you need assistance with anything else GB-free related.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Dynamic Meta Queries?’ is closed to new replies.