WooCommerce Checkout page customization [closed]

To add the product image to the checkout review order page, you want to add the following into your functions.php file of your theme. function my_add_order_review_product_image( $product, $product_obj ) { $image = wp_get_attachment_image( get_post_thumbnail_id( $product_obj->post->ID ), ‘shop_thumbnail’ ); return $image . $product; } add_filter( ‘woocommerce_checkout_product_title’, ‘my_add_order_review_product_image’, 10, 2 ); This is utilizing the filter hook … Read more

Save metabox checkboxes values to custom content type

I have rethought the problem: Finally, I resolve it with save_post hook: function enhanced_portfolio_categories_save_post(){ $terminos = array(); foreach ($_POST[‘my_categories’] as $key) { $custom_tax = get_term_by(‘term_id’, $key, ‘portfolio_categories’); array_push($terminos, $custom_tax->term_id); } wp_set_object_terms( $_POST[‘post_ID’], $terminos, ‘portfolio_categories’); }

Extend walker – navigation, adding data attribute to a tag

This is how I added data attribute to my menu It simply adds data-title=”menu-title” to each link on my main nav, change it to adapt to your need. You don’t actually need to use Nav Walker to add this add_filter( ‘nav_menu_link_attributes’, ‘cfw_add_data_atts_to_nav’, 10, 4 ); function cfw_add_data_atts_to_nav( $atts, $item, $args ) { $atts[‘data-title’] = $item->post_title; … Read more

How to show only Standard Format post in my custom taxonomy page -wordpress 3.8.1

Looking at your comment, photos and videos aren’t custom post types but actually categories. I’m changing my answer to reflect your comment. You can use pre_get_posts to exclude specific categories in your loop. You can achieve that with $query->set( ‘cat=-1,-2,-3′ ); This will exclude categories with ID’s 1, 2 and 3, and will only show … Read more

Show One Category on Post

Thank you for your question. Try using the following code. <?php $categories = get_the_category(); if($categories[0]) { $url = get_term_link((int)$categories[0]->term_id,’category’); $temp = “<dt><h1>{$categories[0]->name}</h1> </dt><dd>{$categories[0]->category_description}</dd>”; echo “<dl>\n” . $temp . “\n</dl>”; } ?> Best Regards, Vinod Dalvi

get_the_term_list without specific category

I believe that what you want is to exclude a term. It is odd that such is not an option with that function but you can use a filter on get_the_terms: function exclude_my_term($terms, $post, $taxonomy) { remove_filter(‘get_the_terms’,’exclude_my_term’,10,3); unset($terms[123]); // where 123 is the ID of the term to exclude return $terms; } add_filter(‘get_the_terms’,’exclude_my_term’,10,3); You probably … Read more