How to setup a permalink structure for a custom post type

I think you need to use the rewrite argument. Here’s an example setting the url to tips $args = array( ‘public’ => true, ‘publicly_queryable’ => true, ‘show_ui’ => true, ‘show_in_menu’ => true, ‘query_var’ => true, ‘rewrite’ => array( ‘slug’ => ‘tips’ ), // Here! ‘capability_type’ => ‘post’, ‘has_archive’ => true, ‘hierarchical’ => false, ‘menu_position’ => … Read more

How to create a archive template for custom post type [duplicate]

Try this: <?php while($article_posts->have_posts()) : $article_posts->the_post(); ?> <tr> <td><a href=”https://wordpress.stackexchange.com/questions/131769/<?php the_permalink(); // <– Here”s the post url ?>”><?php the_title(); ?></a></td> <td><?php the_field(‘published_in’); ?></td> <td><?php the_field(‘article_author’); ?></td> <td><?php the_field(‘published_date’); ?></td> </tr> <?php endwhile; ?>