Honza Felt
asked 10 years ago

Hello, guys! I’d like to ask two questions.
1) A visitor goes to a detail of one of the projects in the Projects section. The project has a link in its description that leads to http://www.relocare.cz/#contact (anchor). When the user clicks on that link, the site scrolls down but the lightbox doesn’t disappear. My desired outcome is to have the site scroll to the Contact section and to have the lightbox disappear. Do you have a solution for that?
2) I’d like to rename the section Projects to Services. Do you have an idea how to change it in the URL structure, so it doesn’t say http://www.relocare.cz/projects/insurance but http://www.relocare.cz/services/insurance?
 
Thank you!

1 Answers
Wilfred
answered 10 years ago

Hi Honza,
1. To resolve this issue, please follow my instruction here:
– Open script.js file in /wp-content/themes/dw-page/inc/assets/js/script.js
– Replace the following code ( around line 115)

$('.gotosection').on('click',function(event){

with:

$('body').on('click','.gotosection',function(event){

– Add the following link format to project section.

<a class="gotosection" data-dismiss="modal" href="#contact">Content</a>

2. To change URL, please follow my instruction here:
– Open projects.php file in /wp-content/themes/dw-page/inc/projects.php
– Add the following code to line 39 (screenshot).

'rewrite' => array('slug'=>'services', 'with_front' => false)

Hope this helps!  

Honza Felt
replied 10 years ago

Thank you, gt! It all helped. You are awesome! 🙂

Powered by DW Question & Answer Pro