thelyall
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce] How to edit [terms] shortcode link text?Ok, I’ve found what I need to change is the $terms_link in line 906 of wc-template-functions.php but I don’t know how to do this with a hook, as I can’t override files in the /includes folder from my child theme.
Forum: Plugins
In reply to: [WooCommerce] How to edit [terms] shortcode link text?Any ideas on this? I really need to change it.
Forum: Fixing WordPress
In reply to: How to edit [terms] shortcode link text?Ah sorry – I’ll move it. Thanks
Forum: Plugins
In reply to: [Easy Lite Preloader] Issues with choosing specific pagesHi Jerome,
Thanks for getting back to me. We actually decided not to use a preloader in the end (not because of this issue) but we might look at adding one again once the wp-login page is an option. It’s more of a ‘nice to have’ rather than a requirement so we’re going without for now. The issue could have been site specific as it’s quite a complex site, and I haven’t tried it on any others yet.
Thanks again,
LyallForum: Plugins
In reply to: [WooCommerce] update to 3.7 broke cart and checkout on the same page – Part 2@jorgecorreia I was wondering about that. Would be nice to have a solution to a very expensive problem instead of just deleting the comments and closing the thread.
I won’t say ‘me too’ because, well, you know what happens.
Forum: Plugins
In reply to: [WooCommerce] update to 3.7 broke cart and checkout on the same pageI’ve just checked the notes for the upcoming version 3.8 here: https://github.com/woocommerce/woocommerce/blob/master/readme.txt
Line 226 says: Dev – Use
wc_get_cart_url
instead ofwc_get_page_permalink( 'cart' )
because former has a filterwoocommerce_get_cart_url
to allow customization. #24530This might help with the manual customisation to get around the unnecessary restriction.
Forum: Plugins
In reply to: [Custom Login Page Customizer by Colorlib] Option to add footer text?Ok thanks, I’ll keep an eye out for future updates ??
Thanks,
LyallAah ok, I understand. It would be great if it could offer that in the future but for now it’s not a big problem.
Thanks,
LyallThis will add a logout link to your main menu if the user is logged in:
add_filter( 'wp_nav_menu_items', 'add_loginout_link', 10, 2 ); function add_loginout_link( $items, $args ) { if (is_user_logged_in() && $args->theme_location == 'primary') { $items .= '<li><a href="'. wp_logout_url( home_url() ) .'">Logout</a></li>'; } return $items; }
I don’t think this should be part of the plugin as it’s outside the scope of login screen customisation…
- This reply was modified 5 years, 2 months ago by thelyall.
(sorry for the badly written subject… oops)
If you want to make it the homepage (i.e. restrict access to any page on your website unless logged in) you can add the below function to your child theme functions.php – the below example only allows access to the password reset and privacy policy when not logged in, but the names might be different depending on your settings:
function wpse_131562_redirect() {
$object = get_queried_object();
if ( ! is_user_logged_in() && ( ! $object || ‘my-account’ !== $object->post_name ) && ( ! $object || ‘privacy-policy’ !== $object->post_name ) ) {
auth_redirect();}
}
add_action(‘template_redirect’, ‘wpse_131562_redirect’);Forum: Plugins
In reply to: [Autoptimize] Async Javascript mobile menu/script issue?That didn’t fix it for me – I tried it already but just tried again to make sure and it still has the same problem regardless of what options I select. Glad it worked for you though ??
Forum: Plugins
In reply to: [Autoptimize] Async Javascript mobile menu/script issue?Hello,
Ok I found out the reason the page didn’t change when I had it enabled/disabled was because I hadn’t ticked the box for it to apply to logged in users and I was logged in! ??
However, I wasn’t able to find the problem and even disabling the plugins one by one to try and narrow it down didn’t find the problem either. So unfortunately I’ve had to disable the tickbox (and effectively the plugin). On the plus side though, I was able to get my page score back up to 86 (mobile) and 97 (desktop) just by going through and identifying plugins which didn’t REALLY need to be enabled.
I’ll have another look at this in the future though as I want to get it working…
Thanks
Forum: Plugins
In reply to: [Autoptimize] Async Javascript mobile menu/script issue?Thanks. As far as I can see the only deferred script is:
<script type="text/javascript" defer='defer' src="https://k-beauty.global/wp-content/cache/autoptimize/js/autoptimize_1e2b7233dd0e34df1e546fcf8e23b78c.js"></script>
And the only async on the product page are:
<script data-cfasync="false" id="ao_optimized_gfonts_webfontloader" type="text/javascript">(function() {var wf = document.createElement('script');wf.src='https://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js';wf.type='text/javascript';wf.async='true';var s=document.getElementsByTagName('script')[0];s.parentNode.insertBefore(wf, s);})();</script>
<script async data-noptimize="1" src='https://k-beauty.global/wp-content/plugins/autoptimize/classes/external/js/lazysizes.min.js'></script>
These are the same whether async is enabled or not (weird) but I just checked again and if I enable the option the product pages break, and as soon as I disable it (and clear cache) they work again…
I think it might a script that only runs on mobile view? I will try to experiment later.
Thanks
Forum: Plugins
In reply to: [Autoptimize] Async Javascript mobile menu/script issue?Sorry, how can I tell if a script is deferred? ??