wordpress-plugin

Visual Composer Grid with do_action shortcode is not working

泄露秘密 提交于 2019-12-01 04:32:48
I have visual composer which is packed with total theme. When I put the following grid short code in my page in the editor it works correctly. [vc_basic_grid post_type="post_type" max_items="10" item="masonryGrid_SlideFromLeft" grid_id="vc_gid:1458178666639-80ebf3775500c87d35de078c3422fe96-10" taxonomies="555"] However, when I call the exact same code using do_action it gives the following javascript error. I checked the html output and it is the same using do_action like putting the short code in editor. Error: Syntax error, unrecognized expression: {'status':'Nothing found'} s Any help is

How to remove Disqus reaction from the counter?

拜拜、爱过 提交于 2019-12-01 03:12:34
Two questions for Stackoverflow ninjas: I have a blog using Disqus. However, the theme I'm using do not have space to have the 'Reactions' (# of Twitters), just have the space for the numbers of the Comments. OK, Basically I do not have space enough to stay with this 'Reactions' provided for Disqus. Does anyone knows how could I remove just the 'Reactions" counts from Disqus? The new Disqus put a box with "Your site is using the new Disqus. Check the Disqus 2012 F.A.Q. or visit our support page for help." message and I would love to remove it. Does anyone knows how to do it? Edit 2: We've made

show product meta in order items table in Order Details

余生长醉 提交于 2019-12-01 01:41:56
I need to add custom column for order items and show specific product meta in this column. I mean something like image below, I can't find any action from woocommerce to add this column! You can use the following code: // Add custom column headers here add_action('woocommerce_admin_order_item_headers', 'my_woocommerce_admin_order_item_headers'); function my_woocommerce_admin_order_item_headers() { // set the column name $column_name = 'Test Column'; // display the column name echo '<th>' . $column_name . '</th>'; } // Add custom column values here add_action('woocommerce_admin_order_item

WooCommerce: Cart price override with text

倖福魔咒の 提交于 2019-11-30 22:10:34
We have a bunch of products with either: No price Zero price We made them purchasable with the built-in hook but the cart still displays them as having a 0 price during checkout. We'd like the cart & checkout summary to display "Special order" or any other text, but it seems WooCommerce invalidates text-based prices. Tried this : WooCommerce: Add product to cart with price override? The above works fine with a number override, but when tried with a text override it defaults back to displaying a 0 price . Why? These products are built-to-order and the shop admin will update price after talking

show product meta in order items table in Order Details

混江龙づ霸主 提交于 2019-11-30 21:19:23
问题 I need to add custom column for order items and show specific product meta in this column. I mean something like image below, I can't find any action from woocommerce to add this column! 回答1: You can use the following code: // Add custom column headers here add_action('woocommerce_admin_order_item_headers', 'my_woocommerce_admin_order_item_headers'); function my_woocommerce_admin_order_item_headers() { // set the column name $column_name = 'Test Column'; // display the column name echo '<th>'

WordPress and Call to undefined function add_menu_page()

荒凉一梦 提交于 2019-11-30 17:14:19
I recently got into WordPress plugin development and I would like to add a menu page (the links in the left hand side menu). Previous SO questions and the WordPress codex say that it's as simple as calling: add_menu_page( $page_title, $menu_title, $capability, $menu_slug, $function, $icon_url, $position ); However when I try this in my plugin setup file it tells me that the function is undefined: PHP Fatal error: Call to undefined function add_menu_page() This seems like a very simple thing to do according to the documentation but I am totally baffled. Any help would be really appreciated :) I

How do I add an HTML attribute to row (WP Bakery Visual Composer)?

邮差的信 提交于 2019-11-30 16:12:40
I am trying to add an ID attribute to row in Visual Composer via documented function vc_add_param() in such a way: $attributes = array( 'type' => 'textfield', 'heading' => "HTML ID", 'param_name' => 'el_id', 'value' => '', 'description' => __( "Assign an ID to the row", "discprofile" ) ); vc_add_param( 'vc_row', $attributes ); ID field appears when I edit a row. I set a value, save it, save page, view it, but there is no affect to frontend. A row still has no ID attribute. I've also tried use 'param_name' => 'id' and 'param_name' => 'element_id' , it was the same. What is wrong? Solution: We

Wordpress - Show parent category AND subcategory name in subcategory archive URL

倖福魔咒の 提交于 2019-11-30 12:44:58
I'm having some trouble with Wordpress category/subcategory archive URLs. For example, I want to be able to display this archive: http://faroutmagazine.co.uk/wp/track-of-the-day while keeping its parent category in the URL, making it http://faroutmagazine.co.uk/wp/music/track-of-the-day Previously, I was just getting a "This is embarrassing..." 404 message when accessing the /music/track-of-the-day URL (even though that's the one that was appearing in the View option under categories in the admin section of WP). Now the View link in the admin area only shows me the /track-of-the-day URL, and

WooCommerce- How to remove product & product-category from urls?

佐手、 提交于 2019-11-30 11:21:31
I'm using WooCommerce on a WordPress and it adds product & product-category to the URLs. http://dev.unwaveringmedia.com/8dim/product-category/all-party-supplies/ http://dev.unwaveringmedia.com/8dim/product/14-snowman-serving-tray/ I need to remove 'product' & 'product-category' from the URLs. Is there any way to modify the permalinks and remove them? Its good practice for SEO and UX to have a product category base. Product category bases help to distinguish products from posts. I usually change the product category base to "our-products" or "products". To do this go to settings->permalinks->

How rename a plugin title > Wordpress > Dashboard

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-30 10:20:43
Please, may someone help me? I need change the name of a plugin installed in my wordpress (Only the name in the admin bar is fine ;) . Thanks! Preview: Here's the process to change the labels (I changed WooCommerce to "Stall" in my example). You could try that with the gettext filter in the following manner. Use this in your functions.php file function rename_header_to_logo( $translated, $original, $domain ) { $strings = array( 'WooCommerce' => 'Stall', 'Custom Header' => 'Custom Stall' ); if ( isset( $strings[$original] ) && is_admin() ) { $translations = &get_translations_for_domain( $domain