Skip Navigation

[Resolved] How to display custom content at the top of each taxonomy category

This support ticket is created 5 years, 7 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

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)

Author
Posts
#1237437
IMG 1 - displaying content in taxonomy page.png

Hi, I was wondering how I can display custom content at the top of each Taxonomy (Product Category) page? For example, I attached a screenshot in this message (IMG 1 screenshot) that shows the posts displayed for the product category "Apparel". For that category, you will notice the list of suppliers who have apparel-type products (so on my site, I have "Suppliers" as post-types and I have "Product Categories" as the taxonomy). You can click on this link to take you to the page I am referring to: hidden link

1.) On the top of that page, I would like it to display the specific category Title of the page the user is on. So in this case, I would like to show the word "Apparel". That way the user can see the specific page they are on just by looking at the top of that page.

2.) Also...below the Title, I would like to type up some content about that specific category. To be more specific, I would like to imbed the "google trends" HTML code for that category (see example: hidden link) if that makes sense. I would like to do this for each category listed on the left sidebar that you see in the screenshot.

So I'm not sure if I would have to create another Toolset Types for "Google Trends" or if I would have to create a Taxonomy or if I would need to do something in Views or what. Any help is appreciated.

Thanks,
James

#1237479

Hello,

I suggest you try to create Views WordPress Archive for taxonomy "product-category", see our document:
https://toolset.com/documentation/getting-started-with-toolset/customize-post-archives/designing-an-archive-without-any-page-builder/
Then customize above wordpress archive to what you want.

And you can display the archive page title with shortcode [wpv-archive-title]:
https://toolset.com/documentation/user-guides/views-shortcodes/#vf-295335
This shortcode displays the title of the WordPress archive page.

#1237981

I've been working on it all day and it's not doing what I need. I guess I'm confused on what else needs to be setup. In other words, do I need to create a Post Type for "Google Trends"? Because the only Post Type I had now is titled "Suppliers". Then I had "Product Categories" as the Taxonomy for that post type. So I have a list of Suppliers that will show for whichever product category I click on. So if I clicked on the category "Apparel", on the very top of that page, I would like to display the Google Trends results for "Apparel" if that makes sense.

Thanks,
James

#1238145

Minesh
Supporter

Languages: English (English )

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

Luo is on holiday. This is Minesh here and I'll take care of this ticket. Hope this is OK.

Well - when you say google trends results you would like to display at top of the page and you shared the following link:
=> hidden link

I see there are different widgets available and you can generate for example as given under:

<script type="text/javascript" src="<em><u>hidden link</u></em>"></script> <script type="text/javascript"> trends.embed.renderExploreWidget("GEO_MAP", {"comparisonItem":[{"keyword":"apparel","geo":"US","time":"today 12-m"}],"category":0,"property":""}, {"exploreQuery":"q=apparel&geo=US&date=today 12-m","guestPath":"<em><u>hidden link</u></em>"}); </script> 

May be you should try to replace "apparel" with your dynamic selected taxonomy term name with "keyword" and "q" param values available with the above JS code.

Above script is used to display the widget "Interest by subregion" but the thing is that there is no feature available with Toolset to display such widget or make it dynamic as per your selected taxonomy term.

To add such custom JS scripts may need custom programming that is beyond the scope of our support policy.

Please feel free to contact our certified partners for any of your such custom programming need. They would be happy to assist you further:
=> https://toolset.com/contractors/

I also review your page : hidden link

And I also noticed that you have not followed the guidelines given by the Luo as it seems normal archive page and not created with views.
=> https://toolset.com/forums/topic/how-to-display-custom-content-at-the-top-of-each-taxonomy-category/#post-1237479

Please let me know if I misunderstood anything here or you need any help related to any query that should be within the scope of Toolset Support policy. I would be happy to assist you.

#1238294
IMG 2 - product category custom term field.png
IMG 1 - custom term field.png

Hi, thanks for your message. Sorry I am kinda new to this and to css/html, etc. As I was messing with it last night, this is what I did:

1.) See IMG 1 screenshot - I created a custom term field and added the WYSIWYG field for the 3 sections I would like to display under the taxonomy "Product Category" (1. Interest Over Time | 2. Interest by Subregion | 3. Related Queries).

2.) See IMG 2 screenshot - Then I plugged in those codes in each section but for some reason, it's not displaying the content on the front-end. So then I just tried adding random content without an codes, and it's still not displaying it. Is there a way to display content that I put in there under each taxonomy "product category"?

Thanks,
James

#1238480

Minesh
Supporter

Languages: English (English )

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

Well - can you please share access details and problem URL so I can check what's going wrong with your setup.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I would additionally need your permission to de- and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important. If you agree to this, please use the form fields I have enabled below to provide temporary access details (wp-admin and FTP).

I have set the next reply to private which means only you and I have access to it.