wordpress

Wordpress multiple template for same category with different custom post type

时光怂恿深爱的人放手 提交于 2021-02-11 15:36:10
问题 I have this structure for my Wordpress site : Custom post type 1 Category a Term a-1 Term a-2 ... Custom post type 2 Category a (same category than CPT 1) Term a-1 Term a-2 ... I would like to have different template for "Category a" archive page and single term page depending of current post type. How can I achieve this? In other words, I want these URLs each have their own template : http://www.example.com/custom-post-type-1/category-a/ http://www.example.com/custom-post-type-1/category-a

Wordpress multiple template for same category with different custom post type

不问归期 提交于 2021-02-11 15:34:24
问题 I have this structure for my Wordpress site : Custom post type 1 Category a Term a-1 Term a-2 ... Custom post type 2 Category a (same category than CPT 1) Term a-1 Term a-2 ... I would like to have different template for "Category a" archive page and single term page depending of current post type. How can I achieve this? In other words, I want these URLs each have their own template : http://www.example.com/custom-post-type-1/category-a/ http://www.example.com/custom-post-type-1/category-a

Shipping calculator Button at Checkout page

帅比萌擦擦* 提交于 2021-02-11 15:24:57
问题 I am new to woocommerce and I do not have much knowledge about that. In a project I want to hide shipping calculation button from cart page.but want to show the same configuration with button on checkout page. I want help regarding how to add shipping button on checkout. 回答1: Go to WooCommerce->Settings->Shipping->Shipping Options and make sure you have unchecked 'Enable the shipping calculator on the cart page'. 回答2: All the woocommerce files needs to be overridden by copying that file into

How to overlay an image over embedded video?

最后都变了- 提交于 2021-02-11 15:19:28
问题 I'm looking put put some text over google drive embedded player (using iframe) CSS & HTML: #over { position: absolute; top: 0px; left: 0px; background-color: #FF0000; height: 30px; } <div> <div id="over">This is Preview</div> <iframe src="https://docs.google.com/file/d/0B5GSymfNadlIV1NJRFpITWJLNHc/preview" width="640" height="480"></iframe> </div> But the text is not overlaying the video player on my site. I'm working on wordpress mh-joylite theme. Please suggest me, point my mistakes. 回答1:

Can we create a category list page in WordPress?

空扰寡人 提交于 2021-02-11 14:42:58
问题 I am working on a category. I have to show all the category list on-page. So I tried the below code and it's working. I am getting my all the category list. Below is the output of my category list My question is, Where I go and add the category list code? I have to access the URL like http://test.com/category/ so it will display my category list. I created the category.php page but that page is displaying the post with the related category. For example http://test.com/category/destination so

how to add shipping cost with product actual price?

时间秒杀一切 提交于 2021-02-11 14:21:46
问题 I am using woocommerce plugin v2.2.8 for my eCommerce site. I am using weight based shipping method. Is there is any possibility to add shipping cost with products actual price which is displaying in product page? For Eg.. Product1 = Rs 800/- & shipping cost of this product is Rs 50/- Product1 price in shop page should be displayed as Rs 850/- (Actual price + shipping cost) Note: shipping cost calculated from weight based shipping method. Is this possible? Any idea regarding this??? 回答1:

WooCommerce sort all products by sale percentage including variable products

时间秒杀一切 提交于 2021-02-11 14:02:34
问题 I have the following function which adds a custom sort by discount amount: add_filter( 'woocommerce_get_catalog_ordering_args', 'wcs_get_catalog_ordering_args' ); function wcs_get_catalog_ordering_args( $args ) { $orderby_value = isset( $_GET['orderby'] ) ? woocommerce_clean( $_GET['orderby'] ) : apply_filters( 'woocommerce_default_catalog_orderby', get_option( 'woocommerce_default_catalog_orderby' ) ); if ( 'on_sale' == $orderby_value ) { $args['orderby'] = 'meta_value_num'; $args['order'] =

Display custom order meta data value in email notifications WooCommerce

柔情痞子 提交于 2021-02-11 14:02:29
问题 Based on the following code Add a custom checkbox in WooCommerce checkout which value shows in admin edit order I tried to add my_field_name to order confirmation email. As I understand I have to use woocommerce_email_customer_details . So I came to this solution, unfortunately without the desired result. add_action('woocommerce_email_customer_details','woocommerce_email_order_invoice_number', 28, 4 ); function woocommerce_email_order_invoice_number( $order, $sent_to_admin, $plain_text,

Can I make a section of a responsive WordPress site NOT responsive?

放肆的年华 提交于 2021-02-11 14:01:09
问题 I have a WordPress site that is fully responsive which I love-- but one of the pages is a list of songs that are in 2 columns. It looks really messed up on mobile devices so I was wondering if there are tags or something I can put around the code just for the songs so that only that section would NOT be responsive and just shrink in proportion with other devices. See screenshot. Sometimes I think non-responsive sites look better. This one is fine except for the Music page. I just don't like

Issue with Post Object Timber/Twig WordPress

♀尐吖头ヾ 提交于 2021-02-11 13:54:07
问题 I have an ACF field, It's a Repeater, and inside the Repeater is a Post Object. Controller /* Template Name: Strategic Partners */ use Timber\Timber; use Timber\PostQuery; use Flynt\Utils\Options; use const Flynt\Archives\POST_TYPES; $context = Timber::get_context(); $context['slider'] = get_field('slider'); $context['featured'] = get_field('featured'); if (isset($_GET['contentOnly'])) { $context['contentOnly'] = true; } Timber::render('templates/StrategicPartners/index.twig', $context); Here