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
- If has $title in widgets
- Insert custom PHP head above in WP pages
- Archives shortcode displaying above widget title
- Widgets in the loop if active
- Log in / Log Out Custom Button
- Show latest posts in a plain HTML website custom widget [closed]
- 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?
- PHP nested If statement syntax
- Is it bad to add html to a widget by closing and reopening the php tags?
- Display Data in Table from External Database in WP using Shortcodes
- Widget back end radio button issue
- Sidebar not appearing in footer, but it appears everywhere else!
- Hook called before text widget save
- Styling the second sidebar
- Creating a blog on my companies new website using WordPress but I have sidebar issues
- How to Configure Events List in WordPress to Disappear Event Once Date is Past
- How to remove sidebar primary widget on Mobile on category page [closed]
- Code snippet to show current php version inside “At a Glance” box in admin
- Widgets not showing on custom theme
- My website is not showing Footer section
- Fatal error: Uncaught Error: Call to undefined function get_header() [closed]
- WordPress widget and customize.php not working in Ubuntu16.04 VPS
- Correctly Using checked function of WordPress
- How can I display Custom Post type Custom Columns and its Content in a Dashboard Widget?
- Removing sidebar on category pages
- 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
- How to use title attributes in sidebar widget?
- Output column number according to active sidebars
- Accidentally deleted php code in WordPress website [closed]
- Show different website layout if no sidebar added
- display specific widget to a page
- Why the dynamic_sidebar() call is putted into an ul tag?
- Dynamically display font icons in widget
- Correct code to use php in text widget
- Display Custom Field in Sidebar if Value is Present
- Insert PHP code in Text
- PHP code snippet to remove microdata
- Some problems in custom widget
- WordPress 6.0 class-wp-widget.php fatal errors in PHP 8.1.6
- Counting number of posts in multiple (sub)categories using shortcode
- Need help for some PHP code
- How do you create a custom category widget that you can style?
- How a HTML form can trigger a PHP function?
- 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 preload header logo image in WordPress? like what’s the code and where do I put it?
- How to use wp_get_attachment_image or wp_get_attachment_image_src instead of $instance[‘single_feature_image_uri’]
- How to stop hiding buttons forward / backward in pagination?
- Inserting a class on before_widget if checkbox is checked
- Current WordPress Page Title as Search Parameter into A Tag
- How to create a widget with a populated dropdown?
- How to put 2 php codes in functions.php without site crashing
- Force Sidebar on Full Width page
- dashboard widget form not submit mails
- Add widget area from visual editor
- Displaying SQL query result from user input via wpdb
- Display child-page links in sidebar on both Parent Pages AND Child Pages
- How to make a “page-option” in WordPress
- Priority call methods – PHPMailer->addAddress(NULL)
- I need to edit a widget, with no dashboard access
- 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
- missing admin bar and widget in a template
- 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
- style.min.css code issue
- (Who to follow) Twitter widget
- My own theme’s custom widget areas are not working
- What image is this pulling?
- Widget Logic – display on page and all child
- Add disclaimer before certain posts and pages
- Widget Update problems using a for loop
- Beyond widget side menu editing, with the php page, custom template
- PHP: Why does my code work in index.php but not a widget?
- Adding a sidebar to wp-login.php
- Non-static method error when trying to use class in widgets
- Are WordPress widgets cached?
- Widget edit and add in any page