Try this with or without the return.
$object_terms = wp_get_object_terms($GLOBALS['post']->ID, 'staff', array('fields' => 'all'));
if ($object_terms) {
echo '<p>' . '' . '' ;
$res="";
foreach ($object_terms as $term) {
$res .= '<a href="' . esc_attr(get_term_link($term, $taxonomy)) . '" title="' . sprintf(__("View artiles of: %s"), $term->name) . '" ' . '>' . $term->name . '</a>, ';
}
echo rtrim($res,' ,').' ' . '</p>';
}
Related Posts:
- display most popular tags in two columns
- dynamic sidebar not showing anything
- WordPress widget/sidebar dividers?
- Missing sidebar parameter “fix” – before_content
- Dynamic Sidebars & Echo
- How to determine if the sidebar is empty? Or not active?
- random reason on refresh
- Add a select-option to the default widgets
- Stuck with sidebar registering
- Don’t display a sidebar widget when on a specific page
- Retrieve the whole widget sidebar and pass it inside an html
- Loading Widgets Via Child Theme
- How can the searchform.php know if it’s used on a registered sidebar id ‘sidebar-1’ or ‘sidebar-2’?
- How to list categories by page id in wordpress
- My custom widget won’t stay in the widget area after I refresh the widget page
- Create Image Uploader for Widget
- Displaying a variable stored in functions.php inside widget
- Check if widget has content
- Copyright info change in Theme Child PHP
- Add footer.php to WordPress child theme
- I want to remove the links from the term list returned by get_the_term_list
- List authors with posts in a category
- How to add Shortcode (font awesome) in widget title?
- Can I view my own wordpress php source code on my hosted web server?
- Count widgets of a certain type
- javaScript in section of WP API
- Styling images coming from another blog
- Style every second widget?
- How to group 2 radio buttons in a widget?
- Add before_content and after_content to register_sidebar
- PHP Deprecated: WP_RSSjb has a deprecated constructor
- How to display php source code inside a post using visual editor?
- Missing argument 3 for wp_register_sidebar_widget()
- The custom logo, site title, and description doesn’t appear at the same time
- custom widget on the footer
- How to show a dynamic_sidebar if main content content’s height is > a set amount?
- stats_get_csv (WordPress Stats) to only display top posts (not pages)
- How to create a linked tag list in my sidebar
- How to get the POST TITLE using the POST ID?
- How to add just one specific page to widget without plugin?
- WordPress Shortcodes.. printf is outputting a random number… Can’t figure out WHY?
- Why my image upload button is not working in wordpress widget area?
- Insert custom PHP head above in WP pages
- How to do a code in php and have text before it? [closed]
- if statement with is_active_sidebar()
- How to make widget title accept php?
- Widget back end radio button issue
- Creating a blog on my companies new website using WordPress but I have sidebar issues
- How to remove sidebar primary widget on Mobile on category page [closed]
- WordPress widget and customize.php not working in Ubuntu16.04 VPS
- Correctly Using checked function of WordPress
- How to get post category list as select in front-end?
- Simple php in wordpress widget [closed]
- using wp enqueue style to create a CSS file specifically for a page template
- Accidentally deleted php code in WordPress website [closed]
- Show different website layout if no sidebar added
- Insert PHP code in Text
- Some problems in custom widget
- Woocommerce display orders with products from specific categories to specific admins
- Woocommerce template file outputting tags
- Copying and pasting to WordPress “code editor” code via the front end and clipboard
- How to use wp_get_attachment_image or wp_get_attachment_image_src instead of $instance[‘single_feature_image_uri’]
- Current WordPress Page Title as Search Parameter into A Tag
- How to put 2 php codes in functions.php without site crashing
- Add widget area from visual editor
- Displaying SQL query result from user input via wpdb
- Priority call methods – PHPMailer->addAddress(NULL)
- Blog Image and Title in Right Sidebar
- admin-ajax.php 400 bad request – whats wrong with my code?
- is_user_logged_in() not working in homepage
- Dynamic_sidebar load in string makeup
- Customizing the output of the archive and category widget without altering the original behavior of the widget
- Featured Products not showing up in “Featured” area of homepage
- (Who to follow) Twitter widget
- What image is this pulling?
- Widget Logic – display on page and all child
- Add disclaimer before certain posts and pages
- Adding a sidebar to wp-login.php
- Are WordPress widgets cached?
- widget: input the px value from user and use it as inline style in widget function
- Update title of every instance of widget using text field
- Are widget arguments always set inside My_Widget::widget()?
- WP_Widget dynamic field array with external AJAX
- WordPress – registering sidebar and adding a button directly after .textwidget
- Blog only showing code
- Template from scratch: Sidebars not showing widget
- Name Input from widget displays Sidebar name instead of saved data
- WordPress – show number of comments for each post in widget
- key( $GLOBALS[‘wp_registered_sidebars’] ) is always showing the same value
- why is markup routinely placed in functions in wordpress?
- How to change links in the 3 main categories, on widget category, to a javascript function call
- PHP Widget and do_shortcode
- How to define template directory in this widget code
- Open all external links in new window – need help with the code
- WP Debug enabled Undefined index error in a widget
- Where to put include php file?
- Can you not edit the HTML and PHP of your WordPress without paying?
- how to check elementor is widget is active or loaded
- How to edit a widget code?
- Sidebars panel in customizer