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
| /*WOO PROD.ARHCIVE COLUMN FIX*/ | |
| .woocommerce ul.products { | |
| justify-content: left; | |
| } | |
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
| //1. Add action | |
| add_action( 'wp_enqueue_scripts', 'my_enquque_script' ); | |
| //2. Set function | |
| //3. And Enquque | |
| function my_enquque_script() { | |
| wp_enqueue_script( 'my-script', get_stylesheet_directory_uri() . '/js/my_enquque_script.js', array( 'jquery' ), '1.0.0', true ); | |
| } |
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
| //1. Add action | |
| add_action( 'wp_enqueue_scripts', 'my_enquque_script' ); | |
| //2. Set function | |
| //3. And Enquque | |
| function my_enquque_script() { | |
| wp_enqueue_script( 'my-script', get_stylesheet_directory_uri() . '/js/my_enquque_script.js', array( 'jquery' ), '1.0.0', true ); | |
| } |
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( 'template_redirect', 'redirect_404_to_any_url' ); | |
| function redirect_404_to_any_url() { | |
| if ( is_404() ) : | |
| wp_redirect( 'http://example.com/', 301 ); | |
| exit; | |
| endif; | |
| } | |
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
| // 404 Full Width Page | |
| add_action( 'get_header', 'custom_404_layout' ); | |
| function custom_404_layout() { | |
| if ( ! is_404() ) { | |
| return; | |
| } | |
| add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' ); | |
| } |
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 | |
| //* Do NOT include the opening php tag shown above. Copy the code shown below. | |
| //* Change the footer text | |
| add_filter('genesis_footer_creds_text', 'sp_footer_creds_filter'); | |
| function sp_footer_creds_filter( $creds ) { | |
| $creds = '[footer_copyright] · <a href="http://mydomain.com">My Custom Link</a> · Built on the <a href="http://www.studiopress.com/themes/genesis" title="Genesis Framework">Genesis Framework</a>'; | |
| return $creds; | |
| } | |
| // OR | |
| // *Remove the footer text |
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
| //History Button on WooCommerce Single Product Page | |
| add_action( 'woocommerce_after_add_to_cart_button', 'my_function_sample', 10 ); | |
| function my_function_sample() { | |
| global $product; | |
| echo ' <button type="button" onclick="history.back();"> Go back </button> '; | |
| } | |
| //*Possible modifications | |
| // Change: echo ' <button type="button" onclick="history.back();"> Go back </button> '; |
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
| #Activate support for "mod_deflate". | |
| <IfModule mod_deflate.c> | |
| <FilesMatch "\\.(js|css|html|htm|php|xml)$"> | |
| SetOutputFilter DEFLATE | |
| </FilesMatch> | |
| </IfModule> |
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
| ** | |
| * Change text strings | |
| * | |
| * @link http://codex.wordpress.org/Plugin_API/Filter_Reference/gettext | |
| */ | |
| function my_text_strings( $translated_text, $text, $domain ) { | |
| switch ( $translated_text ) { | |
| case 'Sale!' : | |
| $translated_text = __( 'Clearance!', 'woocommerce' ); | |
| break; |