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
app.factory('API', function($resource){ | |
var url = "http://www.urldomeusite.com.br/site/wp-json/"; | |
var API = { | |
posts: $resource(url+'posts/:id'), | |
taxonomies: $resource(url+'taxonomies/:taxonomy/terms/:term') | |
}; | |
return API; | |
}) |
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
.woocommerce.single-product .product .summary .variations { | |
width: 100%; | |
} | |
.woocommerce.single-product .product .summary .variations td { | |
display: block; | |
width: 100%; | |
} | |
.woocommerce.single-product .product .summary .variations td label { | |
font-family: 'Nunito', Helvetica, Arial, sans-serif; | |
letter-spacing: 0px; |
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
if (navigator.geolocation) { | |
navigator.geolocation.getCurrentPosition(function (position) { | |
alert("Lat: " + position.coords.latitude + " Long: " + position.coords.longitude); | |
}, function () { | |
//handleNoGeolocation(browserSupportFlag); | |
}); | |
} |
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 | |
$args = array( | |
'post_type' => 'post-slug', | |
'posts_per_page' => 6 | |
); | |
$loop = new WP_Query( $args ); | |
while ( $loop->have_posts() ) : $loop->the_post(); | |
//customfields | |
$cfname = get_post_meta( $post->ID, 'wpcf-CFSLUGHERE', true); | |
?> |
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 loadScripts() { | |
wp_register_script( 'main', get_template_directory_uri() . '/js/main.js', array( 'jquery' ) ); | |
wp_enqueue_script( 'main' ); | |
} | |
add_action( 'wp_enqueue_scripts', 'loadScripts' ); | |
//don't even bother to close the php tag! |
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
function add_import_order( $row ) { | |
// create new order | |
$order = new ImportOrder(); | |
// done this before? | |
$order->exists = order_exists( $row[PayPalCols::TRANSACTION_ID] ); | |
// add a bunch of fields | |
$order->date = $row[PayPalCols::DATE]; |
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 //from http://stackoverflow.com/a/26588393/1576978 | |
$address = array( | |
'first_name' => 'Fresher', | |
'last_name' => 'StAcK OvErFloW', | |
'company' => 'stackoverflow', | |
'email' => '[email protected]', | |
'phone' => '777-777-777-777', | |
'address_1' => '31 Main Street', | |
'address_2' => '', | |
'city' => 'Chennai', |
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 | |
/* | |
Plugin Name: Cria Key | |
Plugin URI: http://rcdev.com.br/palestra/_clients/angularJs | |
Description: Cria Keys e Secre para o wp_oauth sem necessidade de usar o WP-CLI (que só roda em Unix) | |
Author: Romulo_Ctba | |
Author URI:http://rcdev.com.br/romulo | |
Version: 0.1 | |
License: GPLv2 | |
*/ |
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
function archiveAll( $query ) { | |
if( is_category() || is_tag() && empty( $query->query_vars['suppress_filters'] ) ) { | |
$query->set( 'post_type', array( | |
'post', 'myCustomPostSlugHere' | |
)); | |
return $query; | |
} | |
} | |
add_filter( 'pre_get_posts', 'archiveAll' ); |
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
function criaSidebars() { | |
register_sidebar( array( | |
'name' => 'Sidebar Principal', | |
'id' => 'main-sidebar', | |
'before_widget' => '<div>', | |
'after_widget' => '</div>', | |
'before_title' => '<h2 class="">', | |
'after_title' => '</h2>', | |
) ); | |
} |