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 | |
/** | |
* Custom Loop Add to Cart. | |
* | |
* Template with quantity and ajax. | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly. | |
global $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
/** | |
* Set a custom add to cart URL to redirect to | |
* @return string | |
*/ | |
function custom_add_to_cart_redirect() { | |
return 'http://www.yourdomain.com/your-page/'; | |
} | |
add_filter( 'woocommerce_add_to_cart_redirect', 'custom_add_to_cart_redirect' ); |
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---------------------------- | |
3ti file lagbe | |
1. multi-post-thumbnails.php | |
2. multi-post-thumbnails-admin.js | |
3. media-modal.js | |
file 3ti functions.php te call korte hobe | |
functions.php te nicher code bosbe | |
add_image_size( 'secondary-image', 300, 156, 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
// Collect from Trizzy wordpress theme | |
<?php global $woocommerce; ?> | |
<div id="cart"> | |
<!-- Button --> | |
<div class="cart-btn"> | |
<a href="#" class="button adc"><?php echo WC()->cart->get_cart_subtotal(); ?></a> | |
</div> | |
<div class="cart-list"> | |
<div class="arrow"></div> |
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 | |
/** | |
* start the customisation | |
*/ | |
function custom_woo_before_shop_link() { | |
add_filter('woocommerce_loop_add_to_cart_link', 'custom_woo_loop_add_to_cart_link', 10, 2); | |
add_action('woocommerce_after_shop_loop', 'custom_woo_after_shop_loop'); | |
} | |
add_action('woocommerce_before_shop_loop', 'custom_woo_before_shop_link'); |
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
// Edit order items table template defaults | |
// https://www.sellwithwp.com/how-to-add-information-to-woocommerce-emails/ | |
function sww_add_wc_order_email_images( $table, $order ) { | |
ob_start(); | |
$template = $plain_text ? 'emails/plain/email-order-items.php' : 'emails/email-order-items.php'; | |
wc_get_template( $template, array( | |
'order' => $order, | |
'items' => $order->get_items(), |
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 | |
/** | |
* OptionTree Theme version | |
*/ | |
define( 'OT_THEME_VERSION', '2.5.4' ); | |
/** | |
* Register Theme Features | |
*/ | |
function option_tree_theme_setup() { |
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://wordpress.stackexchange.com/questions/192451/dynamic-bootstrap-tabs-with-post-title-doesnt-display-the-content?lq=1 | |
<div id="tab"> | |
<ul class="nav nav-tabs" role="tablist"> | |
<?php $loop = new WP_Query( array( 'post_type' => 'candidates', 'posts_per_page' => -1 ) ); ?> | |
<?php | |
$counter = 0; | |
while ( $loop->have_posts() ) : $loop->the_post(); | |
$counter++; | |
?> | |
<li role="presentation" class="post-<?php the_ID(); ?> <?=($counter == 1) ? 'active' : ''?>"><a href="#post-<?php the_ID(); ?>" aria-controls="home" role="tab" data-toggle="tab"><?php the_title();?></a></li> |
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
<div id="carousel-example-generic" class="carousel slide" data-ride="carousel"> | |
<ol class="carousel-indicators"> | |
<?php | |
$args = array( | |
'post_type' => 'slides1', | |
'orderby' => 'menu_order title', | |
'order' => 'ASC', | |
); | |
$query = new WP_Query( $args ); |
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
// Carousel Active Class | |
jQuery(document).ready(function ($) { | |
$(".carousel-inner .item:first-child").addClass("active"); | |
}); |