You’re trying to build the permalinks yourself? That looks really tricky and fragile.
Also, you’re getting a little confused trying to deal with the $loop
WP_Query object. When you call $loop->the_post();
, what you’re doing is populating the global variable $post with the next post in the $loop query object. So everywhere that you’re iterating over $loop->post
, you could actually just write $post
.
So, for example, replace this code:
<a href="' . get_bloginfo('url') . '/colecao/' . $loop->post->post_name . '"
with something that uses WordPress’s permalink functions, like
<a href="' . get_permalink( $post->ID ) . '"
Related Posts:
- How to show a hierarchical terms list?
- How to add a default item to a custom taxonomy?
- Why does get_term() require taxonomy? Are term_ids not unique?
- Automatically Assign Parent Terms When A Child Term is Selected
- get term by id without taxonomy
- Taxonomy terms sort by… Last name!
- WordPress – Creating multiple versions of the same single-customtype.php depending on selected taxonomy categories
- Exclude custom taxonomy from search results and archive pages
- check if tag exists in wp database
- How to update taxonomy custom field with wp_update_term()?
- Add Thumbnail to wp_list_categories()
- Display Post by taxonomy and taxonomy child
- Fatal error: Call to undefined method stdClass::filter() in wp-includes\taxonomy.php on line 805
- WP native tag suggest metabox. How does it process tag id?
- Change order of WordPress tag cloud
- Count posts for each taxonomy term for each month
- Let users create a new custom taxonomy entry from frontend (without creating a post)
- How to use a Term Meta Field as a link
- Embed YouTube video on category description
- Manually query posts by taxonomy with MySQL
- Custom Taxonomy leads to 404 page
- WordPress built-in method to extract array of term IDs?
- Convert Custom Post Types to Custom Taxonomies
- How do I query a taxonomy term range
- How to Retrieve a Taxonomy Term’s ID?
- get_terms problem : related articles
- WordPress User Taxonomy Saved Values
- Display Taxonomy Description on edit-tags screen?
- Order custom Taxomony alphabetically and reversal after clicking a button?
- Set multiple Post Terms in same Taxonomy
- WordPress Customizer – pass setting value into another control to live update drop-down choices
- custom post type and taxonomy url rewrite without tax-name
- Attaching taxonomy data to taxonomy with wp_insert_post
- Show child terms of current term of the taxonomy
- Problem with orderby
- Display specific taxonomy
- Taxonomy archive + query attachments = duplicate results
- Exclude posts which have any term in a certain taxonomy from the query
- add upload image to default taxonomy
- How to get custom field value in frontend for taxonomy
- Comma separated tax terms, with “and” before last item [duplicate]
- How to add and display a taxonomy term image in any template? (Taxonomy Images)
- Get Link to Feed On Term or Taxonomy
- Syntax help needed: Taxonomy Query
- How to make tags show up in search results?
- Expired event redirect to parent category
- Different permissions for same type of post
- custom taxonomy terms archive page
- How to get my register taxonomy
- How can I completely hide a taxonomy term from “frontend”? [closed]
- How to display taxonomy term custom meta (using wp_get_object_terms?)?
- SQL query joining on taxonomy tables not returning what I would expect
- How to get if child category of this category is empty?
- List sub-taxonomies from current taxonomy
- Retrieve list of taxonomies in json
- Adding inline help to category/taxonomy checkboxes in admin sidebar
- Match and Merge Terms in Different Taxonomies
- Automatically show ‘taxonomy’ meta box by default in Appearance > Menus?
- Can you have seperate sidebars for multiple taxonomy archives?
- Display check marked taxonomies as drop down menu
- Retrieve all term IDs of post
- Return single taxonomy term outside the loop
- How to embed the Taxonomy Admin screen in to a Tab of a Settings Page in a plugin
- update_term_meta not working
- Getting more info about the taxonomy?
- how can send a parameter by click on gender-link to filter a post by gender and product taxo
- How to make HTML select options searchable
- How to show taxonomy on front page
- Why doesn’t ‘post__not_in’ work with ‘cat’?
- How best to add Author or Artist to product
- How Do I Register Two Taxonomies with one Parent of the Other?
- I want to change the slugs of my terms dynamically
- taxonomy_edit_form_fields output after term fields
- Make/create a category for every page
- All tag/category/custom taxonomy archives 404
- Get a specific category in multiple categories
- Create multidimensional array of taxonomies
- how to display taxonomy name in do shorcode php tag
- $product->ID in has_term() not working, but manually inputting the ID works, why?
- Can I have have terms with the same slug in the same taxonomy?
- how do you get one specific term from a shortcode attribute?
- Fatal error Call to a member function filter()
- Using is_tax with multiple taxonomies
- Taxonomy pages, stop them indexing or being generated?
- Categorizing posts by location
- Pages throwing 404 error on server load
- Display yesterday’s last post’s Custom field from Unique terms of one Taxonomies
- Apply custom taxonomy archive template to children
- How can I create gallery of products and submit data for each product?
- Why does my taxonomy code display the first alphabetical term?
- Custom Taxonomy link out the loop
- Why can’t I exclude a term ID from either get_terms or WP_Term_query?
- get_term_link doesn’t work
- IF taxonomy archive is hierarchical THEN
- What is the ‘selected’ parameter in wp_dropdown_categories() for?
- Taxonomy works in local XAMPP but doesn’t work live
- Append taxonomy url
- get_terms of specific parent (including the parent itself)
- Hiding a tag from display
- taxonomy change to post/page type