I use the more tag to display the full info about a number of services a company offers. together with the full info I want to show a couple of reference-projects for each service.
However I don’t know how to show the correct tagged project depending on what service is opened.
ATM i use this code to display the projects in “single.php”.
<?php
$args = array(
'post_type' => 'projects',
'project-tag' => 'construction'
);
$the_query = new WP_Query( $args );
?>
<?php if ( have_posts() ) : while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
As you can see in this code i have “project-tag” => “construction”, which shows projects tagged with “construction”, no matter what service the user clicks. I need this to be set dynamically, like if the user clicks “carpenting”, I want to show projects tagged with “carpenting” etc.