How to connect to a MySQL or mariadb database with PHP
…this guides example data have your database, database user and password configured, log into your mysql service, here I have logged in via command line – choose the database and…
Read MoreMake an Alias in Bash or Zsh Shell in macOS with Terminal
…. drwxr-xr-x 6 root admin 204 Jul 3 18:28 .. -rw——- 1 ladmin staff 3 Jun 2 12:53 .CFUserTextEncoding -rw-r–r–@ 1 ladmin staff 6148 Jul 14 09:01 .DS_Store drwx—— 5…
Read MoreWhat are Classes and Methods in OOP PHP
…variable. Now you can change the variable for the new instantiated class. $classcopy->red_pill = ’15 in the morning’; $classcopy->blue_pill = ’12 at night time’; Now run the $classcopy echo $classcopy->red_pill;…
Read MoreAdd qty inputs next to add to cart button with and without Ajax reload on WooCommerce archives
…$product && $product->is_type( ‘simple’ ) && $product->is_purchasable() && $product->is_in_stock() && ! $product->is_sold_individually() ) { $html = ‘<form action=”‘ . esc_url( $product->add_to_cart_url() ) . ‘” class=”cart” method=”post” enctype=”multipart/form-data”>’; $html .= woocommerce_quantity_input(…
Read MoreHow to create a TwentySixteen Child Theme in WordPress
…parent theme : /* Theme Name: yourchildthemename-can-be-anything-you-like Theme URI: http://www.greatwebsite.com Description: Designed by <a href=”http://www.greatwebsite.com”>Neil Gee</a>. Author: Neil Gee Version: 1.0.0 Template: twentysixteen Tags: bold purple clean & elegant and…
Read MoreInstall Git on macOS Big Sur and earlier with Homebrew or Packaged File
…This will download the latest version of Git to your desktop/download area as a dmg file, (it says mavericks in the file name but just ignore that) Open the…
Read MoreSyncing RunCloud and Cloudflare firewalls for fail2ban IPs
…better source, last updated Jan 2021. The Cloudflare conf below is from version 0.11.2 https://github.com/fail2ban/fail2ban/blob/master/config/action.d/cloudflare.conf https://gist.github.com/neilgee/9e89fced25ee515876dee125758330a4 You just rename/backup the old cloudflare.conf.original and add in the new one above best…
Read MoreMoving Custom Post Types Higher Up the Admin Menu in WordPress Dashboard
…Lien’), ‘edit_item’ => __(‘Edit Tax Lien’), ‘new_item’ => __(‘New Tax Lien’), ‘view_item’ => __(‘View Tax Lien’), ‘search_items’ => __(‘Search in Tax Liens’), ‘not_found’ => __(‘No Tax Liens found’), ‘not_found_in_trash’ =>…
Read MoreAdd WooCommerce MyAccount Page Login/Logout to Menu
…I add Login/Logout to that as a sub-menu? Neil Gowran Not 100% sure – as haven’t had to do it – maybe check some of the code here – http://wordpress.stackexchange.com/questions/142342/logout-hyperlink-within-a-sub-menu…
Read MoreCreate a Widgetized Custom Home Page in Genesis Child Theme WordPress
…CSS. .first { margin-left:0px; } This would then leave us with 100% wide areas. The Genesis column classes are set to be varying percentages at viewports over 767px (iPad portrait…
Read More