Skip Navigation

[Resolved] Taxonomy Filter View – Want to display Taxonomy Term as Page Title

This support ticket is created 4 years, 3 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

Tagged: 

This topic contains 2 replies, has 2 voices.

Last updated by lalK 4 years, 3 months ago.

Assisted by: Shane.

Author
Posts
#1760143

Tell us what you are trying to do? I created a Taxonomy Filter View and want to use the term as the page title.

Is there any documentation that you are following? https://toolset.com/forums/topic/obtain-taxonomy-terms-name-and-description-for-custom-archive-display/

I've tried using the shortcode wpv-taxonomy-title in the loop (nand elsewhere) but nothing shows.

What is the link to your site? Problem can be seen at hidden link

#1760471

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Lal,

Thank you for getting in touch.

You can actually use this [wpv-search-term] shortcode to get the Taxonomy that was searched for.
https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#wpv-search-term

In your case you will write it out like this.
[wpv-search-term param='wpvpathway']

If you want to replace the title entirely you can use the filter hook below.
https://codex.wordpress.org/Plugin_API/Filter_Reference/the_title

This will allow you to hook into the default title and change it based on the URL parameter, an example would be.


function modify_title( $title, $id = null ) {

    if ( !empty($_GET['wpvpathway']) ) {
        $new_title = $_GET['wpvpathway'];
        return ucfirst($new_title);
    }

    return $title;
}
add_filter( 'the_title', 'modify_title', 10, 2 );

Please let me know if this helps.
Thanks,
Shane

#1760499

Bullseye! Got it in one. Thanks.
My issue is resolved now.