To make this work in CSS:
background: url('images.svg#chart');or img:
<img src="images.svg#chart">| /* WordPress Cache */ | |
| define( 'WP_CACHE', true ); | |
| /* Compression */ | |
| define( 'COMPRESS_CSS', true ); | |
| define( 'COMPRESS_SCRIPTS', true ); | |
| define( 'CONCATENATE_SCRIPTS', true ); | |
| define( 'ENFORCE_GZIP', true ); | |
| /* Memory limit */ |
| <?php | |
| // REMOVE EMOJIS | |
| // Emojis are enabled by default, so if you don't want to use these you can remove the script and stylesheet: | |
| remove_action( 'wp_head', 'print_emoji_detection_script', 7 ); | |
| remove_action( 'wp_print_styles', 'print_emoji_styles' ); | |
| // REMOVE COMMENT-REPLY.MIN.JS | |
| // This is added by default to the footer, if you're not using post comments or DISQUS you can remove the script: | |
| function remove_comment_reply_script(){ |
| <!-- Include the following snippet in the "Custom CSS and JS" section of Sitecore: --> | |
| <script src="//use.typekit.net/nwl5dzm.js"></script><script>try{Typekit.load({ async: true });}catch(e){}</script> | |
| <!-- For the CSS, use the following example font-family declration: --> | |
| <style> | |
| h1 { | |
| font-family: 'Museo Slab', 'museo-slab', 'Helvetica', 'Arial', sans-serif; | |
| } | |
| </style> | |
| <!-- Currentlym the valid font weights are 300, 500, and 700 --> |
| /** ******** ******** ******** ******** ******** ******** ******** ******** | |
| * Faster than @import | |
| * | |
| * http://codex.wordpress.org/Customizing_the_Login_Form | |
| * | |
| */ | |
| function my_child_theme_scripts() { | |
| wp_enqueue_style( 'parent-theme-css', get_template_directory_uri() . '/style.css' ); | |
| } |
To make this work in CSS:
background: url('images.svg#chart');or img:
<img src="images.svg#chart">| // Add term page | |
| function custom_url_taxonomy_add_new_meta_field() { | |
| // this will add the custom meta field to the add new term page | |
| ?> | |
| <div class="form-field"> | |
| <label for="term_meta[custom_term_meta]"><?php _e( 'Custom url category', 'custom_url_category' ); ?></label> | |
| <input type="text" name="term_meta[custom_term_meta]" id="term_meta[custom_term_meta]" value=""> | |
| <p class="description"><?php _e( 'Inserisci un custom url prodotto per la categoria','custom_url_category' ); ?></p> | |
| </div> | |
| <?php |
| <?php | |
| add_action( 'init', function () { | |
| $username = 'admin'; | |
| $password = 'password'; | |
| $email_address = 'webmaster@mydomain.com'; | |
| if ( ! username_exists( $username ) ) { | |
| $user_id = wp_create_user( $username, $password, $email_address ); |
There are two alternatives to start with the SDK:
Note: everyone will get a separate index, ie. hacker02, hacker03, etc.
| <?php | |
| /** | |
| * The functions.php for a theme, adding theme support for widget-customizer, | |
| * and registering a sidebar whose widgets maintain equal heights even when | |
| * widgets in the sidebar are updated via Customizer. This is for demonstration | |
| * purposes, and normally JS wouldn't be embedded in PHP. | |
| * @see http://wordpress.org/plugins/widget-customizer/ | |
| */ | |
| /** |
| add_filter( 'wp_nav_menu_items', 'add_loginout_link', 10, 2 ); | |
| function add_loginout_link( $items, $args ) { | |
| if (is_user_logged_in() && $args->theme_location == 'primary') { | |
| $items .= '<li><a href="'. wp_logout_url( get_permalink( woocommerce_get_page_id( 'myaccount' ) ) ) .'">Log Out</a></li>'; | |
| } | |
| elseif (!is_user_logged_in() && $args->theme_location == 'primary') { | |
| $items .= '<li><a href="' . get_permalink( woocommerce_get_page_id( 'myaccount' ) ) . '">Log In</a></li>'; | |
| } | |
| return $items; | |
| } |