use a map for some custom WP_Query
-
Hi, I need assistance in order to "plug" travelers' map with some custom page template I made. Probably the knowledge I need is more about the general functionning of wordpress, but I don't know where to look. Here is what I tried (below the query is an example that works) : a page that just lists titles of articles corresponding to some terms of two custom taxonomies. Below is a code that works (list titles).
<?php get_header(); $query = new WP_Query( ??? ??? ??? ??? ??? array( ??? ??? ??? ??? ??? ??? 'post_type' => 'post', ??? ??? ??? ??? ??? ??? 'tax_query' => array( ??? ??? ??? ??? ??? ??? ??? ??? 'relation' => 'OR', ??? ??? ??? ??? ??? ??? ??? ??? array ( 'taxonomy' => 'enjeu_environnemental', 'post_status' => array('publish'), 'field' => 'slug', 'terms' => array('nucleaire') ), ??? ??? ??? ??? ??? ??? ??? ??? array ( 'taxonomy' => 'pays', 'post_status' => array('publish'), 'field' => 'slug', 'terms' => array('algerie') ) ??? ??? ??? ??? ??? ??? ??? ??? ), ??? ??? ??? ??? ??? ??? ??? ) ?? ??? ??? ??? ??? ? ); ?if ( $query->have_posts() ) : while ( $query->have_posts() ) : ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? $query->the_post(); ?> ?<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php echo($co.'? '.the_title()); ?></a></h2> ?<?php endwhile; ?> ?wp_reset_postdata();
Now, instead of listing titles, I would like to show a map with the relevant marks (those corresponding to the articles resulting from my WP Query). I thought I could do this by using do_shortcode(...), like I do so on my landing page (and it works). But I couldn't figure out where to insert my shortcode in the above example, or how to "sew" both... Any idea that can help me ? Thank you in advance !The page I need help with: [log in to see the link]
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘use a map for some custom WP_Query’ is closed to new replies.