Skip to content

Commit

Permalink
Merge pull request #105 from moderntribe/fix/primary-term-trait-errors
Browse files Browse the repository at this point in the history
[FIX] Primary Term Trait
  • Loading branch information
GeoffDusome authored Sep 22, 2023
2 parents d629889 + 46f254b commit 8d10e32
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions wp-content/plugins/core/src/Post_Types/Post/Post.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@
namespace Tribe\Plugin\Post_Types\Post;

use Tribe\Libs\Post_Type\Post_Object;
use Tribe\Plugin\Templates\Traits\Primary_Term;

class Post extends Post_Object {

use Primary_Term;

public const NAME = 'post';

}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function get_primary_term( int $post_id, string $taxonomy ): ?WP_Term {

// RankMath SEO Enabled
if ( $this->has_rank_math() ) {
$primary_term_id = get_post_meta( "rank_math_primary_{$taxonomy}", $post_id );
$primary_term_id = get_post_meta( $post_id, "rank_math_primary_{$taxonomy}", true );
}

// No Yoast fallback
Expand Down

0 comments on commit 8d10e32

Please sign in to comment.