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 | |
function wpseo_translate_home_breadcrumb($links) { | |
if ( $links[0]['url'] == home_url('/') ) { | |
switch (ICL_LANGUAGE_CODE) { | |
case "es": | |
$links[0]['text'] = 'Inicio'; | |
break; | |
default: | |
$links[0]['text'] = 'Home'; |
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 | |
function my_login_logo_url() { | |
return home_url(); | |
} | |
add_filter( 'login_headerurl', 'my_login_logo_url' ); | |
function my_login_logo_url_title() { | |
return 'Mi título personalizado'; | |
} | |
add_filter( 'login_headertitle', 'my_login_logo_url_title' ); |
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 | |
function calfaro_custom_login_logo() { | |
echo ' | |
<style type="text/css"> | |
.login h1 a { | |
background-image: url(' . get_stylesheet_directory_uri() . '/images/logo-calfaro.png); | |
padding-bottom: 0px; | |
width: 100%; | |
background-size: contain; | |
} |
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 | |
function mi_logo_personalizado() { | |
echo ' | |
<style type="text/css"> | |
.login h1 a { | |
background-image: url(<?php echo get_stylesheet_directory_uri(); ?>/images/login-logo.png); | |
} | |
</style>'; | |
} | |
add_action( 'login_enqueue_scripts', 'mi_logo_personalizado' ); |
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
// smooth on load page | |
$(document).ready(function(){ | |
var urlHash = window.location.href.split("#")[1]; | |
if (urlHash.length > 0) | |
$('html,body').animate({ | |
scrollTop: $('#' + urlHash).offset().top - 150 | |
}, 1000); | |
}); |
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 | |
// SHOW YOAST PRIMARY CATEGORY, OR FIRST CATEGORY | |
$category = get_the_category(); | |
$useCatLink = true; | |
// If post has a category assigned. | |
if ($category){ | |
$category_display = ''; | |
$category_link = ''; | |
if ( class_exists('WPSEO_Primary_Term') ) | |
{ |
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 | |
/* | |
* https://codex.wordpress.org/Plugin_API/Filter_Reference/no_texturize_shortcodes | |
*/ | |
add_filter( 'no_texturize_shortcodes', 'shortcodes_to_exempt_from_wptexturize' ); | |
function shortcodes_to_exempt_from_wptexturize( $shortcodes ) { | |
$shortcodes[] = 'myshortcode'; | |
return $shortcodes; |
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
/* | |
Credits: http://wordpress.stackexchange.com/questions/145805/how-to-make-child-categories-recognize-parents-template-displays | |
*/ | |
function new_subcategory_hierarchy() { | |
$category = get_queried_object(); | |
$parent_id = $category->category_parent; | |
$templates = array(); |
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
* {-moz-osx-font-smoothing: grayscale;} |
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
$(window).resize(function() { | |
if ($(window).width() < 768) { | |
$('#content').insertBefore('#sidebar'); | |
} | |
else | |
$('#sidebar').insertBefore('#content'); | |
}); |
NewerOlder