-
Search Results
-
Hey Kriesi.at Support Team,
I’ve been trying for hours to get a custom sort field to work but had no luck. WooThemes’ documentation suggests to use the code from this page. Here is my modified code which is written to sort the products based on whether or not the products are in stock:
add_filter( 'woocommerce_get_catalog_ordering_args', 'custom_woocommerce_get_catalog_ordering_args' ); function custom_woocommerce_get_catalog_ordering_args( $args ) { $orderby_value = isset( $_GET['orderby'] ) ? woocommerce_clean( $_GET['orderby'] ) : apply_filters( 'woocommerce_default_catalog_orderby', get_option( 'woocommerce_default_catalog_orderby' ) ); if ( 'stock' == $orderby_value ) { $args['orderby'] = 'meta_value'; $args['order'] = 'asc'; $args['meta_key'] = '_stock_status'; } return $args; } add_filter( 'woocommerce_default_catalog_orderby_options', 'custom_woocommerce_catalog_orderby' ); add_filter( 'woocommerce_catalog_orderby', 'custom_woocommerce_catalog_orderby' ); function custom_woocommerce_catalog_orderby( $sortby ) { $sortby['stock'] = 'Stock Status'; return $sortby; }I have also edited part of the woocommerce-config.php file to see how adding my custom field to the front end will work (i intend to use functions.php in my child theme folder to override this later)
Here are my edits to woocommerce-config.php starting at line 986:
# # displays a front end interface for modifying the shoplist query parameters like sorting order, product count etc # if(!function_exists('avia_woocommerce_frontend_search_params')) { add_action( 'woocommerce_before_shop_loop', 'avia_woocommerce_frontend_search_params', 20); function avia_woocommerce_frontend_search_params() { global $avia_config; if(!empty($avia_config['woocommerce']['disable_sorting_options'])) return false; $product_order['default'] = __("Default Order",'avia_framework'); $product_order['title'] = __("Name",'avia_framework'); $product_order['price'] = __("Price",'avia_framework'); $product_order['date'] = __("Date",'avia_framework'); $product_order['popularity'] = __("Popularity",'avia_framework'); $product_order['stock'] = __("Stock Status",'avia_framework'); $product_sort['asc'] = __("Click to order products ascending", 'avia_framework'); $product_sort['desc'] = __("Click to order products descending", 'avia_framework'); $per_page_string = __("Products per page",'avia_framework'); $per_page = get_option('avia_woocommerce_product_count'); if(!$per_page) $per_page = get_option('posts_per_page'); if(!empty($avia_config['woocommerce']['default_posts_per_page'])) $per_page = $avia_config['woocommerce']['default_posts_per_page']; parse_str($_SERVER['QUERY_STRING'], $params); $po_key = !empty($avia_config['woocommerce']['product_order']) ? $avia_config['woocommerce']['product_order'] : 'default'; $ps_key = !empty($avia_config['woocommerce']['product_sort']) ? $avia_config['woocommerce']['product_sort'] : 'asc'; $pc_key = !empty($avia_config['woocommerce']['product_count']) ? $avia_config['woocommerce']['product_count'] : $per_page; $ps_key = strtolower($ps_key); $nofollow = 'rel="nofollow"'; //generate markup $output = ""; $output .= "<div class='product-sorting'>"; $output .= " <ul class='sort-param sort-param-order'>"; $output .= " <li><span class='currently-selected'>".__("Sort by",'avia_framework')." <strong>".$product_order[$po_key]."</strong></span>"; $output .= " <ul>"; $output .= " <li".avia_woo_active_class($po_key, 'default')."><a href='".avia_woo_build_query_string($params, 'product_order', 'default')."' {$nofollow}> <span class='avia-bullet'></span>".$product_order['default']."</a></li>"; $output .= " <li".avia_woo_active_class($po_key, 'title')."><a href='".avia_woo_build_query_string($params, 'product_order', 'title')."' {$nofollow}> <span class='avia-bullet'></span>".$product_order['title']."</a></li>"; $output .= " <li".avia_woo_active_class($po_key, 'price')."><a href='".avia_woo_build_query_string($params, 'product_order', 'price')."' {$nofollow}> <span class='avia-bullet'></span>".$product_order['price']."</a></li>"; $output .= " <li".avia_woo_active_class($po_key, 'date')."><a href='".avia_woo_build_query_string($params, 'product_order', 'date')."' {$nofollow}> <span class='avia-bullet'></span>".$product_order['date']."</a></li>"; $output .= " <li".avia_woo_active_class($po_key, 'popularity')."><a href='".avia_woo_build_query_string($params, 'product_order', 'popularity')."' {$nofollow}> <span class='avia-bullet'></span>".$product_order['popularity']."</a></li>"; $output .= " <li".avia_woo_active_class($po_key, 'stock')."><a href='".avia_woo_build_query_string($params, 'product_order', 'stock')."' {$nofollow}> <span class='avia-bullet'></span>".$product_order['stock']."</a></li>"; $output .= " </ul>"; $output .= " </li>"; $output .= " </ul>"; $output .= " <ul class='sort-param sort-param-sort'>"; $output .= " <li>"; if($ps_key == 'desc') $output .= " <a title='".$product_sort['asc']."' class='sort-param-asc' href='".avia_woo_build_query_string($params, 'product_sort', 'asc')."' {$nofollow}>".$product_sort['desc']."</a>"; if($ps_key == 'asc') $output .= " <a title='".$product_sort['desc']."' class='sort-param-desc' href='".avia_woo_build_query_string($params, 'product_sort', 'desc')."' {$nofollow}>".$product_sort['asc']."</a>"; $output .= " </li>"; $output .= " </ul>"; $output .= " <ul class='sort-param sort-param-count'>"; $output .= " <li><span class='currently-selected'>".__("Display",'avia_framework')." <strong>".$pc_key." ".$per_page_string."</strong></span>"; $output .= " <ul>"; $output .= " <li".avia_woo_active_class($pc_key, $per_page)."> <a href='".avia_woo_build_query_string($params, 'product_count', $per_page)."' {$nofollow}> <span class='avia-bullet'></span>".$per_page." ".$per_page_string."</a></li>"; $output .= " <li".avia_woo_active_class($pc_key, $per_page*2)."><a href='".avia_woo_build_query_string($params, 'product_count', $per_page * 2)."' {$nofollow}> <span class='avia-bullet'></span>".($per_page * 2)." ".$per_page_string."</a></li>"; $output .= " <li".avia_woo_active_class($pc_key, $per_page*3)."><a href='".avia_woo_build_query_string($params, 'product_count', $per_page * 3)."' {$nofollow}> <span class='avia-bullet'></span>".($per_page * 3)." ".$per_page_string."</a></li>"; $output .= " </ul>"; $output .= " </li>"; $output .= " </ul>"; $output .= "</div>"; echo $output; } }and starting at line 1088:
//function that actually overwrites the query parameters if(!function_exists('avia_woocommerce_overwrite_catalog_ordering')) { add_action( 'woocommerce_get_catalog_ordering_args', 'avia_woocommerce_overwrite_catalog_ordering', 20); function avia_woocommerce_overwrite_catalog_ordering($args) { global $avia_config; if(!empty($avia_config['woocommerce']['disable_sorting_options'])) return $args; //check the folllowing get parameters and session vars. if they are set overwrite the defaults $check = array('product_order', 'product_count', 'product_sort'); if(empty($avia_config['woocommerce'])) $avia_config['woocommerce'] = array(); foreach($check as $key) { if(isset($_GET[$key]) ) $_SESSION['avia_woocommerce'][$key] = esc_attr($_GET[$key]); if(isset($_SESSION['avia_woocommerce'][$key]) ) $avia_config['woocommerce'][$key] = $_SESSION['avia_woocommerce'][$key]; } // is user wants to use new product order remove the old sorting parameter if(isset($_GET['product_order']) && !isset($_GET['product_sort']) && isset($_SESSION['avia_woocommerce']['product_sort'])) { unset($_SESSION['avia_woocommerce']['product_sort'], $avia_config['woocommerce']['product_sort']); } extract($avia_config['woocommerce']); // set the product order if(!empty($product_order)) { switch ( $product_order ) { case 'date' : $orderby = 'date'; $order = 'desc'; $meta_key = ''; break; case 'price' : $orderby = 'meta_value_num'; $order = 'asc'; $meta_key = '_price'; break; case 'popularity' : $orderby = 'meta_value_num'; $order = 'desc'; $meta_key = 'total_sales'; break; case 'stock' : $orderby = 'meta_value'; $order = 'asc'; $meta_key = '_stock_status'; break; case 'title' : $orderby = 'title'; $order = 'asc'; $meta_key = ''; break; case 'default': default : $orderby = 'menu_order title'; $order = 'asc'; $meta_key = ''; break; } } // set the product count if(!empty($product_count) && is_numeric($product_count)) { $avia_config['shop_overview_products_overwritten'] = true; $avia_config['shop_overview_products'] = (int) $product_count; } //set the product sorting if(!empty($product_sort)) { switch ( $product_sort ) { case 'desc' : $order = 'desc'; break; case 'asc' : $order = 'asc'; break; default : $order = 'asc'; break; } } if(isset($orderby)) $args['orderby'] = $orderby; if(isset($order)) $args['order'] = $order; if (!empty($meta_key)) { $args['meta_key'] = $meta_key; } $avia_config['woocommerce']['product_sort'] = $args['order']; return $args; } }Even after all of these edits, I cannot get it to work. Is there any other files that i have to override or edit in order to get the products to display in the correct order when I’ve set the product sort to Stock Status? I’m currently running the latest version of Enfold on the latest version of WordPress with the latest version of WooCommerce. Thanks in advance.
Sincerely,
Cory Gottschalk
Web Developer
New Leaf Innovations
(Email address hidden if logged out)I would like to mimic the minimalist front page and prominent search box on websites like Calgary.ca and Chattanooga.gov.
Using Enfold’s Avia Layout Builder, I added a Fullscreen Sider element with one hi-res photo. I removed the sidebars and breadcrumbs. At the top is a transparent and glassy header. It’s pretty much the way I want, except for the position of the search box.
I previously followed these instructions to move the search box to the header. That is where I would like to keep it on every page — except the front page.
How can I place a search box over the full screen image?
Topic: Development sites
Hello-
We just made a copy of our enfold child theme from JustHost to our local server so I can test updates, etc, without messing up our live site. All of the content is in there fine and all of the versions are working correctly, but for some reason, it appears some of the jquery (and possibly other items) are not working properly. Items like no advanced layersliders are working, the search icon doesn’t open a dropdown, social icons and images do not animate and the header doesn’t function properly when you scroll, etc..
I can’t provide access to the outside world, but I was wondering if you had any thoughts. We only copied over the wp-content folder. Do we need anything from the other wp-folders that might contain scripts?
Thanks in advance for your time!
Hi Enfold team!
The website used to be having a boxed layout with body background
Secondly, the product page doesnt seem to be able to display gallery pictures and stuffs, the color scheme looks weird due to the CSS updates being overwrite I believe.
Link is as provided at the bottom.
CSS Codes used..top-pink { font-family: "ITCAvantGardeGothicW01 MedN", "Helvetica Neue", Verdana, Arial, sans-serif !important; text-align: center !important; background: #d4007a !important; color: #ffffff !important; } .main_color h2 { color: #f27edb !important; font-family: "ITCAvantGardeGothicW01 ExtN", "Helvetica Neue", Verdana, Arial, sans-serif !important; font-style: normal !important; text-rendering: optimizeLegibility !important; font-weight: normal !important; font-size: 2em !important; } .main_color p { font-family: "ITCAvantGardeGothicW01 ExtN", "Helvetica Neue", Verdana, Arial, sans-serif !important; margin: 0 0 1.5em !important; } #menu-item-140 a:hover { color: #f27edb !important; } #menu-item-51 a:hover { color: #f27edb !important; } #menu-item-95 a:hover { color: #f27edb !important; } #menu-item-62 a:hover { color: #f27edb !important; } #menu-item-134 a:hover { color: #f27edb !important; } #menu-item-search a:hover { color: #f27edb !important; } #menu-item-171 a:hover { color: #f27edb !important; } .slogan { font-weight: normal !important; font-size: 2.2em !important; line-height: 1.4em !important; text-align: center !important; font-family: "ITCAvantGardeGothicW01 ExtN", "Helvetica Neue", Verdana, Arial, sans-serif !important; display: block; -webkit-margin-before: 1em !important; -webkit-margin-after: 1em !important; -webkit-margin-start: 0px !important; -webkit-margin-end: 0px !important; } #av-overlay-wrap { background: url("http://www.womanizer.com.sg/wp-content/uploads/2014/11/pink-background.jpg") !important; } #menu-item-search a { color: #f27edb !important; } #menu-item-140 a { font-family: "ITCAvantGardeGothicW01 BookN", Helvetica, Arial, sans-serif !important; font-size: 16px; font-weight: 100 !important; -webkit-font-smoothing: antialiased !important; -webkit-text-size-adjust: 100% !important; -ms-text-size-adjust: 100% !important; } #menu-item-51 a { font-family: "ITCAvantGardeGothicW01 BookN", Helvetica, Arial, sans-serif !important; font-size: 16px; font-weight: 100 !important; #menu-item-95 a { font-family: "ITCAvantGardeGothicW01 BookN", Helvetica, Arial, sans-serif !important; font-size: 16px; font-weight: 100 !important; -webkit-font-smoothing: antialiased !important; -webkit-text-size-adjust: 100% !important; -ms-text-size-adjust: 100% !important; } -webkit-font-smoothing: antialiased !important; -webkit-text-size-adjust: 100% !important; -ms-text-size-adjust: 100% !important; } #menu-item-62 a { font-family: "ITCAvantGardeGothicW01 BookN", Helvetica, Arial, sans-serif !important; font-size: 16px; font-weight: 100 !important; -webkit-font-smoothing: antialiased !important; -webkit-text-size-adjust: 100% !important; -ms-text-size-adjust: 100% !important; } #menu-item-134 a { font-family: "ITCAvantGardeGothicW01 BookN", Helvetica, Arial, sans-serif !important; font-size: 16px; font-weight: 100 !important; -webkit-font-smoothing: antialiased !important; -webkit-text-size-adjust: 100% !important; -ms-text-size-adjust: 100% !important; } #menu-item-171 a { font-family: "ITCAvantGardeGothicW01 BookN", Helvetica, Arial, sans-serif !important; font-size: 16px; font-weight: 100 !important; -webkit-font-smoothing: antialiased !important; -webkit-text-size-adjust: 100% !important; -ms-text-size-adjust: 100% !important; } #menu-item-95 a { font-family: "ITCAvantGardeGothicW01 BookN", Helvetica, Arial, sans-serif !important; font-size: 16px; font-weight: 100 !important; -webkit-font-smoothing: antialiased !important; -webkit-text-size-adjust: 100% !important; -ms-text-size-adjust: 100% !important; } .main_color .avia_cart, .main_color form, .main_color tr:nth-child(odd) { background-color: white; } #top .woocommerce-message{ padding:1em 1em 1em 3.5em!important; margin:0 0 2em!important; position:relative; -webkit-border-radius:0px; border-radius:0px; background:#ffffff; background-color: transparent !important; border: 0px; background:-webkit-gradient(linear,left top,left bottom,from(#ffffff),to(#ffffff)); background:-webkit-linear-gradient(#ffffff,#ffffff); background:-moz-linear-gradient(center top,#ffffff 0,#ffffff 100%); background:-moz-gradient(center top,#ffffff 0,#ffffff 100%); color:#000000 !important; text-shadow:0 1px 0 #fff; list-style:none outside!important;*zoom:1;width:auto; -webkit-box-shadow:inset 0 -2px 6px rgba(0,0,0,.05),inset 0 -2px 30px rgba(0,0,0,.015),inset 0 1px 0 #fff,0 1px 2px rgba(0,0,0,.3);box-shadow:inset 0 -2px 6px rgba(0,0,0,.05),inset 0 -2px 30px rgba(0,0,0,.015),inset 0 1px 0 #fff,0 1px 2px rgba(0,0,0,.3) } #av-overlay-wrap { overflow-x: scroll !important; }Help will be greatly appreciated!
Regards,
KayzelHi there.
I really like your theme Enfold and I’m not sure wether you could help me with solving a rather annoying issue.
While using the X% of Browser-Height function of the Color-Section for creating Header Images + Titles I experience the website jumping on mobile devices using Chrome while scrolling. The reason is obviously related to the search box of chrome. It disappears while scrolling down and appears while scrolling up again. Everytime the box appears or disappears the image height gets recalculated forcing the whole webpage to move up or down.
Do you have idea how I may solve this issue?
Thanks in advance.
BerndHi – I did search past threads and noted others have had this problem but did not find a solution. I have a photography site that currently utilizes masonry galleries on many of the pages. Many times when I (or clients) visit theses pages several images in the masonry gallery stack on top of each other. If you refresh the page, it resolves 100% of the time.
I have witnessed this problem on chrome, IE 9, android browser and chrome for both phone and tablet, safari, and chrome for iPhone/iPad. So pretty much completely across the board. Of course it doesn’t happen 100% of the time, but it happens WAY too often for me to continue using the masonry galleries if they are making me look bad! :(
I have updated to the latest version of WordPress and Enfold.
You could probably go to any of my galleries and witness this behavior, but two that I often see it show up on are:
http://www.launsteinimagery.com/galleries/mammals/bears/
http://www.launsteinimagery.com/galleries/mammals/coyotes-foxes/I noted a comment from a moderator on an earlier thread suggesting W3 Total Cache as something that might help in speeding up page loads which could address this. Any suggestions or fixes?
Also, does Enfold have a way to place social sharing buttons below images or pages yet, or still only for bog posts?
Many thanks,
John
I have searched regarding the WXR error message and performed the described actions:
– install Enfold via ftp, all went well
The error message is: Sorry, there has been an error. This does not appear to be a WXR file, missing/invalid WXR version number.
This is a fresh up-to-date WordPress installation on a test server and an up-to-date Enfold 3.0.5 installation.Thanks.
I have set a right sidebar and created a widget with my contact details on one of my pages. I have used this widget in the side bar setting. The side bar is displaying the contact information (from the widget) but also Recent Comments Archives Categories and Meta along with a search bar. I only want the widget displayed (the search bar ideally not but if it has to then ok) I cannot find the setting to remove the Comments Archives etc – I have successfully done this on another install and have gone through the page settings, Enfold settings and WP settings and they are (or seem to be ) identical.
Appreciate if anyone can point me to where I turn off the content I do not want. Thanks.
Hi
I have recently updated this site to WP Version 4.1 and Enfold 3.0.4 from older version of both.
It all seemed to go fine but now the menus are all funny huge padding and the search icon has ‘search’ text appended to it as do the social icons on the top see linked in in top left. In the menu area in admin the small down arrows are missing and it looks strange.Q1. How in the world do you enable more file information to be visible in the “Add Multiple Images” window pane on some of your “Content Elements” tools? Right now it’s just showing thumbnails.
Showing thumbnails has it’s obvious benefits and a “picture is a thousand words” so you don’t need to try and explain the merits behind the design. That’s easy to understand. But, doing away with important information that facilitate site management is pointless. It is easy to add this file information below the thumbnails without messing with the pretty presentation. You can make it tiny if you’re worried about cluttering up the design. The cursor properties in the CSS don’t even allow you to see ALT information on mouseover, so finding out more info about the file is impossible without opening Firebug jumping through other hoops.
Certainly someone has posed this question in your forum before, but I can’t find it for the life of me doing searches. If it’s a settings issue in WordPress or Enfold, please share the information in a relatively easy to understand method like this: settings –> sub link –> sublink –> show file information
If this involves adjusting code on the backend to enable this, we are fine getting our hands dirty with PHP. We understand it. We’ve got a lot of images in our website and not having file information available when adding content makes things a guessing game and makes your template pretty much a boat anchor here that we can’t use.
If you need an example of what I’m describing, just go to your “Partner Logo Element” and start trying to add some images. It will be obvious what I’m describing from there. The “Add multiple Images” window pane shows only a bunch of thumbnails, but the normal WordPress Media Manager utility includes file information in a scrollable window pane (Iframe) on the right side of the thumbnails when you click on a thumbnail.
Q2.Why in the world is this not an option in Content Elements?

