<?php
$categories = get_field('categories');
$elements = array();
foreach($categories as $category) {
//do something
$elements[] = '<a href="' . $url . '" title="' . $title . '">' . $name .'</a>';
}
echo implode(',', $elements);
?>
at the //do something
here you should find what the URL should be for your category/tag
something like get_tag_link() might be of use.
Also have you looked at using the_tags() It does what your after and can be used in the loop.
Related Posts:
- User registration followed by automatic login
- WordPress and event-driven programming – what is it about?
- How WordPress encrypt password? [duplicate]
- wp_insert_user role not working
- Retrieve POST data from AJAX call
- Adding a custom image upload size and making it selected by default?
- How to paginate a list of custom taxonomy terms?
- Conditionally loading JavaScript based on the Advanced Custom Fields in the post
- reason of splitting theme files to multiple files
- Limit the Excerpt field in WP-Admin in words
- Style every second widget?
- Does WordPress need the eval function?
- wp_mail not sending
- PHP Date display as time ago
- Set WordPress Default Template
- stats_get_csv (WordPress Stats) to only display top posts (not pages)
- Pass get_option value to an array [closed]
- Strip characters, Including spaces, for tel: link
- Can’t get page content in WordPress
- How to iterate within Magic Fields Group foreach loop? [closed]
- how could I load a different template part by page
- Notice : add_theme_support( ‘post-formats’ ) was called incorrectly [closed]
- How to call plugin function per site in a multisite?
- PHP, Creating a dynamic variable
- How to Internationalize WordPress – Extract strings with textdomains, per textdomain individually
- How to make own crop image function for WordPress plugin
- Auto 301 to full post permalink? (using : /archive/%post_id% to %post_name% )
- need help with existing code showing subpages
- Showing latest post without 301 redirect
- Display custom field on 404 page outside loop
- 2nd page displaying the exact same posts as my first page (minus the very first post)
- Pagination broken on is_front_page()
- Timthumb.php image gallery not working on Multisite WordPress
- Why doesn’t PhotoSmash plugin play well with wp_query?
- Use get() method to grab all categories and output inside another method
- get_the_ID() doesnt work
- Integrating Yii2 and WordPress
- PHP E_WARNING being shown despite php.ini [closed]
- After disabling WPML multi currency, the currency is still handled by the WPML
- preg_replace on all HTML content in WordPress
- How do I check if there is a tag in the title
- GravityForms Limit Submission Per Time Period by User or IP by 30 minutes?
- Post class only applying to first excerpt; why?
- WordPress Rewrite Rule
- PHP Warning: preg_match() expects & PHP Warning: strip_tags()
- Limit the number of child pages
- Programmatically revert to backup .htaccess a possibility?
- Prevent post from being published and show error
- how to get wordpress page url php code [duplicate]
- How to show upcoming events according to start date field
- Some problems in custom widget
- Problems updating nested ACF field groups
- how to pull all usernames from a custom user role, then do some array modification
- Can I ‘order by’ date that is in a text field?
- Show related products by attribute based and certain conditions
- Unable to delete related media attachments with deleted post
- How to retrieve taxonomy Metabox fields in frontend
- separate list of programs in html/javascript coming from php
- Is there a PHP function that will return the block ID generated by WordPress?
- retrieve “Link Color” value
- Creating a Function and Call It
- How to count active users on a specific page
- WooCommerce display price before add to cart [closed]
- How to print all the inline styles in the WP_Styles instance together with their keys?
- Adding column to wpex_users
- Issues adding Recaptcha v3 to WordPress Registration
- WordPress ajax filter returning all posts when it should be filtering by category
- WooCommerce Quantity in Dropdown menu instead of clasic [closed]
- Trying To Call a Dynamic Email Address
- How to override html codes in wordpress?
- Hide comment notification number and buttons in wp backend
- Create html tree sitemap
- meta field for numerous links
- Custom HTML form using PHP – help with ajax/username validation
- Plugin Modification Change Functionality For Logged User Only
- Where can I find the declaration of `$_wp_theme_features`?
- redirect 301 with special character like WIX site “#!”
- How I can add div to menu?
- Display tab title as ‘blog tagline | blog title’
- Conditional statement within WP SQL query
- Modify category archive page loop on functions.php
- How to print redirected query string variables to the page?
- How to display html code on homepage
- two wordpress sites, two themes, one database, same content
- Multiple URL from Custom post name
- Admin-area broken through weird issues
- Display a query with multiple post types and same relationship on a single page
- Check if values exists DB
- Trying to exclude posts from a category on the home page
- Get string from array and start loop [closed]
- Custom query_posts() parameter
- wp_link_pages return value even when is condition inside if statement
- How to quickly/easily make an analysis (reverse engineering) of WordPress?
- New to wordpress. Need Help with templates [closed]
- Issues trying to add a href statment with PHP into a PHP Echo Statement [closed]
- Help with if/else loop [closed]
- Add multiple HTML attributes to an Elementor button
- Customize the summary table of an order in the email
- How to put a class in the p tag automatically added by the_content() in the wordpress loop?
- How to sort custom sortable column by custom table value