Skip Navigation

[Resolved] Display View Filter Value in Page Title

This support ticket is created 6 years 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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 3 replies, has 2 voices.

Last updated by Minesh 6 years ago.

Assisted by: Minesh.

Author
Posts
#1170314

I have a view that is filtered by Taxonomy in the URL

so: example.com/my-view?t=my-taxonomy

What I try to do is to hook the_title() to read 'All Posts of [taxonomy by url]'

Any idea how to achieve?

1. I need to hook the_title whenever a specific view is displayed on a page
2. I need to retrieve the Taxonomy by the slug in the URL of the requested page

#1170511

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Well - I need to know where you added the view? to a page or post? and you want to hack the page/post title?

#1170638

I added the View to a Page. So the Page Title needs to be hooked. Thanks for any assistance.

#1170706

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

What if you add string+custom shortcode.

For example - add a custom shortcode [taxonomy-by-url] where you can get the URL param and based that URL param value fetch the terms and return the values:

 'All Posts of'+[taxonomy-by-url] 

More info:
=> https://toolset.com/documentation/adding-custom-code/how-to-create-a-custom-shortcode/