gxb101
Forum Replies Created
-
Forum: Plugins
In reply to: Need to hide WooCommerce 'shop' page to non membersHi, here is what I used at the very top:
<?php if( !is_user_logged_in() ) { wp_redirect(get_permalink(24)); } else{[the rest of the original .php code….]
Forum: Plugins
In reply to: Need to hide WooCommerce 'shop' page to non membersThis issues has plagued me for the last 2 days and I am happy to report I found a workaround. The problem is that any plugins which can limit access by user level do not work on woocommerce “core” pages (ie: the shop page). So, what you must do is edit the archive-product.php file (found in the woocommerce root dir) and add some custom php code to the very top such as this:
if( !is_user_logged_in() ) { wp_redirect(some-page-on-your-site); } else{ [the remaining original php code follows here...]What this will do is check to see if the user is logged in and redirect them to some other page is they aren’t, else they will see the page as intended. The trick is to redirect them to some other page which makes them either login or register for site access.
Problem solved.
Forum: Fixing WordPress
In reply to: !Doctype whitespace issueI deactivated the plug-ins and all was the same. When I switched to the default theme, everything looked fine. Obviously there is something in the theme causing the disturbance. Any thoughts on next steps? Thx
Forum: Fixing WordPress
In reply to: !Doctype whitespace issueNo, haven’t done either of those things for the reason being that the files and database tables are literal copies of a site which works fine on another server. Am I incorrect in assuming that the copies should work in exactly the same manner?