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 | |
$include = get_pages('include=ID'); // Insert the page ID | |
$content = apply_filters('the_content',$include[0]->post_content); | |
echo $content; | |
?> |
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
.map{width:100%;height:400px;} | |
.map-wrapper{position:relative;} | |
.map-overlay{width:100%;min-height:400px;position:absolute;top:0;z-index:200;} |
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 | |
/*-----------------------------------------------------------------------------------*/ | |
/* Cambiamos el logo y URL del formlulario de login (80x80px) | |
/*-----------------------------------------------------------------------------------*/ | |
function my_custom_login_logo() { ?> | |
<style type="text/css"> | |
.login h1 a { | |
background-image: url(<?php echo site_url(); ?>/wp-content/uploads/2017/01/images/login-logo.png) !important; | |
padding-bottom: 0px; | |
width:180px !important; |
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 | |
// Exclude items from minimum cost when calculating the free shipment | |
global $woocommerce; | |
$eligible = array( '1936' ); // Array of IDs exluded | |
$cart_items = $woocommerce->cart->get_cart(); |
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 category_id_class( $classes ) { | |
global $post; | |
foreach ( get_the_category() as $category ) { | |
$classes[] = $category->category_nicename; | |
} | |
return $classes; | |
} | |
add_filter( 'post_class', 'category_id_class' ); // Add to article | |
add_filter( 'body_class', 'category_id_class' ); // Add to body |
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_filter( 'max_srcset_image_width', create_function( '', 'return 1;' ) ); |
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
/* | |
- First of all upload your font via ftp | |
- Then paste this code into style.css | |
- Repeat for each font-weight | |
*/ | |
@font-face { | |
font-family: FontName; | |
src: url(fonts/FontName.ttf); | |
font-weight: normal; | |
} |
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 wpse_allowedtags() { | |
// Add custom tags to this string | |
return '<br>,<i>,<a>,<p>,<strong>'; | |
} | |
if ( ! function_exists( 'wpse_custom_wp_trim_excerpt' ) ) : | |
function wpse_custom_wp_trim_excerpt($wpse_excerpt) { | |
$raw_excerpt = $wpse_excerpt; | |
if ( '' == $wpse_excerpt ) { |
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 | |
// Hide Menu from WordPress Dashboard | |
function custom_menu_page_removing() { | |
$userid = get_current_user_id(); | |
if ($userid != 1 && $userid != 2){ | |
remove_menu_page( 'edit.php?post_type=clients' ); | |
remove_menu_page( $slug ); | |
remove_menu_page( 'duplicator' ); // for admin.php?page=duplicator | |
} | |
} |
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 wpml_find_language( $attr, $content = null ){ | |
extract(shortcode_atts(array( | |
'lang' => '', | |
), $attr)); | |
$current_language = ICL_LANGUAGE_CODE; | |
if($current_language == $lang){ | |
$output = do_shortcode($content); | |
}else{ |