Set up Virtual Hosts on macOS Big Sur 11 in Apache
…to create your new virtual host: <VirtualHost *:80> ServerAdmin [email protected].com DocumentRoot “/usr/docs/dummy-host.example.com” ServerName dummy-host.example.com ServerAlias www.dummy-host.example.com ErrorLog “/private/var/log/apache2/dummy-host.example.com-error_log” CustomLog “/private/var/log/apache2/dummy-host.example.com-access_log” common </VirtualHost> We can take this example and extend on…
Read MoreRedirect an admin user role on login with login redirect
…); /** * Redirect Shop Manager to WC Orders * @link https://stackoverflow.com/questions/30124931/how-to-redirect-a-user-with-specific-role-to-a-specific-page-after-login-in-wo */ function prefix_login_redirect_based_on_roles( $user_login, $user ) { if( in_array( ‘shop_manager’,$user->roles ) ){ exit( wp_redirect(‘/wp-admin/edit.php?post_type=shop_order’ ) ); } }…
Read MoreStop WooCommerce checkout fields auto-filling – leave blank
…behalf of multiple customers. add_filter( ‘woocommerce_checkout_get_value’,’prefix_return_empty_checkout’, 1, 1 ); function prefix_return_empty_checkout(){ $user = wp_get_current_user(); //The user has the “shop_manager” role if ( in_array( ‘shop_manager’, (array) $user->roles ) ) { return…
Read MoreInstall Apache, MySQL, PHP on macOS 11 Big Sur and earlier macOS
…command and hit enter, some commands give you no response – it just means the command is done, other commands give you feedback. Using the prefix of sudo is required…
Read MoreDownload and Install Lastest WordPress with wp-cli on OSX
With the new versions of WordPress available to download and test, here’s how to use wp-cli to download and configure it all from the Terminal, you need to have wp-cli…
Read MoreSet Up Valet on macOS for Local WordPress Development
…you to easily use valet commands on the command line – if you don’t include it you will need to prefix all valet commands with ~/.composer/vendor/bin/ ~/.composer/vendor/bin Install valet valet…
Read MoreUsing Slick Responsive Navigation Mobile Menus on Genesis Child Theme
…the “Slicknav Mobile Menu Name” field. What am I doing wrong? The site is www.tacknrider.com Neil Gee Hi – you may have to use latest version of the theme where…
Read MoreUse 7G WAF Firewall with OpenLiteSpeed on a RunCloud instance
…%{HTTP_USER_AGENT} (base64_decode|bin/bash|disconnect|eval|lwp-download|unserialize|\\\x22) [NC,OR] RewriteCond %{HTTP_USER_AGENT} (acapbot|acoonbot|asterias|attackbot|backdorbot|becomebot|binlar|blackwidow|blekkobot|blexbot|blowfish|bullseye|bunnys|butterfly|careerbot|casper|checkpriv|cheesebot|cherrypick|chinaclaw|choppy|clshttp|cmsworld|copernic|copyrightcheck|cosmos|crescent|cy_cho|datacha|demon|diavol|discobot|dittospyder|dotbot|dotnetdotcom|dumbot|emailcollector|emailsiphon|emailwolf|extract|eyenetie|feedfinder|flaming|flashget|flicky|foobot|g00g1e|getright|gigabot|go-ahead-got|gozilla|grabnet|grafula|harvest|heritrix|httrack|icarus6j|jetbot|jetcar|jikespider|kmccrew|leechftp|libweb|linkextractor|linkscan|linkwalker|loader|masscan|miner|mechanize|morfeus|moveoverbot|netmechanic|netspider|nicerspro|nikto|ninja|nutch|octopus|pagegrabber|petalbot|planetwork|postrank|proximic|purebot|pycurl|python|queryn|queryseeker|radian6|radiation|realdownload|scooter|seekerspider|semalt|siclab|sindice|sistrix|sitebot|siteexplorer|sitesnagger|skygrid|smartdownload|snoopy|sosospider|spankbot|spbot|sqlmap|stackrambler|stripper|sucker|surftbot|sux0r|suzukacz|suzuran|takeout|teleport|telesoft|true_robots|turingos|turnit|vampire|vikspider|voideye|webleacher|webreaper|webstripper|webvac|webviewer|webwhacker|winhttp|wwwoffle|woxbot|xaldon|xxxyy|yamanalab|yioopbot|youda|zeus|zmeu|zune|zyborg) [NC] # RewriteRule .* – [F,L] RewriteRule .* /7G_log.php?log [END,NE,E=7G_USER_AGENT:%1,E=REDIRECT_QUERY_STRING:log] </IfModule> # 7G:[REMOTE HOST] <IfModule mod_rewrite.c> RewriteCond %{REMOTE_HOST} (163data|amazonaws|colocrossing|crimea|g00g1e|justhost|kanagawa|loopia|masterhost|onlinehome|poneytel|sprintdatacenter|reverse.softlayer|safenet|ttnet|woodpecker|wowrack) [NC] # RewriteRule .* -…
Read MoreChange your WordPress site to serve pages over HTTPS/SSL
…traffic. Any site owners with online transactions have already gone down this route but perhaps only made their e-commerce pages secure, I believe if you have a few pages HTTPS,…
Read MoreHow to Add Extra Settings to Default Customizer Sections in WordPress
…Front Page. Once you add_theme_supports in your themes function.php file for custom-header and custom-background you get three more panels; Colors, Header Image and Background Image. Where are these…
Read More