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
//ORDINA IL FEED | |
function ek_reverseorder($query_string) | |
{ | |
return query_posts( $query_string . '&order=DESC&orderby=date' ); | |
} | |
add_action( 'rss2_head', 'ek_reverseorder' ); | |
//AGGIUNGE uno o più CPT al feed RSS | |
add_action('pre_get_posts', 'exclude_category' ); | |
function exclude_category( &$wp_query ) |
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 | |
//query che recupera tutti i ctp di titpo evento pubblicati oggi | |
$today = getdate(); | |
$args = array( | |
'date_query' => array( | |
array( | |
'year' => $today['year'], | |
'month' => $today['mon'], | |
'day' => $today['mday'], | |
), |
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
#301 Redirects for .htaccess | |
#Redirect a single page: | |
Redirect 301 /pagename.php http://www.domain.com/pagename.html | |
#Redirect an entire site: | |
Redirect 301 / http://www.domain.com/ | |
#Redirect an entire site to a sub folder | |
Redirect 301 / http://www.domain.com/subfolder/ |
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
1) creo file .htaccess dove | |
- AuthUserFile indica path del server in cui c'è la password | |
- AuthGroupFile indica il path del server relativo alla cartella da proteggere | |
AuthUserFile /home/www/fbsr/prod/test/.htpassword | |
AuthGroupFile /home/www/fbsr/prod/test/ | |
AuthName "Directory Protetta" | |
AuthType Basic | |
<Limit GET> | |
require valid-user |
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 | |
$cat_ricette = get_terms( 'categorie' ); | |
foreach ( $cat_ricette as $cat_ricetta ) { | |
$query = new WP_Query( array( | |
'post_type' => 'ricette', | |
'posts_per_page' => '-1', | |
'tax_query' => array( | |
array( | |
'taxonomy' => 'categorie', | |
'field' => 'slug', |
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 | |
// Remove tags support from posts | |
// ***** | |
function myprefix_unregister_tags() { | |
unregister_taxonomy_for_object_type('post_tag', 'post'); | |
} | |
add_action('init', 'myprefix_unregister_tags'); |
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
//restituisce true quando elemento fixed passa sopra ad element | |
//fixed si passa così $("#rightMenu") | |
//element si passa sempre così $('#s02') | |
function isHover(fixed, element) { | |
var isHover = false; | |
if ( element.length ) { | |
var fixed_position = fixed.offset().top; | |
var fixed_height = fixed.height(); |
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 | |
if( ICL_LANGUAGE_CODE == 'it' ) { | |
$link = get_field('link_ita', apply_filters( 'wpml_object_id', $image['ID'], 'attachment', TRUE, 'it' )); | |
} elseif( ICL_LANGUAGE_CODE == 'en' ) { | |
$link = get_field('link_en', apply_filters( 'wpml_object_id', $image['ID'], 'attachment', TRUE, 'en' )); | |
} |
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
.goUp { | |
position: fixed; | |
right: 20px; | |
bottom: 20px; | |
font-size: 30px; | |
color: $blue; | |
padding: 0 9.3px; | |
z-index: 999; | |
background-color: rgba(0, 0, 0, .3); | |
-webkit-border-radius: 8px; |
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
.modal-dialog { | |
width: 100%; | |
height: 100%; | |
margin: 0; | |
padding: 0; | |
max-width: none !important; | |
.modal-content { | |
height: auto; | |
min-height: 100%; |
NewerOlder