Try this loop. you need to use the template tag the_permalink()
to get the link to the single items.
As well as using the WP_Query
class to grab the posts you want. The current query below will get the latest 10 published procedimentos posts. If you want to change the amount of posts or anything like that you can see the argument to use for WP_Query()
here .
$procedimentos_posts = new WP_Query( array(
'post_type' => 'procedimentos',
'post_status' => 'publish'
));
if($procedimentos_posts->have_posts()) :
while($procedimentos_posts->have_posts()) : $procedimentos_posts->the_post();
echo '<a href="' . get_the_permalink() . '">' . get_the_title() . '</a>';
the_content();
endwhile;
endif;
wp_reset_postdata();
Related Posts:
- % encoded URL giving 404 error in WordPress
- Custom Post Type + Category archive
- Custom Post Types and 404 Pages
- button onclick with get_post_permalink
- Modify category permalink to use post type slug
- Category permalinks don’t work even after flushing
- Custom permalink structure for custom post types including multiple taxonomy
- Changing CPT permalink
- Excluded Custom Taxonomy Term Posts Displaying in loop
- Permalink for specific post type
- Multiple Loops In Tabs Only Displaying First Loop
- Show custom post type event if current day using ACF
- Custom post type defaults to index.php for archive page
- Custom post type single page returning 404 error when sharing archive url with custom taxonomy
- CPT relations use in permalinks under single post type
- CPT relations use in permalinks under single post type
- Add extra elements to the_post in a custom post_type
- How to only get the content of post page while looping?
- Custom Post Type Single Page and Archive Page redirects to Home Page
- Changing permalink of default Post with custom post
- CPT and rewrite rules
- Custom Taxonomy Archive generates 404
- SEARCH QUERIES – REVERSE OUTPUT
- Accessing download link from the loop with WP Download Manager Pro
- Custom WordPress theme not displaying posts from category
- Custom Post Type has wrong label and is not found when called by a loop
- Some posts not displaying by taxonomy term
- Custom post shows 404 after theme change
- Show date as permalink for custom post type instead of post name
- How can I get custom post types to recognize pretty permalink variables?
- How to stop a permalink redirecting to a page whit same slug but different permalink
- Why do my custom post type show up in all pages?
- How to create an IF statement in the Main Loop for Custom Post Types
- Combine multiple separate lists into one
- Custom meta fields not showing up in WP_Response Object via custom endpoint
- How to merge 2 custom post type permalinks
- Error in the page of a CPT file in WordPress
- ACF meta_key and meta_value break loop
- How to output and alert message when updating a post
- Display all posts from specific category and CPT
- Enabling hierarchical in a Custom Post Type gives error 404
- Looping to organize and display custom posts by category using PHP and WordPress
- Custom post type single with custom URL structure
- Permalink for custom post type pages not working
- Standard Page Child of CPT Not Found (404)
- post_type incorrect for custom post type
- Loop (for search results) returning right posts, but wrong post type
- Skip latest 3 posts from loop
- Pagination for a cpt filtered with a category
- Permalinks: custom post type -> custom taxonomy -> custom sub taxonomy -> post
- posts_per_page is not working by term
- Staggering featured post using ‘sticky’
- Pretty Permalinks with CTP and Taxonomies / Hierarchical
- News post with multiple permalinks? When opened from different page
- Wrapping an unknown amount of posts inside separate HTML Containers during WP_Query loop
- My post loop needs to have 8 different post templates
- Customise Permalink Structure For Custom Post Types
- Multiple Custom Post Type in Taxonomy Archive Causing White Screen
- Adding a Section for Visitors
- Missing permalink for custom post type
- Why is my loop not populating the page with my custom taxonomy terms from my custom post type?
- Show parent category and subcategory once in while loop
- How to change URL structure for custom post type in wordpress? Custom taxonomy + custom Post name [duplicate]
- List all posts associated under custom taxonomy
- How can I group by Taxonomy on Custom Post Type while filtering out based on custom Meta
- subtracting the current post form then whole loop, which is generating all CPT titles
- How to make “single post” permalink maintain it’s sub-page structure
- Change permalink incrementor into pseudo-subdirectory
- CPT – Custom Text fields point to new url permalinks
- CPT: multiple loops with different terms
- Two and more diffrent custom page type in one permalink
- Adding categories to custom post type in permalink
- hierarchical Custom post type child permalink not found
- Mix Facebook and Twitter feed into custom posts
- Remove CPT Slug with 2 taxonomies and 1 post meta
- WordPress trying to query two custom types to get child from the parent
- Display title of all custom posts from same taxonomy term on a custom post template
- Custom post type and taxonomy same slug
- Change custom post type permalink according to category
- Some permalinks on Apache/localhost development setup return 404’s when set to anything other than plain permalinks
- custom post type single page
- sorting in wp query based on custom field value
- How to create a permalink structure with custom taxonomies and custom post types
- How to build Custom Post Nav Menu inside of the Loop
- How to structure a website with custom post types and custom taxonomies?
- Allow duplicate permalinks slugs for custom posts by different authors
- Issue with Custom Post Types and Permalinks
- Can I show some specific post rather than latest post?
- Loop to display parent categories in custom taxonomy
- Custom taxonomy template for custom fields loop [closed]
- Custom post Query and WordPress Post Query Clash
- Add active class to foundation 6 tabs while looping categories
- get_permalink() of page the enclosing page not posts
- Sort loop by custom field from different post type
- How can i remove post type archive URL?
- Custom post type URL structure with site.com/custom_taxonomy_slug/post_name
- Custom post type loop without children
- How to show terms used only for particular custom post type. Filter creation perpose
- Page as parent for CPT and other pages
- Pagination not working (page/2 retunring 404 page)