How to make WordPress orderby work with post_excerpt column?

I edited the wp_playlist_shortcode function at \wp-includes\media.php WP core file, by adding if ($atts[‘orderby’]==’excerpt’ || $atts[‘orderby’]==’post_excerpt’) { function cmp($a, $b) { return strcmp($a[“caption”], $b[“caption”])*(-1); } usort($tracks, “cmp”); } before $data[‘tracks’] = $tracks; line. Basically after all tracks are generated into the $tracks array and before this array is passed to the final array $data, I … Read more

Admin New Order: Autofocus on Search a product

This is a Backbone modal, wc-modal-add-products, defined in html-order-items.php and triggered by meta-boxes-order.js. You say you’ve marked the field autofocus. This StackOverflow answer proposed adding an onRender handler to the modal that finds autofocus and selects it: $(this.el).find(‘:input[autofocus]’).focus(); I don’t know where the best place to put this is, but if you find the WCBackboneModal … Read more

Woocommerce Pre Orders view order link wrong [closed]

<td class=”order-number” width=”1%”> <a href=”https://wordpress.stackexchange.com/questions/190318/<?php echo wc_get_endpoint_url(“view-order’, $order->id, wc_get_page_permalink( ‘myaccount’ ) ); ?>”> <?php echo $order->get_order_number(); ?></a> </td>; this should solve your problem. But I am not sure which template your are modifying, but fool proof way is only possible with child theme (functionality plugin will be complex for your needs). https://support.woothemes.com/hc/en-us/articles/203105897-How-to-set-up-and-use-a-child-theme http://docs.woothemes.com/document/template-structure/ both of … Read more

Add post order like page order

I find it: add_action( ‘admin_init’, ‘posts_order’ ); function posts_order() { add_post_type_support( ‘post’, ‘page-attributes’ ); }

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)