Simple explanation of how to add a map to a website using Google Maps API v3
Forked from Enrique Moreno Tent's Pen Google Maps API v3 - Basic Map.
A Pen by Kharis Sulistiyono on CodePen.
<style type="text/css"> | |
.site-logo-middle-menu{ | |
position: relative; | |
display: inline-block; | |
margin-left: 10px; | |
margin-right: 10px; | |
} | |
.site-logo-middle-menu > a{ | |
position: absolute; |
<?php if ( get_theme_mod('site_logo') ) : ?> | |
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php bloginfo('name'); ?>"><img class="site-logo" src="<?php echo esc_url(get_theme_mod('site_logo')); ?>" alt="<?php bloginfo('name'); ?>" /></a> | |
<h2 class="site-description"><?php bloginfo( 'description' ); ?></h2> | |
<?php else : ?> |
<?php if ( get_theme_mod('site_logo') ) : ?> | |
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php bloginfo('name'); ?>"><img class="site-logo" src="<?php echo esc_url(get_theme_mod('site_logo')); ?>" alt="<?php bloginfo('name'); ?>" /></a> | |
<?php else : ?> |
<?php | |
/** | |
* All products in one page | |
* | |
* Display all products in a table with their add to cart button. | |
* Usage : [all_products] to display all products. | |
* Usage : [all_products category="singles"] to display products under "singles" category (slug). | |
*/ |
/** | |
* Zerif Lite version 1.8.2.9 | |
*/ | |
add_filter('get_the_excerpt', 'zerif_add_read_more_link'); | |
function zerif_add_read_more_link($post_excerpt){ | |
global $post; | |
if(strstr($post->post_content,'<!--more-->')) { | |
$more_link = ' <a class="more-link" href="'.esc_attr(get_permalink($post->ID) . "#more-{$post->ID}").'">'.__('Continue reading', 'zerif-lite').'</a>'; |
Simple explanation of how to add a map to a website using Google Maps API v3
Forked from Enrique Moreno Tent's Pen Google Maps API v3 - Basic Map.
A Pen by Kharis Sulistiyono on CodePen.
<?php | |
/** | |
* Extending query parameter of product shortcode | |
*/ | |
add_filter('woocommerce_shortcode_products_query', 'my_wc_shortcode_product_query_args', 10, 2); | |
function my_wc_shortcode_product_query_args($args, $atts){ | |
if ( isset( $atts['item'] ) ) { |
<?php | |
add_filter('woocommerce_get_availability', 'my_availability_message', 10, 2); | |
function my_availability_message($args, $product){ | |
$args = array( | |
'availability' => __('Always Available', 'textdomain'), | |
'class' => 'always-available' | |
); |
<?php | |
add_action( 'woocommerce_product_query', 'my_custom_query_by_author', 10, 2 ); | |
function my_custom_query_by_author($q, $product){ | |
$author = $_GET['creator']; // Author ID param | |
if( isset($author) && $author != '' ){ | |
$q->set('author', $author); | |
} |