• Resolved kuro

    (@kuro)


    Hi. This is my CPT code in my front-page.php:

    <?php $myquery = new WP_Query(array(
    			'post_type' => 'eventos'
    		)); ?>
    		<?php while ( $myquery->have_posts() ) : $myquery->the_post(); ?>
    			<p class="fecha"><?php the_field('fecha'); ?></p>
    			<h4><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h4>
    			<span class="ciudad"><?php the_field('ciudad'); ?></span>
    			<span class="pais">(<?php the_field('pais'); ?>)</span>
    			<?php
    		endwhile;
    		?>

    Works ok but I have a strange issue. The permalink get the correct post URL but when you visit the link WordPress can’t be found.

    Screenshot:
    <img src=”http://thumbs.subefotos.com/b5cc40722c934314c9d4f2bfab112b20o.jpg&#8221; />

    Any ideas?

    Thanks in advance

    https://wordpress.org/plugins/polylang/

Viewing 1 replies (of 1 total)
  • Thread Starter kuro

    (@kuro)

    I resolved updating permalinks in admin panel > settings > permalinks > save changes.

    Always you must update permalinks when you work with CPT.

    Thanks

Viewing 1 replies (of 1 total)
  • The topic ‘Custom Post Type and permalink issue’ is closed to new replies.