This file contains hidden or 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 lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>Keep Last Selected Bootstrap Tab Active on Page Refresh</title> | |
| <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> | |
| <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> | |
| <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> | |
| <script type="text/javascript"> | |
| $(document).ready(function(){ |
This file contains hidden or 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 popular post*/ | |
| /* set the post view count*/ | |
| function wpb_set_post_views($postID) { | |
| $count_key = 'wpb_post_views_count'; | |
| $count = get_post_meta($postID, $count_key, true); | |
| if($count==''){ | |
| $count = 0; | |
| delete_post_meta($postID, $count_key); |
This file contains hidden or 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 | |
| /** | |
| * Template Name: Search1 | |
| */ | |
| get_header(); ?> | |
| <form id="searchform" action="" method="get"> | |
| <input class="" type="text" name="serchprm" id="searchinput" placeholder="Search"> |
This file contains hidden or 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 class="row"> | |
| <div class="form-group col-md-12 custom-form"> | |
| [text* name id:name class:form-control placeholder "Your Name"] | |
| </div> | |
| <div class="form-group col-md-12 custom-form"> | |
| [email* email id:email class:form-control placeholder "Your E-mail"] | |
| </div> | |
| <div class="form-group col-md-12 custom-form"> |
This file contains hidden or 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 | |
| <style type="text/css"> | |
| select.sts_width { | |
| width: 75%; | |
| } | |
| .loader{ | |
| display: none; | |
| } | |
| /* Pagination links */ | |
| .pagination a { |
This file contains hidden or 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 | |
| function wishlist_check(){ | |
| if(!is_user_logged_in()){ | |
| echo '<a class="woo-login-popup-sc-open">Login</a>'; | |
| } | |
| } | |
| add_action('woocommerce_single_product_summary','wishlist_check',30); |
This file contains hidden or 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 | |
| function patricks_woocommerce_catalog_orderby( $orderby ) { | |
| unset($orderby["menu_order"]); | |
| unset($orderby["popularity"]); | |
| unset($orderby["rating"]); | |
| return $orderby; | |
| } | |
| add_filter( "woocommerce_catalog_orderby", "patricks_woocommerce_catalog_orderby", 20 ); | |
| function patricks_woocommerce_catalog_orderby1( $orderby ) { | |
| $orderby["date"] = __('Sort by date: newest to oldest', 'woocommerce'); |
This file contains hidden or 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 | |
| function wpb_woo_endpoint_title( $title, $id ) { | |
| if ( is_wc_endpoint_url( 'edit-address' ) && in_the_loop() ) { // add your endpoint urls | |
| $title = "Address Book"; // change your entry-title | |
| } | |
| elseif ( is_wc_endpoint_url( 'orders' ) && in_the_loop() ) { | |
| $title = "My Orders"; | |
| } | |
| elseif ( is_wc_endpoint_url( 'edit-account' ) && in_the_loop() ) { | |
| $title = "Account Information"; |
This file contains hidden or 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 | |
| //modification of navigation menu on my account page | |
| // Note the low hook priority, this should give to your other plugins the time to add their own items... | |
| add_filter( 'woocommerce_account_menu_items', 'add_my_menu_items', 99, 1 ); | |
| function add_my_menu_items( $items ) { | |
| $my_items = array( | |
| // endpoint => label | |
| 'edit-account' => __( 'Account Information', 'my_plugin' ), | |
| 'orders' => __( 'My Orders', 'my_plugin' ), | |
| 'wishlist' => __( 'My Wishlist', 'my_plugin' ), |
This file contains hidden or 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 | |
| /* woocommerce customization*/ | |
| add_filter( 'woocommerce_show_page_title' , 'woo_hide_page_title' ); | |
| function woo_hide_page_title() { | |
| return false; | |
| } | |
| remove_action( 'woocommerce_before_shop_loop', 'woocommerce_result_count', 20 ); | |
| //remove the sale flush | |
| remove_action('woocommerce_before_shop_loop_item_title','woocommerce_show_product_loop_sale_flash',10); | |
| //add the custom icon div after thumbnail |