Nore WordPress Theme!
This file contains 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 | |
function gp_child_scripts() { | |
wp_enqueue_style( 'gpchild-custom-css', get_theme_file_uri( '/customCss/modalStyling.css' ) ); | |
wp_enqueue_script( 'gpchild-custom-js', get_theme_file_uri( '/js/modalScript.js' ), array(), '4.8', true ); | |
} | |
add_action( 'wp_enqueue_scripts', 'gp_child_scripts' ); |
This file contains 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 | |
add_action('wp_head', 'webworks_facebook_analytics'); | |
function webworks_facebook_analytics() { | |
if(current_user_can('manage_options')) { | |
return; | |
} | |
?> |
The popular open-source contract for web professionals by Stuff & Nonsense
- Originally published: 23rd December 2008
- Revised date: March 15th 2016
- Original post
This file contains 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
// In the case of a theme this goes in functions.php and for plugins I use plugin.php :) | |
function frontend_assets(){ | |
// Enqueue your assets here and add your localization like so! | |
wp_localize_script( $this->ssp_plugin_slug, 'ss_panel', array( | |
'success' => __( 'Here are your search results!', 'textdomain' ), | |
'failure' => __( 'Sorry, no results matched your search query. Try searching again?', 'textdomain' ), | |
)); | |
} | |
add_action( 'wp_enqueue_scripts', 'frontend_assets' ); | |
This file contains 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 // Leave this out if you already have an opening php tag in your file! | |
function elementor_accordion_title() { ?> | |
<script> | |
jQuery(document).ready(function() { | |
jQuery('.elementor-accordion-title').removeClass('active'); | |
jQuery('.elementor-accordion-content').css('display', 'none'); | |
}); | |
</script> | |
<?php } | |
add_action( 'wp_footer', 'elementor_accordion_title' ); |
This file contains 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 | |
add_action( 'woocommerce_product_options_advanced', 'woostore_elementor_product_link' ); | |
function woostore_elementor_product_link() { | |
global $woocommerce, $post; | |
echo '<div class="options_group">'; | |
woocommerce_wp_text_input( | |
array( |
This file contains 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
/** | |
* Redirect to a specific page when clicking on Continue Shopping in the single product page | |
* | |
* @return void | |
*/ | |
function wc_custom_redirect_continue_shopping( $message ) { | |
if ( strpos( $message, __( 'View Cart', 'woocommerce' ) ) !== false ) { | |
$message = str_replace( esc_url( wc_get_page_permalink( 'cart' ) ), esc_url( wc_get_page_permalink( 'shop' ) ), $message ); | |
$message = str_replace( __( 'View Cart', 'woocommerce' ), esc_html__( 'Continue Shopping', 'woocommerce' ), $message ); |
NewerOlder