Primary Term for Posts using The SEO Framework in Bricks

Updated on 18 Mar 2024

The SEO Framework is one of the better (coding-wise) SEO plugins.

Like Yoast and Rank Math, it has the option to specify a category or a term as primary when editing posts.

This Pro tutorial provides the steps to output the linked primary term and all other linked terms of the current post (either in single view or in a query loop) separately in Bricks.

Step 1

Let's define a custom function that takes the taxonomy as the first argument and the primary term object's property to retrieve (defaults to name) as the second argument.

Add the following in child theme's functions.php (w/o the opening PHP tag) or a code snippets plugin:

This is a BricksLabs Pro tutorial.

For full access login below or create your BricksLabs Pro account

Instant access to 390+ Bricks code tutorials with BricksLabs Pro