[wp-trac] [WordPress Trac] #39129: get_the_terms seems to be broken after upgrading to version 4.7
WordPress Trac
noreply at wordpress.org
Wed Dec 7 00:37:29 UTC 2016
#39129: get_the_terms seems to be broken after upgrading to version 4.7
--------------------------+-----------------------------
Reporter: kuphd1 | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 4.7
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
my code:
{{{#!php
<?php
foreach((get_the_terms($post->ID, 'states')) as $term) {
$state_name = $term->name;
$state_slug = $term->slug;
}
?>
}}}
...returns an "Invalid argument supplied for foreach()" error on the page
linked below. (Scroll down the page to view the error.)
[http://marriages.gmsdevsite.com/who-we-are/local-state-chapters-and-
megs/]
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39129>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list