Skip Navigation

[Resolved] Displaying current Category Name and going to a specific Category via URL

This support ticket is created 4 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.

Our next available supporter will start replying to tickets in about 6.41 hours from now. 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
#1390693

Hi There! I'm trying to add a title next to the frontend dropdown filter to display the currently selected category name.

The other thing I'm trying to accomplish is the ability to add different links to the page that will display this View where each one will select different categories via the URL.
So the page is going to be, for example, mysite.com/news, and I'd love to be able to add links to specific categories with a URL such as mysite.com/news#lateststories or mysite.com/news#factsheets

Do you know if either of these functions are possible?

The view I'm working on can be seen at: hidden link

Thank you so much!

#1391049

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

Its still not clear from your request what exactly you want to achieve.

Do you mean that, with the following link: hidden link
- if you select the option "News Mentions", just besides the dropdown select you want to display the text News Mentions"?

#1391075

Hi Minesh,
Yes, that's exactly what I'm trying to do.

And the other thing I'm trying to do is create links to the page that would automatically select a certain category to be displayed.

Thanks for your help!

#1391089

Minesh
Supporter

Languages: English (English )

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

Do you mean that, with the following link: hidden link
- if you select the option "News Mentions", just besides the dropdown select you want to display the text News Mentions"?
Yes, that's exactly what I'm trying to do.
==>
Ok - there is no such feature available to display the selected text but maybe you can add the custom JS code to your view's JS box.

The following link may help you:
=> https://stackoverflow.com/questions/11179406/jquery-get-value-of-select-onchange
=> https://stackoverflow.com/questions/12750307/jquery-select-change-event-get-selected-option/12750327

And the other thing I'm trying to do is create links to the page that would automatically select a certain category to be displayed.
=>
Do you mean that you want to display the selected option "News Mentions" as link - means, you want to display the taxonomy archive for the selected term?

#1391099

Thanks for your help, I'll look into the provided links.

And to clarify, I'd like to add links to my menu that will lead to the page where I'm displaying this View, and I'd like those links to also select what Category is being displayed in the view (a link for New Mentions, a link for Latest Stories, etc.).
If I just add a link to the Post Category Archive, they won't see the other content I'm going to add to the page the view will be displayed in and won't be able to change the selected category without leaving the page.

I appreciate it!
- Luigi

#1391141

Minesh
Supporter

Languages: English (English )

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

And to clarify, I'd like to add links to my menu that will lead to the page where I'm displaying this View, and I'd like those links to also select what Category is being displayed in the view (a link for New Mentions, a link for Latest Stories, etc.).
==>
As I understand, you want to add links to menu where if you select the menu link "New Mentions", it should automatically select the "New Mentions" option from select dropdown and display the filtered results - correct? If yes:
- again, sorry to say, there is no such option. Maybe it will be easier for you if you set you view to filter with URL param.

For example:
You should contruct your menu links with URL param for each category, for example:
- hidden link

#1391153

That's it!
The URL Parameter ?wpv-category= followed by the slug does exactly what I was hoping to do.

My issue is resolved now. Thank you!

This ticket is now closed. If you're a Toolset client and need related help, please open a new support ticket.