Site logo

Archived topic

The Problem of Anchor Links in WordPress

9 replies · Started by Paul on November 19, 2020

Viewing posts 1–10 of 10

Hi how are you?

Anchor links are used in the table of content sections.
When I click any one from the table of content, it will be more space when moving the corresponding heading?

may I know what problem there? how to fix that?

please check my link from the private information

thanks in advance

hi david,

thanks for your reply and help.

i tried the first option, and it is useful and solved. but i need to add {class="smooth-scroll"}one by one manually.

so,

i think the second option is better way. just add PHP Snippet one time, then can solve all.

I'm sorry that i dont know how to add PHP Snippet because i dont know PHP, can you give me the steps or simple guides here?

Thanks in advance.

No problems.
You will need to keep the Customizer > General > Smooth Scroll Enabled.

Now you have two options:

1. If you're using a Child Theme then paste the PHP Snippet into your Child Themes > functions.php.

2. No Child Theme - then install the Code Snippets plugin and create a new snippet to add the code.

More detail provided here:

https://docs.generatepress.com/article/adding-php/

hi David
thanks for your quick response and helps

I installed GeneratePress free + Generatepress Premium theme,(https://prnt.sc/vm3gpo) it has the Child Theme?

I don't find the Child Theme from Generatepress Theme.

If Generatepress has Child Theme, can you show me the link of Child Theme?

Sorry to send you the troubles

best regards

hi david

thanks for your reply.

i think i dont need child theme. because my website is ready based on the GP Premium (https://generatepress.com/premium/)

when i bought the generate theme, dont talk about the child theme.

If possible, please help me to check my website link from private info, it has child theme?

I'm sorry that I'm not good at this theme checking.

so i can directly install the PHP Snippet plugin and add the PHP.

best regards\

Maybe just install the Code Snippets plugin ?
Its far simpler than messing with Child Themes.

hi david
thanks for all
good day for you

You're welcome

This archived topic is closed to new replies.