So I decided to go another way. I now have the Author’s Full Name as terms in the taxonomy. For the index, for which I need to separate Last Name and First Name, I used PHP string functions.
<?php
$taxonomy = 'autores';
$queried_term = get_query_var($taxonomy);
$terms = get_terms($taxonomy, 'slug='.$queried_term);
if ($terms) {
echo '<div id="indiceAutores-nav"></div> <div id="columns"><ul class="indiceAutores" id="indiceAutores">';
foreach($terms as $term) {
$names=explode(' ',$term->name);
$lastname=array_pop($names);
$firstname= $term->name[0];
echo '<li><a href="'.get_term_link($term->slug, $taxonomy).'">'.$lastname .', ' .$firstname .'.</a></li>';
}
echo '</div></ul>';
}
?>
I also added some jQuery plugins for the final iteration:
http://cea.iscte.pt/cadernos/?page_id=80
Related Posts:
- Best way to programmatically remove a category/term from a post
- Attaching Metadata to a Taxonomy Item
- Add custom fields when specific templates are selected
- passing argument to get_template_part() or a better way to code
- How to add upload field in a custom taxonomy?
- Custom Page Template [closed]
- How to save taxonomy term meta?
- Default WordPress taxonomy (Tag) – How to add a custom field to form and save it to the database
- get_posts that match a user-specified value on a page
- get_terms that have custom sticky field checked
- List custom queried terms in the edit-tags.php?taxonomy page
- tax query between operator like
- Display custom widget value in header.php
- Best way to sort estates and query them (for rent? yes/no. contains office space? yes/no)?
- Add a field to just ONE page
- How to set up page fields with gutenberg instead of ACF
- Save Taxonomy of Post via custom Taxonomy Select Dropdown
- How do I update custom field post meta in frontend post template?
- Why can’t I get the correct post permalink
- Term specific featured post on taxonomy archive pages
- WordPress taxonomy child image
- Group pages by custom field values
- RSS Feed in Custom Field
- How to apply Local Business Google Schema dynamically on a Custom Post single template?
- Create taxonomy terms from custom field values
- How to add an ACF only for parent term?
- getting all values for a custom field key (cross-post)
- How to filter post listing (in WP dashboard posts listing) using a custom field (search functionality)?
- Adding Fields to the Category, Tag and Custom Taxonomy Edit Screen in the WordPress Admin?
- How to fix missing custom fields after upgrading to WordPress 4.8.1?
- What is “meta_input” parameter in wp_insert_post() used for?
- Query Posts or Get Posts by custom fields, possible?
- Preserving line breaks when saving and displaying custom fields data
- Saving custom data for each user
- How do I display two separate taxonomy archives for two post types that share a single taxonomy?
- How can I append custom data to images in the editor?
- With WordPress Importer, why can’t I import post meta containing a multi-dimensional array, in which value(s) of that array contain line breaks?
- Custom field when adding new site to multisite networked WordPress
- How do you add a custom option to user data?
- Is there a hook / action that is triggered when adding or removing a post thumbnail?
- Get custom field values into the sidebar/widget?
- Fetch and show multiple custom fields via AJAX
- Filter results with custom field values and dropdown
- Retrieve custom fields on Categories, using WP-API
- Order by custom field date?
- can you set a default value to a custom field
- Multiple custom fields with the same name
- Adding Properties to User Profile and Displaying in List
- use get_posts to get custom field data, but in one array
- automatically set “Featured Image” the same as the og:i that is set in a custom field
- Display value of custom field not working
- WP_query : meta_key with custom rule for specific value
- Execute/Parse Shortcode in Native WordPress Custom Field Value Field
- Displaying Custom Fields on Post with Genesis Child Theme
- Custom fields: In what order are they saved into the DB?
- Metabox image upload and custom field
- How to add a title field in comments?
- Inserting Schema Markup (JSON-LD) Manually with Custom Fields or any Better Ways?
- Assign Taxonomy Based on Custom Field Value
- BuddyPress – Hook to Update Custom Profile Fields [closed]
- How to get the db table row that has the biggest value in the meta value?
- making sense of admin-ajax
- I need template for my custom taxonomy term
- MySQL query to set wp_postmeta using term_taxonomy_id value
- Insert attachment ID in custom field from media uploader
- Add url from Custom Field as ‘Featured Image’. Code not working
- Custom Fields Code not echoing whats in the value field
- Metabox will not save
- Masking Affiliate URL using $post_slug after “/go/”
- Passing Custom Field Data as Array to be Saved (Resulting Custom Field Array is inconsistent)
- load custom fields on click
- How to update a meta field of type array in Gutenberg
- How to wrap meta values seperated by comma in ? [closed]
- Create WordPress shortcode with php code inside
- Bulk remove post meta
- How to create a Custom Meta Box with Name/Value Admin User Input Fields?
- How to Display pages with a Custom Fields in one page
- custom avatar removal
- user Profile meta value as custom field
- Remove Body Classes
- Send email with custom fields after new draft is saved or new post published
- Use WPbakery for own custom field [closed]
- Product Custom Fields with HTML and JS
- Add new image block, set default class name and update it using Javascript
- Add image to menu item with ACF
- Client PDF Upload (Catalogue) – Automatically update link to PDF
- WordPress Doesn’t Generate Taxonomy Archive
- Get posts with same meta value as current post
- Add custom field to all posts in specific post_type
- Change the sort order for posts to include custom field
- Button inside Custom Meta Box triggering the Update Button
- How to load an assets based on custom field value?
- Adding auto-complete to custom gravity field not working
- Add CSS class to posts with certain meta key
- Match submitted array fields with the MYSQL database fields to update them correctly in PHP
- Best way for managing images of ads banners
- Crop custom image size vs actual size
- Multiple permalinks for a single post from custom field
- Search for meta_query does not return any result if combined with title
- Custom fields empty after refreshing page