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
function my_theme_scripts() { | |
wp_enqueue_script( 'my-great-script', get_template_directory_uri() . '/js/my-great-script.js', array( 'jquery' ), '1.0.0', true ); | |
} | |
add_action( 'wp_enqueue_scripts', 'my_theme_scripts' ); |
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_action( 'wp_ajax_my_dismiss_acf_notice', 'my_dismiss_acf_notice' ); | |
function my_dismiss_acf_notice() { | |
update_option( 'my-acf-notice-dismissed', 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
<!DOCTYPE html> | |
<head> | |
<script type='text/javascript' src='jquery.js'> | |
<script type='text/javascript' src='owl.carousel.js'></script> | |
<link rel='stylesheet' type='text/css' href='reset.css'> | |
<link rel='stylesheet' type='text/css' href='styles.css'> | |
</head> | |
<body> | |
Website content here | |
<script type='text/javascript' src='website-scripts.js'></script> |
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
function my_assets() { | |
wp_enqueue_style( 'theme-style', get_stylesheet_uri(), array( 'reset' ) ); | |
wp_enqueue_style( 'reset', get_stylesheet_directory_uri() . '/reset.css' ); | |
wp_enqueue_script( 'owl-carousel', get_stylesheet_directory_uri() . '/owl.carousel.js', array( 'jquery' ) ); | |
wp_enqueue_script( 'theme-scripts', get_stylesheet_directory_uri() . '/website-scripts.js', array( 'owl-carousel', 'jquery' ), '1.0', true ); | |
} | |
add_action( 'wp_enqueue_scripts', 'my_assets' ); |
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
wp_enqueue_script( $handle, $source, $dependencies, $version, $in_footer ); | |
wp_enqueue_style( $handle, $source, $dependencies, $version, $media ); |
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
function my_assets() { | |
wp_register_script( 'owl-carousel', get_stylesheet_directory_uri() . '/owl.carousel.js', array( 'jquery' ) ); | |
wp_enqueue_script( 'owl-carousel' ); | |
} | |
add_action( 'wp_enqueue_scripts', 'my_assets' ); |
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
function my_assets() { | |
wp_deregister_script( 'jquery' ); | |
wp_register_script( 'jquery', get_template_directory_uri() . '/jquery-latest.js' ); | |
} | |
add_action( 'wp_enqueue_scripts', 'my_assets' ); |
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
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar | |
php wp-cli.phar --info | |
chmod +x wp-cli.phar | |
sudo mv wp-cli.phar /usr/local/bin/wp |
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
wp option get siteurl | |
wp option update siteurl http://newlocation.com |
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
wp search-replace http://danielpataki.com https://danielpataki.com | |
# Perform a test run only and show results | |
wp search-replace --dry-run http://danielpataki.com https://danielpataki.com |