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
.element { | |
position: relative; | |
top: 50%; | |
transform: translateY(-50%); | |
} |
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 | |
//Not load JS and CSS | |
define('ICL_DONT_LOAD_NAVIGATION_CSS', true); | |
define('ICL_DONT_LOAD_LANGUAGE_SELECTOR_CSS', true); | |
define('ICL_DONT_LOAD_LANGUAGES_JS', true); | |
//Not Load advertising | |
define("ICL_DONT_PROMOTE", true); |
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
//Página de creación automática | |
if (isset($_GET['activated']) && is_admin()){ | |
$new_page_title = 'Título de la página'; | |
$new_page_content = 'Aquí va el contenido de la página, por supuesto puedes añadir HTML a voluntad'; | |
$new_page_template = ''; //nombre del archivo de plantilla de página personalizada, por ejemplo: plantilla-personalizada.php. Déjalo en blanco si no quieres crear una plantilla de página personalizada. | |
//No cambies el código que viene a continuación a menos que sepas realmente lo que estás haciendo | |
$page_check = get_page_by_title($new_page_title); |
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
/** | |
* Register new status | |
* Tutorial: http://www.sellwithwp.com/woocommerce-custom-order-status-2/ | |
**/ | |
function register_awaiting_shipment_order_status() { | |
register_post_status( 'wc-awaiting-shipment', array( | |
'label' => 'Awaiting shipment', | |
'public' => true, | |
'exclude_from_search' => false, | |
'show_in_admin_all_list' => true, |
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 | |
RewriteCond %{SERVER_PORT} 80 | |
RewriteRule ^(.*)$ https://www.mysite.com/$1 [R,L] | |
</IfModule> | |
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
//dequeue css from plugins | |
add_action('wp_print_styles', 'mytheme_dequeue_css_from_plugins', 100); | |
function mytheme_dequeue_css_from_plugins() { | |
wp_dequeue_style( '' ); | |
} | |
add_action('wp_print_scripts','mytheme_dequeue_js_from_plugins'); | |
function mytheme_dequeue_js_from_plugins() { | |
wp_dequeue_script( '' ); | |
} |
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
/** | |
* Register new status | |
* Tutorial: http://www.sellwithwp.com/woocommerce-custom-order-status-2/ | |
**/ | |
function register_awaiting_shipment_order_status() { | |
register_post_status( 'wc-awaiting-shipment', array( | |
'label' => 'Awaiting shipment', | |
'public' => true, | |
'exclude_from_search' => false, | |
'show_in_admin_all_list' => true, |
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 | |
$url = "http://{site_url}/service/v4_1/rest.php"; | |
$username = "admin"; | |
$password = "password"; | |
//function to make cURL request | |
function call($method, $parameters, $url) | |
{ | |
ob_start(); |
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 | |
$url = "http://{site_url}/service/v4_1/rest.php"; | |
$username = "admin"; | |
$password = "password"; | |
function call($method, $parameters, $url) | |
{ | |
ob_start(); | |
$curl_request = curl_init(); |
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
$connected = new WP_Query( array( | |
'connected_type' => 'proyectos_a_sectores', | |
'connected_items' => get_post($post->post_parent), | |
'nopaging' => true, | |
) ); |