Skip Navigation

[Resolved] I need to put anchor links in the project category

This support ticket is created 5 years, 2 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
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+01:00)

This topic contains 4 replies, has 2 voices.

Last updated by enricoP 5 years, 2 months ago.

Assisted by: Nigel.

Author
Posts
#1194205
help.png

Tell us what you are trying to do? I'm trying to put an anchor link in the project category to link this label to the relative text.
In the project category (in the backend) i cannot put any link or id (see attached image)

Is there any documentation that you are following? I haven't found anything yet

Is there a similar example that we can see? Just an anchor link

What is the link to your site? hidden link

#1194359

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

Sorry, I'm not quite clear on what you want.

It appears that this is a View to display project posts, with category filters at the top.

If I click the last category "SISTEMI OTT (over the top streaming)" then the page updates to show two matching posts.

So what should the anchor text be in this case?

There is an underlying problem that the results, the two posts, are not initially on the page, they are loaded later by ajax, so the idea of provided an anchor link to either one of those two posts doesn't really make sense, but perhaps I have misunderstood the question.

#1196594

Ok, first thanks for replying, i try to make it easier
I simply need to scroll down the page in order to make the project visible and scrolling after i click to the related project label.
(In the attached img i show what i want to do, see the red arrow which shows the path)
The page i'm talking about is this:
hidden link
if you open the link you'll notice that is difficult to navigate (especially on mobile) because without anchor text you don't see the elements changing.
How can i do this? there is no id i can use to anchor the label to the related text.

Thanks, let me know if you still don't understand what i want to do.

#1196773

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

Screenshot 2019-02-06 at 15.50.14.png

OK, I understand, you need to scroll to the first result from the View.

Looking at the source code of your page, you are already adding custom classes, and I think targeting the first div with class R-box-singolo-progetto would be appropriate.

Views fires custom JS events after ajax pagination and searches, which you can insert in the custom JS section using the front-end events button (screenshot).

This is the code you would actually use for your particular need.

( function( $ ) {
	$( document ).on( 'js_event_wpv_parametric_search_results_updated', function( event, data ) {

      $('html, body').animate({ scrollTop: $(".R-box-singolo-progetto").first().offset().top }, 'fast');

	});
})( jQuery );
#1197076

My issue is resolved now. Thank you!

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