Tagged: enfold, page links, portfolio grid
-
AuthorPosts
-
October 17, 2016 at 12:44 pm #699924
Hi,
I’ve created a one-page website in Enfold, and added a portfolio grid with 30+ objects. I’ve set that I would like 20 objects to be displayed on the first page, and the remaining on the next pages.
The grid is placed in a Color Section with a Section ID “transactions”.
Under the grid the visitor can click Page 2. When I hold the cursor above the pagenumber I can see that the link is “website”/page/2/
When the page reloads, it brings the visitor all the way back up to the welcome section. They then have to scroll down to the transactions section one more time to see the objects on page 2.I would like page 2 (and later) to link back to the Color Section with the Section ID “transactions”. Something like “website”/#transactions/page/2/
However, I’m unable to find out if it is possible to define this without going into any .php details or similar. I’m just a novice in webdesign.Any ideas from anyone on the forum?
October 18, 2016 at 9:57 am #700525Hi jarlsberg,
Could you post a link to the site in question so that we can take a closer look please?
Regards,
RikardOctober 20, 2016 at 11:47 am #701802Hi.
The site is jarlsbergpartners.no. The direct link to the transactions is http://jarlsbergpartners.no/#transaksjoner
Scroll down on the page. Click page 2, and note that the link http://jarlsbergpartners.no/page/2/ take you back to the top of the page. I want it to take me back to the top of that section.- This reply was modified 8 years ago by jarlsberg.
October 22, 2016 at 12:36 am #702697Hi,
Thank you for the info.
Please add this in the functions.php file.
function add_custom_script(){ ?> <script type="text/javascript"> (function($){ function b() { $('.pagination .inactive').click(function(e) { e.preventDefault(); var news = $('#transaksjoner'), link = $(this).attr('href'), anchor = $(news).attr('id'); if(!news.length) return; var link = link + '#' + anchor; window.location.href = link; }); } b(); })(jQuery); </script> <?php } add_action('wp_footer', 'add_custom_script');
Best regards,
IsmaelOctober 22, 2016 at 11:10 am #702785Thank you. I’m sure that will work. However, I’m unable to check. Because when I added this to functions.php the entire web site disappeared. I have engaged a firm to check out what happened, but updating functions.php from the admin panel was obviously not the correct way to do it. I will let you know how well the function works when we hopefully have recovered the site.
October 23, 2016 at 8:09 am #702919Hi,
Ok, thanks for the feedback. If you want to remove the code you can do so by using FTP software and edit it manually. If you should need any further help from us then please post admin login details in private.
Best regards,
RikardOctober 24, 2016 at 10:13 am #703178Our site is now back up again. It was a spelling error in a comment above the script that ruined functions.php.
For the benefit of others that may read this ticket; the script above works perfect. Both on Windows 10 with Firefox, and Android using Dolphin.
October 25, 2016 at 6:22 am #703572 -
AuthorPosts
- The topic ‘Link to next page when using Portfolio Grid in Enfold one-page website’ is closed to new replies.