Click here to Skip to main content
15,886,056 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Trying to create a query:

add_action( 'elementor/query/featured', function( $query ) {
	$query = new WP_Query( array( 'meta_key' = '_is_ns_featured_post', 'meta_value' = 'yes' ) );
} );


But points a fatal error:

syntax error, unexpected '=', expecting ')'


Someone can help me?

What I have tried:

Using NS Featured Posts plugin and Elementor
Posted
Updated 14-Jun-21 22:25pm

1 solution

Looking at the documentation[^], you should be using => instead of =.
JavaScript
array( 'meta_key' => '_is_ns_featured_post', 'meta_value' => 'yes' )
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900