Tagged: enfold, grid, pagination, Portfolio, reload, top of page
-
AuthorPosts
-
September 17, 2015 at 3:44 pm #504909
I am using the portfolio grid to display a range of speakers for an event.
When I click on the the page 2 circle the whole page reloads and I am on the top of the page. I of course would want to stay right were I am in the same color space.
You can find it toward the bottom of the page under presenters
September 17, 2015 at 4:08 pm #504938Hey Frank!
Try adding this to the bottom of your functions.php file.
add_action( 'wp_footer', 'enfold_customization_pagination_anchor' ); function enfold_customization_pagination_anchor() { ?> <script type = "text/javascript"> jQuery(document).ready(function(){ jQuery('.pagination a').each(function(i, e){ var url = jQuery(this).attr('href'); jQuery(this).attr('href', url + "#presenters"); }); }); </script> <?php }
Best regards,
Elliott- This reply was modified 9 years, 2 months ago by Elliott.
September 17, 2015 at 10:06 pm #505153I think I did it wrong and not it won’t let me out.
I couldn’t find a file in the editor that says functions.php, so I tried it in functions-enfold.php
but then got the message:
Parse error: syntax error, unexpected ‘function’ (T_FUNCTION) in /homepages/46/d211396035/htdocs/c2aWP/wp-content/themes/enfold/functions-enfold.php on line 1394So I tried to delete it, but it still gives the same error message and won’t let me do anything else on the site.
this is what the bottom looks like now – I I thought I had it all removed in the same way I added it.
I even tried replacing the bottom section from another enfold installation which was identical, not letting me out without the error message and then I am stuck.
//regenerate style array after saving options page so we can create a new css file that has the actual values and not the ones that were active when the script was called
avia_prepare_dynamic_styles();//generate stylesheet content
$generate_style = new avia_style_generator($avia_superobject,false,false,false);
$styles = $generate_style->create_styles();$created = avia_backend_create_file($stylesheet, $styles, true);
if($created === true)
{
$dir_flag = update_option( ‘avia_stylesheet_dir_writable’.$safe_name, ‘true’ );
$stylesheet_flag = update_option( ‘avia_stylesheet_exists’.$safe_name, ‘true’ );
$dynamic_id = update_option( ‘avia_stylesheet_dynamic_version’.$safe_name, uniqid() );
}
}
}September 17, 2015 at 10:21 pm #505155quick update:
I logged in via FTP and renamed the functions-enfold.php file to functions-enfold_old.php
Then I uploaded another version of the functions-enfold.php file from a different installation I know I updated at the same time and that seems to have fixed it.
I then tried to add your fix to functions.php, but got another error message this time in something like line 539, so I used the same fix as above and I can use the website again.
Maybe I need more coaching on how to add the code you suggested without breaking my site in the meantime. I just used the editor within wordpress.
September 18, 2015 at 4:18 pm #505639Hi!
It should be the functions.php file, not the functions-enfold.php file. It would be best to add it to a child theme. You can download one here, http://kriesi.at/documentation/enfold/downloads/.
Best regards,
ElliottSeptember 24, 2015 at 12:24 pm #508327I have never had to deal with child themes, can you direct me to a good place to start learning about them?
September 24, 2015 at 12:27 pm #508330 -
AuthorPosts
- You must be logged in to reply to this topic.