@Rutwick’s answer was what I thought when I read the title, but I think you’re just wanting to use get_the_terms()
which can be out of the loop like this:
$my_post_terms = get_the_terms( $post->ID, 'show' );
if( $my_post_terms && !is_wp_error( $my_post_terms ) ) {
// do something here with $my_post_terms array
}
Related Posts:
- Most elegant way to enqueue scripts in function.php with foreach loop
- WordPress Ajax filter: Create two loops for different output styles?
- Prevent function from triggering on current page
- Only seems to be displaying one child when there are supposed to be multiple
- Remove Actions/Filters added via Anonymous Functions
- Apply class to every paragraph that holds image?
- Add class to menu items of one specific menu (nav_menu_css_class)
- How to influence the information displayed on widget inside wp-admin
- Set media upload attachment link to none and hide it in WP v3.5
- Filter the query ONLY for the search results page
- opening links in new tab using – add_filter( ‘the_content’, ‘make_clickable’);
- Using add_filter() in Widgets
- Build a content and excerpt grid loop with paging and options for # of posts
- Customize WordPress Media Manager – Media Window
- Is it possible to use a forgot password url filter?
- Wrap gutenberg block ‘div’ in other elements/extra HTML
- Check if page parent has certain template
- Remove Page Title from Static Frontpage
- Default or Preset Content for Custom Post Types
- Override a class function to include a custom template
- Adding WooCommerce to a Custom Theme – not working [closed]
- Why do filters/actions require an argument count?
- How to use IF Statement in WordPress?
- Gravity Forms field entries into wp_query loop [closed]
- Post Pagination Showing Same Posts Every Page
- modify a function filter
- How would go about if I just want a temporary function?
- Generating rel=prev and rel=next only on wordpress categories
- How to make applyFilters function return false via functions.php
- How to use return in my custom function instead of echo
- Accepted arguments value in hook functions
- Get current page_id before loop, in functions.php
- How to speed up a wordpress function with multiple loops?
- Which action hook to use for function?
- str_replace function in theme
- add_query_arg not working
- Get first URL from post content
- Handling Body class based on Template
- Add a class to the anchor tag on HTML5 gallery
- Modify a function without editing template
- How to add nav menu items to a specific position within a menu
- Disable auto-resizing of uploaded images, but only for certain filename
- How to control WordPress image metadata (using Imagick)?
- Filter out other users comments. Visualize only own comments and editor role users’ comments
- Removing “wpautop” (auto tags) only on certain pages?
- Add to cart php not working [closed]
- get author_name from queried post
- Is possible add icon in title posts only in specific tag?
- WordPress Gravatar filter is removing my custom attributes
- create filter in functions.php
- Insert image in WordPress with HTML5 tag and caption function
- How to construct function for applying filter?
- Adding an external HTML link to a post thumbnail
- woocommerce change currency per category [closed]
- How can this crude function be improved?
- Redirect to another page using contact form 7? [closed]
- Make wp_link_pages() suitable for Twitter Bootstrap markup
- Setting a default text for excerpts of a particular category
- Add_filter when value is no variable?
- The Loop not looping?
- (Woocommerce) Order by price when entering specific category
- Filtering a function’ output for a new continued function
- How to edit classes in body tag?
- Deleting Certain terms from appearing on the front end as links
- Possible to hook into Media Library preview File column and use a custom image?
- Add meta tags to a custom header
- How to display the_archive_title() and the_archive_description() – “weird” interaction
- Custom query vars filters problem with pagination
- Genesis Framework: How to exclude a specific author from archive custom loop
- Get the name of menu item with wp_nav_menu
- How to edit/replace Parent functions.php function in Child Theme to add “Walker” class
- Functions Filter Question [closed]
- Insert Content Before div#main from the functions.php File
- How to add aria role and schema markup to custom walker container
- Must filter functions receive all arguments passed to them?
- Strip from or something better?
- Changing the text of Upload/Insert on Posts and Pages Screen
- Conditional custom menu?
- Get URLs for AJAX Filter Checkboxes WordPress
- User filter posts by year
- Adding custom social icons to the social media icon block in the Gutenberg editor?
- Filter works on last selection but no others
- post value to function with Ajax and jQuery
- cURL needing to loop through all “next_page”
- Assign IDs to headings in ACF using functions.php
- How can I get my pagination loop to display the correct number of total pages?
- Redirect specific author posts to another url
- How fix error in the WordPress loop?
- Best way to add image to recent posts widget?
- previous_post_link inside of a function?
- Search and Replace Script Loader in Head Only Works in Footer
- Integrate WP Tiles into existing loop (index.php) and theme
- Check if excerpt is empty at loop-portfolio
- How to Add A Rel Filter to All Links?
- Pagenav Not appearing on custom Template
- child_of not working while searching
- How do I filter a custom post type loop by a field?
- For each loop will not append to the_content hook
- Assign new post author IF another user in custom field on post transition
- function to show youtube videos within excerpt – if condition and apply_filters