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 | |
global $post; | |
$args = array( 'posts_per_page' => 10, 'post_type'=> 'custom-post-type' ); | |
$myposts = get_posts( $args ); | |
foreach( $myposts as $post ) : setup_postdata($post); ?> | |
<?php | |
$job_link= get_post_meta($post->ID, 'job_instructions', 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 | |
/** | |
* Switch between 3-column and 4-column layout grid | |
*/ | |
add_filter( 'wpsight_layout', 'wpsight_custom_layout', 11 ); | |
function wpsight_custom_layout( $layout ) { | |
if( $layout == 'three' ) | |
return 'four'; | |
return 'three'; | |
} |
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
http://www.remicorson.com/mastering-woocommerce-products-custom-fields/#comment-14347 | |
// Display Fields | |
add_action( 'woocommerce_product_options_general_product_data', 'woo_add_custom_general_fields' ); | |
// Save Fields | |
add_action( 'woocommerce_process_product_meta', 'woo_add_custom_general_fields_save' ); | |
function woo_add_custom_general_fields() { | |
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 | |
---------------------------------------------------------- | |
For style css | |
/* | |
Theme Name: Payra TV | |
Theme URI: http://www.payratv.com | |
Author: Humayun Kabir | |
Author URI: http://www.hkfolio.com/ | |
Description: This theme created for payratv. |
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
http://docs.woothemes.com/documentation/plugins/woocommerce/ All documentation is here | |
http://fuyuko.net/woocommerce-cheat-sheet-single-product-page/ | |
<?php | |
http://docs.woothemes.com/document/editing-product-data-tabs/ | |
=================================================================================== | |
http://code.tutsplus.com/articles/an-introduction-to-theming-woocommerce-for-wordpress--wp-31577 | |
Disabling the Default Stylesheet and Starting From Scratch | |
//code to your themes functions.php | |
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
https://docs.woothemes.com/document/shipping-method-api/ | |
<?php | |
/* | |
Plugin Name: Your Shipping plugin | |
Plugin URI: http://woothemes.com/woocommerce | |
Description: Your shipping method plugin | |
Version: 1.0.0 | |
Author: WooThemes | |
Author URI: http://woothemes.com | |
*/ |
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 | |
/** | |
* This code shows pagination for WooCommerce shortcodes when it's embeded on single pages. | |
* Include into functions.php. | |
*/ | |
if ( ! is_admin() ) { | |
// ---------------------- FRONTPAGE ------------------- | |
if ( defined('WC_VERSION') ) { |
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
// front end | |
function custom_front_scripts() { | |
wp_enqueue_style( 'front-css', plugins_url('/lib/css/front-css.css', __FILE__), array(), null, 'all' ); | |
wp_enqueue_script( 'front-init', plugins_url('/lib/js/front.init.js', __FILE__) , array('jquery'), null, true ); | |
} | |
add_action('wp_enqueue_scripts', 'custom_front_scripts' ); | |
// back end | |
function custom_admin_scripts() { |
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 | |
//Display Fields | |
add_action( 'woocommerce_product_after_variable_attributes', 'variable_fields', 10, 3 ); | |
//JS to add fields for new variations | |
add_action( 'woocommerce_product_after_variable_attributes_js', 'variable_fields_js' ); | |
//Save variation fields | |
add_action( 'woocommerce_process_product_meta_variable', 'save_variable_fields', 10, 1 ); | |
/** |
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
add_filter( 'woocommerce_currencies', 'add_my_currency' ); | |
function add_my_currency( $currencies ) { | |
$currencies['ABC'] = __( 'Currency name', 'woocommerce' ); | |
return $currencies; | |
} | |
add_filter('woocommerce_currency_symbol', 'add_my_currency_symbol', 10, 2); | |
function add_my_currency_symbol( $currency_symbol, $currency ) { |
OlderNewer