This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Script to setup prettier and eslint for a wordpress theme | |
| # Run this script in the root of the theme | |
| # Run the script with bash prettierbuild.sh | |
| # @date 2024-09-15 GRM | |
| # Check if Git is installed | |
| if ! command -v git &> /dev/null; then | |
| echo "Git is not installed. Please install Git first." | |
| exit 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Requirements | |
| # To work correctly, you will first need: | |
| # zsh (v5.2 or recent) must be installed. | |
| # Powerline Font must be installed and used in your terminal (for example, switch font to Fira Code). | |
| ZSH_THEME="spaceship" | |
| # Set Spaceship ZSH as a prompt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** Enqueue Child Theme JavaScript | |
| * Function adds JS after other plugins | |
| @created for a child theme named Mowtown Ecommerce | |
| @parent is Shopical Pro from AF Themes | |
| */ | |
| function enqueue_after_wc() { | |
| // vars |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Theme Includes | |
| * | |
| * The $theme_includes array determines the code library included in your theme. | |
| * Add or remove files to the array as needed. Supports child theme overrides. | |
| * @parent shopical pro from AF Themes | |
| * | |
| * Please note that missing files will produce a fatal error. | |
| * | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # .gitignore file for WordPress. Ignores everything except theme and plugins. | |
| # Located in the root folder | |
| # based on https://gist.github.com/jdbartlett/444295 | |
| # Broad capture | |
| /* | |
| # Host and php files | |
| *wp-*.php |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| DELETE FROM wp_postmeta | |
| WHERE wp_postmeta.meta_key = "custom_field_name" | |
| OR wp_postmeta.meta_key = "_custom_field_name" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # If you come from bash you might have to change your $PATH. | |
| # ( Removed ) | |
| # Path to your oh-my-zsh installation. | |
| # ( Removed ) | |
| # Set name of the theme to load --- if set to "random", it will | |
| # load a random theme each time oh-my-zsh is loaded, in which case, | |
| # to know which specific one was loaded, run: echo $RANDOM_THEME | |
| # See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Enqueue a Hashed JS and CSS from Webpack | |
| * Set theme stylesheet after WooCommerce. | |
| */ | |
| function enqueue_style_after_wc() { | |
| // include the css file as hashed version |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Add a data attribute of page/post to a WordPress Menu | |
| * Add this to your functions.php file | |
| * | |
| * This function will add the page/post ID of item the menu links to | |
| * when using wp_nav_menu(); to build the menu. | |
| * | |
| * Example: | |
| * |
NewerOlder