• I use ACF 5.0 (Advanced Custom Fields) and want to produce a list of posts filtered by a particular custom field. I wanted a simple plugin to paste some php into that can output a short-code that I can drop into whatever page that I want to display these filtered posts.

    I’ve tried many many plugins out there and nothing seems to work. Is this something I could achieve with your plugin?

    Basically I have variations of this code below and need to put it somewhere:

    <?php 
    
    // args
    $args = array(
    	'numberposts' => -1,
    	'post_type' => 'Checkbox',
    	'meta_key' => 'high_impression',
    	'meta_value' => 'High Impression'
    );
    
    $the_query = new WP_Query( $args );
    
    // The Loop
    ?>
    <?php if( $the_query->have_posts() ): ?>
    	<ul>
    	<?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
    		<li>
    			<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
    		</li>
    	<?php endwhile; ?>
    	</ul>
    <?php endif; ?>
    
    <?php wp_reset_query(); ?>

    https://www.ads-software.com/plugins/inject-query-posts/

  • The topic ‘Perhaps this is too complex for me’ is closed to new replies.