Skip to content

Instantly share code, notes, and snippets.

View wesellhost's full-sized avatar
🎯
Focusing

wesellhost wesellhost

🎯
Focusing
View GitHub Profile
<!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">
@wesellhost
wesellhost / add-wordpress-settings-page.php
Created July 11, 2019 13:59 — forked from DavidWells/add-wordpress-settings-page.php
WordPress :: Add Settings Page with All Fields
<?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
@wesellhost
wesellhost / wp-bootstrap4.1-pagination.php
Created August 25, 2019 00:58 — forked from mtx-z/wp-bootstrap4.4-pagination.php
Wordpress Bootstrap 4.1 pagination (with custom WP_Query() and global $wp_query support)
<?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
@wesellhost
wesellhost / loop-products-woocommerce.php
Created October 2, 2019 16:31 — forked from eliasfaical/loop-products-woocommerce.php
Sample products loop - Woocommerce
<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 );
@wesellhost
wesellhost / index.php
Created October 2, 2019 16:56 — forked from mehedicsit/index.php
woocommerce custom loop with
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 ?
@wesellhost
wesellhost / functions.php
Created March 1, 2020 08:17 — forked from barbwiredmedia/functions.php
Wordpress SEO Yoast Order meta box. This will change the priority of Yoasts meta box and move it to the bottom of all pages / posts.
// Move Yoast Meta Box to bottom
function yoasttobottom() {
return 'low';
}
add_filter( 'wpseo_metabox_prio', 'yoasttobottom');