Variables in an Array from Custom Meta Data
-
Is it possible to turn this into a variable so I can later call it into an array?
/* Variable */ <?php $events = echo $ministry_meta['ministry_events'][0];?>Like this
/* Array */ <?php $loop = new WP_Query( array( 'post_type' => 'events', 'posts_per_page' => 10, 'tax_query' => array( array( 'taxonomy' => 'event-cat', 'field' => 'slug', 'terms' => $events ) ) ) ); ?>This is how I am currently pulling in custom meta information from my custom post type.
<?php echo $ministry_meta['ministry_events'][0];?>I would like to turn it into a variable to I can
include it in the array. I hope this makes sense. Thanks in advance for any help.
The topic ‘Variables in an Array from Custom Meta Data’ is closed to new replies.