featured

Get WooCommerce featured products in a WP_Query

三世轮回 提交于 2020-08-04 04:02:23
问题 I updated WooCommerce to version 3.0 but I can't show the featured products on my theme, I googled a while and get WC deleted the _feature and add this in taxonomy. But I don't understand so much how my theme get the featured products. Here is the code of the wrong featured productcs. $meta_query = WC()->query->get_meta_query(); $meta_query[] = array( 'key' => '_featured', 'value' => 'yes' ); $args = array( 'post_type' => 'product', 'post_status' => 'publish', 'ignore_sticky_posts' => 1,

Return wordpress post featured images using Fishpig in Magento

限于喜欢 提交于 2019-12-12 04:11:09
问题 Im trying to get two of the latest posts from Wordpress that include featured images. Need to get the post title, content (character limited) and the featured image. I have this so far, all that is missing is the featured image. <div class="block block-blog block-recent-posts"> <?php $resource = Mage::getSingleton('core/resource'); $readConnection = $resource->getConnection('core_read'); $query = "SELECT `id`, `post_title`,`post_name` ,`post_content`, `comment_count` FROM `wp_posts` WHERE

Get featured products in Woocommerce 3

放肆的年华 提交于 2019-12-08 05:12:58
问题 I want to add Featured products for upsell (or Recent Products OR Best Selling Products) in New order Email template. It works like Upsell with email marketing. How do I add it to woocommerce email template so that there is a section in the end of the email which shows my featured/Recent/best selling products. I tried using this code in my New order Email template but nothing works. I use all latest version of wordpress n woocommerce. $args = array( 'post_type' => 'product', 'meta_key' => '

Joomla 3.2.3 featured article ordering

吃可爱长大的小学妹 提交于 2019-12-07 07:32:56
问题 In Joomla 3.2.3 i can not make the article orders like in J 1.5.x , i want to make the frontpage article ordering like what i define at administrator area. I try several ways and still do not have any success, 1 weeks already ... :( The last i tried is this : a) Content => Featured Article => (at top right) sort table by "Ordering Descending" b) I moved the article in the order i want, then click at "Double arrow" to save it c) Then i click at "Options" (right top), it will open the Global

Joomla 3.2.3 featured article ordering

徘徊边缘 提交于 2019-12-05 09:21:49
In Joomla 3.2.3 i can not make the article orders like in J 1.5.x , i want to make the frontpage article ordering like what i define at administrator area. I try several ways and still do not have any success, 1 weeks already ... :( The last i tried is this : a) Content => Featured Article => (at top right) sort table by "Ordering Descending" b) I moved the article in the order i want, then click at "Double arrow" to save it c) Then i click at "Options" (right top), it will open the Global configuration -> Article page. +) Then i click at "Category" => Choose Layout = Blog, +) "Blog/Featured

Require authors to set featured image for post

ε祈祈猫儿з 提交于 2019-11-30 22:03:54
I have customised my Wordpress site design to use the featured image for posts quite excessively. This is why I need to require all post made by non-admins to require a set featured image. How is this possible? Gary You need to hook the Publish Action in a custom PlugIn you write. Although this is to require a title, this should get you started, you just need to check if a featured image was assigned. add_action( 'pre_post_update', 'bawdp_dont_publish' ); function bawdp_dont_publish() { global $post; if ( strlen( $post->title ) < 10 ) { wp_die( 'The title of your post have to be 10 or more !'

Require authors to set featured image for post

懵懂的女人 提交于 2019-11-30 17:46:08
问题 I have customised my Wordpress site design to use the featured image for posts quite excessively. This is why I need to require all post made by non-admins to require a set featured image. How is this possible? 回答1: You need to hook the Publish Action in a custom PlugIn you write. Although this is to require a title, this should get you started, you just need to check if a featured image was assigned. add_action( 'pre_post_update', 'bawdp_dont_publish' ); function bawdp_dont_publish() {