Single permalink returning one custom post
-
Hello guys, I am having some issues with my wordpress site.
When one clicks on a permalink element, WordPress generates a page full of all the custom fields.
How do I get it to only show the one that I click on? I have tried to get it to work but I am at an impasse.
This code is the clickable custom work image field
<?php$args = array(
‘post_type’ => ‘work’
);$the_query = new WP_Query($args);
?><?php if (have_posts() ) : while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
- <img class=’image-area’ src='<?php the_field(‘image’); ?>’>
<?php endwhile; ?>
<?php wp_reset_postdata(); ?>
<?php endif; ?>When I click on the image it displays all the work posts not the one that was clicked,
I cannot find out how to fix it!
Sorry about the code blocks I could not get it!
The topic ‘Single permalink returning one custom post’ is closed to new replies.