0

I am using a WordPress theme called "business one page" and it has a slider with Learn-more button. Here is a demo of the theme Business-One-Page

I am using a child theme and I want to change the permalink of the button by inserting code into the functions.php file. First, I tried to locate the slider code inside the home-page-template then I have opened all files and search for the btn(class="btn-more") without any results. I have found the .php file for all sections and pages except the slider. Is it possible that some parts of the code are not included?

Is it possible to edit the permalink with coding? or do I have to create another button myself?

I just wanted to change the permalink so it would not link to another page, instead link to content on the same page using (#content).

Thanks

1 Answer 1

0

I recommend creating a child theme first so you can update later. Further, you can edit /wp-content/themes/business-one-page/inc/extras.php at line # 149 and replace with below code.

<a class="btn-more" href="#content"><?php echo esc_html( $slider_readmore );?></a>
5
  • Thank you, I am using a Child theme and I tried to use your method. I made a inc folder in the child theme directory, copied the extras.php file there. and made the change but nothing happens, it seems like Wordpress is not using the child theme file.
    – davidhlyns
    Aug 21, 2019 at 8:45
  • Right. I suggest then you can do changes in parent theme and make sure that when you update theme later then make those changes again. Aug 21, 2019 at 8:49
  • okey thank you, but the copying the extras.php should work right ?
    – davidhlyns
    Aug 21, 2019 at 8:56
  • You need to replace the above code in the parent theme and it should work. Aug 21, 2019 at 9:04
  • Yes it works, I was just thinking that doing this in the child theme should work, strange it is not working. But thanks a lot for the help.
    – davidhlyns
    Aug 21, 2019 at 9:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.