Skip Navigation

[Closed] Taxonomy Archive

This support ticket is created 9 years, 6 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 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 -
- - - - - - -

Supporter timezone: Asia/Manila (GMT+08:00)

This topic contains 1 reply, has 2 voices.

Last updated by emerson 9 years, 6 months ago.

Assigned support staff: emerson.


Hi, i simply need to know how to:

Given a taxonomy for Example "/cousine/fish/ " modify the html page without touching php, if possibile.

I just need to insert in the html something like this in the h1 title:

[Fish] Restaurants in Rome


Dear Alessandro,
Yes I think this can be done using jQuery. I assume "/cousine/fish/ " is part of the URL like hidden link. I have tried below and it is working well:
//Get the URL
var str = window.location.pathname;

//Get the second part of the URL
var piece = str.split('/')[2];

//Now prepend this piece of text to the existing H1 of class selector my_h1_class
$(".my_h1_class").prepend('['+piece+'] ');

This is entirely a JS solution , no PHP. Just replace "my_h1_class" with the correct CSS selector for your H1 title. Please let me know how it goes.


The topic ‘[Closed] Taxonomy Archive’ is closed to new replies.