• Resolved Sam

    (@forbiddenchunk)


    I have a custom post

    <?php			 
    		$fuel_cards_posts = 'p=599 & post_type="adverts" & showposts=99999';
    	$posts = get_posts($fuel_cards_posts); foreach($posts as $post) {
    		global $post;
    ?>
    	<a href="<?php the_field('url'); ?>" target="_blank"><img src="<?php the_field('image'); ?>" alt="<?php the_title(); ?>"></a>
    <?php } ?>	
    <?php wp_reset_query(); ?>

    Yet when I click a post on the homepage, the URL is correct but the page loads that post with the title and nothing else?

    I have WP Reset Query but still not working…

    Anyone got any ideas?

    Thanks in advance

    • This topic was modified 9 years, 2 months ago by Sam.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Custom post causing post link bug’ is closed to new replies.