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
//CAPTCHA | |
// function number to word | |
function number_to_word($number) { | |
$words = array( | |
'zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', | |
'ten', 'eleven', 'twelve', 'thirteen', 'fourteen', 'fifteen', 'sixteen', 'seventeen', 'eighteen', 'nineteen', | |
'twenty', 30 => 'thirty', 40 => 'forty', 50 => 'fifty', 60 => 'sixty', 70 => 'seventy', 80 => 'eighty', 90 => 'ninety' | |
); | |
if(!is_numeric($number)) { |
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
:root { | |
--brown: #5b534f; | |
} | |
.wpcf7-acceptance .wpcf7-list-item { | |
margin-left: 0px; | |
margin-top: 10px; | |
margin-bottom: 10px; | |
} | |
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
// add this to functions.php | |
//register acf fields to Wordpress API | |
//https://support.advancedcustomfields.com/forums/topic/json-rest-api-and-acf/ | |
function acf_to_rest_api($response, $post, $request) { | |
if (!function_exists('get_fields')) return $response; | |
if (isset($post)) { | |
$acf = get_fields($post->id); | |
$response->data['acf'] = $acf; |
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 | |
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1; | |
$args = array( | |
'posts_per_page' => 8, | |
'paged' => $paged, | |
'post__not_in' => array($idPostToExlude) ); | |
$the_query = new WP_Query( $args ); |
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
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
# redirect to subfolder /it if language is it | |
RewriteCond %{HTTP:Accept-Language} ^it [NC] | |
RewriteRule ^/?$ https://domain.com/it/ [R,NC,L] | |
# remove the .html extension | |
RewriteCond %{THE_REQUEST} ^GET\ (.*)\.html\ HTTP | |
RewriteRule (.*)\.html$ $1 [R=301] |
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
RewriteEngine On | |
RewriteCond %{HTTPS} !=on | |
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] |
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
My url: https://www.test.com/inc/example.xml | |
RewriteRule ^inc/example.xml - [F] |
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
//$d è un oggetto stdClass | |
//$newd = new stdClass; | |
//$newd->ID = "MAIN"; | |
//$newd->NAME = "Look - The Concept Factory"; | |
//$newd->ADDRESS = "Zona industriale Villanova, 19 32013 Longarone (BL) ITALY"; | |
//$newd->TEL = "+390437573060"; | |
//$newd->MAIL = "[email protected]"; | |
//$newd->WEBSITE = "www.lookocchiali.it"; | |
//$newd->DISTANCE = ""; |
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
<? | |
Header( "HTTP/1.1 301 Moved Permanently" ); | |
Header( "Location: https://newlocation/" ); | |
?> |
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
RewriteEngine On | |
Redirect 301 pagina1.html http://www.miosito.com/pagina2.html |
NewerOlder