Woocommerce product admin category persistence

Can be a long task to edit products within woocommerce.

the code below can be integrated in a plugin or within your theme : it will store the last selected product  category filter in the product admin and restore it at next display of product page

add_filter( 'init', 'wpse34956_persistent_posts_list_mode' ,1);
function wpse34956_persistent_posts_list_mode() {

// take into account post types that support excerpts
$post_type = isset( $_GET['post_type'] ) ? $_GET['post_type'] : '';

if (is_admin() && $post_type=="product")
if ( isset( $_GET['product_cat'] ) ) {
// save the list mode
update_user_meta( get_current_user_id(), 'product_cat' . $post_type, $_GET['product_cat'] );

// retrieve the list mode
if ( $product_cat = get_user_meta( get_current_user_id(), 'product_cat' . $post_type, true ) )
{ $_GET['product_cat'] = $product_cat;}


WordPress drag and drop content management : plugin comparison

I have tested and used Visual Composer for many sites : very efficient drag and drop responsive content manager that integrates within the wordpress page editing screen. Only drawback of this kind of system is that it forces you to use fixed column size : you have the choice of divisions of page, like most responsive grid systems, so you have to accomodate the 1/2, 1/3, 1/4 parts of your page.

On the other hand most of the plugins I've tested  only works from the backend :  first solution below  work from the front end and it's better to visually understand what's going on depending on your layout width. But let's look deeper.

  • WordPress Front end builder incorporates front end editing and mobile / tablet screen display picker which looks like it works with media queries.The row management interface is very intuitive and allows for various content width configuration. wordpress-layout-rows



  • MiniMax Layout Builder  has very slick backend integration, same style as visual composer, with column layout picker for each row :
    • unlike visual composer, Minimax sits within the tinymce framework and as such it is good because it does not surcharge your screen but has the drawback of limiting the editing height to the initial height of the editor. You can have multiple elements in a single column, as illustrated below. Another drawback I found in the demo is the image uploader, old type (pre wordpress 3.5) - Developers can get more technical info on how to  integrate recent wordpress media manager  on shibashake.com
    • Like visual composer, minimax has some sort of templating recording but not as good because it is implemented in the form of locally stored text files



wordpress drag and drop form makers : gravity forms vs ninja forms

I've been using gravity forms for years and have been able to implement many user driven web sites. Now a free competitor to gravity forms has arrived, it's pretty mature and extremely popular (more than 100K downloads on wordpress.com  : enter NINJA FORMS !

  • Gravity forms comes at the price of 39$ per site. Ninja forms is ...free in its full version but a lot of features come as priceable plugins.
  • Ninja forms is very similar to gravity forms:  it features a drag and drop interface for building form fields. But I prefer gravity forms interface, which  is more clear, easier to understand and is more effective at displaying the form parameters.
  • In my case I want to perform user front end post submission : in gravity forms  that's native, with ninja forms you'll have to purchase the front end posting extension at the cost of 39$. Advantage goes to gravity forms who has file upload feature in its native form, whereas ninja forms will cost you another 29$ to get file upload extension
    Note : another form plugin does front end user submission and response editing, formidable pro, at the price of 47$ .
  • entry management is very good in both gravity forms and ninja forms. Gravity forms has a very good interface to let you choose which columns are displayed. Shame the entry date is not selected by default, but overall this feature is better implemented in gravity forms too

Conclusion : I know ninja form is free but extended features will go cheaper with gravity forms

updating wordpress svn with a mac

there is a very good document on doing SVN client on mac on this site "zigpress", but if you choose the command line tools option, you might encounter some tricky errors that took me a few hours to solve : when doing a diff on my wordpress event plugin after installing the command line option on my MAC OS 10.8.4 and specifiying the usr bin folder in the svnx preferences as illustrated below, I got the following errors


  • "svnx xcode-select filemerge no xcode folder is set"
    Answer  : in my case the solution was to use the  xcode-select tool to specify the usr bin folder : sudo xcode-select -switch /usr/bin
  • after sorting the stuff I tried the diff and the default diff tool, even though present in usr/bin, does not work :
    "xcrun: Error: failed to exec real xcrun. (No such file or directory)"
    Solution  : do as indicated on the zigpress : download and use textwrangler diff feature