dimanche 3 janvier 2016

Moving Short Description in Woo Commerce

I've hunted everywhere to figure out how to move the Product Short Description from the right side of the picture on a Single Product page of Woocommerce into the tabs. I just can't find it anywhere!

Can someone please help me accomplish that.



via Chebli Mohamed

Order shipped by which driver[hook for woocoomerce order staus changed and popup in admin panel ]

Hi is it possible to make an extra field in backend, when orders are selected and marked as shipped then an extra field come and where i can select drivers who are responsible for this shipped order .Is that possible? is there any hook available ?

http://ift.tt/1aEdeLe

Shipped is a custom order status we created.

my need is when a order marked as shipped then need to appear extra input text or select box where i can select driver name**(user with role is driver )** and save it .

Can i do it using wc_order_statuses filter ? please help to do this .

i know about custom post meta and it's working .But i want to update the value only when order status changed to shipped . Is there any hook available for this .When my staff marked 5,6 order marked as shipped in bulk edit section then a popup need to appear and it say select driver,. How to do this



via Chebli Mohamed

samedi 2 janvier 2016

How to print only meta tags using wp_head() function in Wordpress

I'm looking for a way to print only meta tags using wp_head(), without all other tags which comes within calling wp_head().



via Chebli Mohamed

Wordpress Plugin Boilerplate (Structure of Plugin) - Custom Post Types, Meta Boxes and Saving Meta Info?

I just got a hang of writing my first plug-in. It consist of two custom post types, with two different types of custom meta boxes attached to them. I got the saving of that working and even a function for a shortcode and displaying it on the front end.

But it all turned out really messy, so I decided to rewrite it. I came over something called "WordPress Plugin Boilerplate" which did seem pretty popular. But I just can't understand where I should put everything.

http://ift.tt/1EN4kHZ

Could anyone explain to me where I should play for example, custom post type, add meta box, saving that meta box info etc.

IF NOT maybe someone has a good summary on good plugin structure?



via Chebli Mohamed

vendredi 1 janvier 2016

Remove title from custom post type edit screen

How can I apply the remove_post_type_support('email_template', 'title'); only for post edit screen?

The title should be available on create and not for edit.



via Chebli Mohamed

Wordpress shortcode not working in twig page template

I'm using Gantry5 framework (with the g5_hydrogen theme) and I created a twig page template which works fine, except the shortcode for the Contact Form 7 plugin apparently does nothing - the form does not display on the page, and when I inspect the element in my browser I just see some blank space between the div tags. My current markup is something like this:

{% block content %}
  <content>
    <div class="dbc-contact-form">
      {{ wp.do_shortcode('[contact-form-7 id="1234" title="Contact"]') }}  
    </div>
  </content>
{% endblock %}

Someone else posted a similar question before, but unfortunately that solution doesn't help in my case - Wordpress twig template shortcode not displayed

Thanks for your help with this.



via Chebli Mohamed

How can I get the id of a product that generates Woocommerce add to cart message?

I'm trying to display multiple items (each with their own add to card button) on a single page; so that the buyer can add items to cart without going to an individual page.

I need to have the add to cart message displayed in the individual product's container. I am using wc_print_notices() call inside the price section of the loop for each product, but this only puts the message inside the first product instead of the one that triggered it.

Is there a way to check which product id generates the $message string? so that I might do some sort of if statement to call wc_print_notices() based on which add to cart button triggered it?



via Chebli Mohamed