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
- Display all posts in a custom post type, grouped by a custom taxonomy
- How to remove /blog/ prefix for custom post types in permalinks?
- WordPress Custom Post Type is Matching on Partial Slug
- Change slug of registered custom post type in child theme
- Templates for Custom Post Types and Custom Taxonomies
- Custom permalinks
- Permalink for CPT with taxonomy
- Custom post type permalink changing itself every other change
- Add links to post categories and taxonomies in wysiwyg link modal?
- Retrieving 3 latest post from each of 5 different custom post types
- Removing parent slug from URL on custom post type
- Newer/Older posts links display same posts on every page
- How to solve suspected memory issue in custom WordPress loop?
- Maintaining WP_Query Relation Among CPT, Custom Taxonomy, Permalinks- CPT UI
- Custom post type category, taxonomy and URL rewrite problem
- Rewrite on custom post type permalink not working?
- Custom Post Type: How to display all of same taxonomy?
- Remove POST_TYPE from custom post type permalink
- Remove “-2” from a Toolset Types URL with the same post name
- Problems excluding a custom post-type from the loop
- Custom post types and permalink
- custom post type default permalink
- Custom post types, taxonomies, and permalinks
- How to specify URLS for custom posts & taxonomies
- Custom Post Type not visible on category page
- Custom Post Type Taxonomies -Posts not showing in Category or Tag pages
- Permalinks not working for custom taxonomy on custom post type
- Creating Multiple Loops in Genesis, One Post then 20, each with custom fields
- Loop through Custom Post Type, and then show children within each iteration
- Am unable to reset a query properly
- How to make sure content doesn’t display if selection is empty
- Get next and previous 3 posts in a term in single post page
- Rewrite rules for custom posts types
- Does WordPress consider a post name unique if that same post name is in multiple Post Types?
- Best way to style first post differently?
- Custom post type as home page with custom url
- Posts per row on archive page (custom post type)
- Parent Page and Breadcrumb URL’s for Custom Post Types Not Working
- CPT’s with landing page instead of archive – Url Rewrite?
- Custom Post Type – Duplicate Page Slugs
- WordPress Loop if/else
- Remove permalink for custom post type
- WP Query post__in not returning correct results
- Best way to specify “article type” in URL
- Custon Content within WordPress Loop
- get_post_meta is not working inside shortcode
- Create Array from custom post type to display a slider
- How to have permalink like domain.com/term/postname?
- get_pagination not working on a custom post type query (using WP_Query)
- How to Make infinite loop of post
- Custom post type permalink returns 404 when set to private
- Custom post type slug 404
- How to filter a custom post type by custom taxonomy without 404
- postsperpage value not being applied
- Pagination of custom post type leads to 404 error
- Multiple Loops on a Page Without Duplicates
- Custom permalink structure for remote content pages
- Adding an extra parameter [string] to my posts’ permalink?
- Custom post type hierarchical loop in Homepage
- Custom Post Type nest under a normal WordPress Page
- Custom Post type showing up in loop, regular posts are not showing up
- Loop for custom-post-type comparing taxonomy terms for “related” posts?
- Pagination does not work on Custom Post Type archive while trying to get load more function working
- Last post in loop – custom post types
- Display category name of custom posts only once in the loop
- How to mass get post editor URLs
- Make bootstrap 5.0 carousel dynamic using ACF and CPT UI [closed]
- Error 404 change permalink term custom term taxonomy
- WordPress URL rewrites using Advanced Custom Field
- Preview url not working outside wp-admin
- Pagination Not Working When Used With WP_Query() `offset` Property
- Custom post type defaults to index.php for archive page
- Some posts not displaying by taxonomy term
- 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
- Adding categories to custom post type in permalink
- How to return custom posts in loop?
- 404 custom post type
- Custom post URLs
- custom post type loop
- How can I add a “fake” parent into the permalink?
- Loop with Custom Post Type and Taxonomies
- WordPress Custom Post Type and sort by Tags
- Get post id of permalink for a specific custom post type?
- After rewriting post type’s URL, the number of queries has increased dramatically
- URL Rewrite Adjustment for Custom Post Type causes template to revert to index.php
- If i have custom post type with 5 custom fields do i have to create a new loop to reference each one?
- Add taxonomy to custom post type archive
- Sorting custom post types by taxonomy (So close)
- Looping taxonomy in taxonomy?
- Custom post type – permalink
- Custom Post Type Loop breaking php
- Styling first post using Advanced Custom Fields
- How do I filter a custom post type loop by a field?
- How to add custom permalink struct with DYNAMIC author to a Custom Post Type
- WPNavi pagination links not working on custom pages
- Custom post type Premalinks main page and details page