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
<!DOCTYPE HTML > | |
<html> | |
<head> | |
<!-- HEAD Elements --> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>Page Title</title> | |
<meta http-equiv="Content-Security-Policy" content="default-src 'self'"> | |
<meta name="application-name" content="Application Name"> |
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 | |
/* | |
Plugin Name: Homepage Settings for BigBang | |
Plugin URI: http://www.inboundnow.com/ | |
Description: Adds additional functionality to the big bang theme. | |
Author: David Wells | |
Author URI: http://www.inboundnow.com | |
*/ | |
// Specify Hooks/Filters |
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 | |
/** | |
* @param WP_Query|null $wp_query | |
* @param bool $echo | |
* | |
* @return string | |
* Accepts a WP_Query instance to build pagination (for custom wp_query()), | |
* or nothing to use the current global $wp_query (eg: taxonomy term page) | |
* - Tested on WP 4.9.5 |
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
<ul class="products"> | |
<?php | |
$args = array( 'post_type' => 'product', 'posts_per_page' => 1, 'product_cat' => 'camisa' ); | |
$loop = new WP_Query( $args ); | |
while ( $loop->have_posts() ) : $loop->the_post(); global $product; ?> | |
<h2>Shoes</h2> | |
<li class="product"> | |
<a href="<?php echo get_permalink( $loop->post->ID ) ?>" title="<?php echo esc_attr($loop->post->post_title ? $loop->post->post_title : $loop->post->ID); ?>"> | |
<?php | |
woocommerce_show_product_sale_flash( $post, $product ); |
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 | |
//show wordpress site title | |
bloginfo( 'name' ); | |
//show wordpress homepage url and support multi language | |
echo esc_url( home_url( '/' ) ); | |
//page or post title | |
the_title(); | |
//show the content of page or post | |
the_content(); // should be inside loop | |
//post thumbnail into src |
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
I have made the necessary changes for the code to work. Make sure woocommerce add-to-cart.js or add-to-cart.min.js is enqueued in the page. | |
<div class="all_content_shop"> | |
<?php wc_print_notices(); ?> | |
<?php $new_posts = new WP_Query( array( | |
'post_type' => 'product', //post of page of my post type | |
'cat' => 0, // category id, 0 for all categories. | |
'posts_per_page' => 12, | |
'offset' => 0, //how many posts you want to eliminate from the query | |
'orderby' => '', // order by title or date ? |
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
// Move Yoast Meta Box to bottom | |
function yoasttobottom() { | |
return 'low'; | |
} | |
add_filter( 'wpseo_metabox_prio', 'yoasttobottom'); |