Forum Replies Created

Viewing 30 posts - 1 through 30 (of 93 total)
  • Author
    Posts
  • I have 2 menus . One is main menu and the second one is secondary menu. On mobile, the enfold burger menu only shows the menu items from the main menu. I want to hide the secondary menu on mobile and append all the menu items from secondary menu to the burger menu.

    I tried to add the following javascript to the header:

    <script type=”text/javascript”>
    jQuery(document).ready(function() {
    var updatedMobileMenu = false;
    jQuery(‘span.av-hamburger’).on(‘click’, function(){
    if (jQuery(‘span.av-hamburger’).hasClass(‘is-active’)){
    // nothing to do
    } else {
    setTimeout(function(){
    if (updatedMobileMenu == false){
    var topMenu = jQuery(‘#avia2-menu’).clone();
    jQuery(‘#av-burger-menu-ul’).append(jQuery(topMenu).children());
    updatedMobileMenu = true;
    }
    }, 500);
    }
    });
    });
    </script>

    It appends the secondary menu items to the burger menu successfully. However, the style is completely difference from other menu items on the burger menu. I found that the burger menu item structure is completely difference and I can’t directly clone and append them. Is there any javascript function which I can use to create mobile menu items on the fly?

    Thanks,
    Alex

    in reply to: Keep getting some php warning in the log #692558

    I dont want to disable the php warning as it helps me to do some debugging and monitoring. However, the log file getting big really fast. It increased around 30MB per days and make me hard to see the actual error it has. I would like to fix it if possible. Any idea on what’s happened?

    I moved it to another server. Let me know if you need any login.

    in reply to: Keep getting some php warning in the log #682530

    any news?

    in reply to: Enhanced Category Pages #671741

    I found the solution here: http://kriesi.at/documentation/enfold/use-the-layout-builder-with-any-post-type

    with the type “enhancedcategory”

    in reply to: LayerSlider Width #565183

    Got it. Thanks!

    in reply to: Layer Slider doesn't show up on preview #565178

    I thought this is the problem from Advanced LayerSlider as other content is working in the preview. But thanks for your reply. I will try to explain to my customer.

    • This reply was modified 8 years, 3 months ago by boscotwcheung.
    in reply to: Layer Slider doesn't show up on preview #563799

    Do you know that will this be fixed or not in the coming update? I asked my customer to clone the page for the “preview changes” so that the original page can still be public and able for them to preview the changes at the same time. But they are not satisfied with this solution.

    in reply to: Layer Slider doesn't show up on preview #562923

    I updated the theme but still have the same problem. I made a sample wordpress site for you to try. Please try to add an “Advanced LayerSlider” to the homepage, press the “Preview Changes” button (don’t press the “Update” button before it). You will only see an empty area in the preview page. You can only see the slider display properly after pressing the update button.

    in reply to: LayerSlider Width #556878

    This should because I replaced the image to 1920px. So, it “looks” fixed. But I set the slider width to 1290, adding a 1290px image should work as well but it is not. See the attached link for screenshot and I made a test page and slider for showing this problem.

    in reply to: LayerSlider Width #556382

    I updated the slide 4 image to a wider images (1920 x 650px) to make it “looks” fixed for my customer first. I still need the solution for this.

    in reply to: LayerSlider Width #556306

    sent. Thanks

    in reply to: LayerSlider with publish the update time #555842

    I found a plugin which can do similar things for a page

    https://wordpress.org/plugins/tao-schedule-update/

    in reply to: style.css with version number #554200

    @pako69

    yes. So, it will
    1. load an empty style.css by default in wp_head function
    2. load the custom css (with file time as parameter) ONCE with all my custom css on it by adding some code in function.php

    You still need to ask your customer to clear the browser cache ONCE after this update. But no more clear is needed after this.

    in reply to: style.css with version number #553488

    I fixed the problem by adding custom.css into the child theme and add the following to the function.php

    function css_versioning() {
    wp_enqueue_style( ‘custom-css’, get_stylesheet_directory_uri() . ‘/custom.css’ , false,filemtime( get_stylesheet_directory() . ‘/custom.css’ ), ‘all’ );
    }
    add_action( ‘wp_enqueue_scripts’, ‘css_versioning’ );

    in reply to: Table with images #544981

    I still not able to resolve it. I did a day research and looks like that this problem can not be solved. You can see the link I posted in chrome for how the table should be. What do you means by grid row?

    in reply to: Top Bar #524302

    Yes. This is almost what I needed. But I need to support multiple message which can be automatically switch to next message (and button) for every few seconds.

    in reply to: Product Sorting #506809

    here should be what the script do,

    1. get a list of products
    2. call custom_product_save($post_id) for each product id

    in reply to: Product Sorting #506808

    Yes, you need to add “isHot” custom field and value to all the product first. A script is needed to do a batch for this.

    in reply to: Product Sorting #506309

    add this to function.php

    add_action( ‘wp_insert_post’, ‘custom_product_save’ );
    function custom_product_save($post_id){

    $post_type = get_post_type( $post_id );
    // check if post type is a product
    if ($post_type == ‘product’){
    // add isHot custom fields based on the value of “_featured”
    $isHot = get_post_meta($post_id, ‘_featured’, true);
    if ($isHot){
    update_post_meta($post_id, ‘isHot’, ‘Hot’);
    } else {
    update_post_meta($post_id, ‘isHot’, ‘Normal’);
    }
    }

    }

    // Sort the product by hot item first and A to Z after that
    add_filter( ‘woocommerce_get_catalog_ordering_args’, ‘custom_woocommerce_get_catalog_ordering_args’ );
    function custom_woocommerce_get_catalog_ordering_args( $args ) {
    $args[‘meta_key’] = ‘isHot’;
    $args[‘orderby’] = ‘meta_value title’;
    $args[‘order’] = ‘ASC’;
    return $args;
    }

    However, you need to update all the existing product to add the isHot custom fields. (should be easy to write a script to do a batch update)

    in reply to: Product Sorting #506302

    I changed “_featured” to a custom field.

    I did a do_action(‘wp_insert_post’, ‘xxx’). I will create a custom field called “isHot” based on the “_featured” value when saving the post.

    The logic are:
    if (“_featured” == true){ “isHot” = ‘Hot’;} else {“isHot” = ‘Normal’;}

    And now, I can sort by “isHot” and ‘title’ in ASC. The hot item will show first and then A to Z

    Thanks,
    Alex

    in reply to: Product Sorting #505462

    I found it can be done by the custom field. But I need to think a better custom field value for “isFeatured” as it also sort from A to Z…

    Anyway, the technical problem is solved. You can close this thread. Thanks.

    in reply to: Product Sorting #505400

    If I change the featured to a custom field, can this be sorted? e.g. If I created a custom field “isFeatured” and the value is “YES” or “NO”, can I sort by this custom field and then sort from A to Z?

    in reply to: Product Sorting #505380

    This is a request from a customer. They have a lot product and it is hard to sort by drag and drop now. They want to hardcode the sorting.

    in reply to: Product Sorting #505375

    Well…I tried this before. I will show product from A to Z but the featured product will be at the end of the list. I want the featured product on top and sort from A to Z after that.

    Edited (I tried the following before):

    add_filter( ‘woocommerce_get_catalog_ordering_args’, ‘custom_woocommerce_get_catalog_ordering_args’ );
    function custom_woocommerce_get_catalog_ordering_args( $args ) {
    $args[‘meta_key’] = ‘_featured’;
    $args[‘orderby’] = ‘meta_value title’;
    $args[‘order’] = ‘ASC’;
    return $args;
    }

    • This reply was modified 8 years, 7 months ago by boscotwcheung.
    in reply to: Image ShortCode #505362

    Thanks. I used it in the textblock because I need to add the image into a “non-even-column” width table. I can only do this in textblock as I know. I can add the image shortcode. However, this is a bit hard for non-tech user to update the content. So, I would see if there is any user friendly way to do it.

    in reply to: Post Template #505286

    I think this can be closed. Thanks.

    in reply to: Font #505285

    Thanks

    in reply to: Countdown format #505284

    Thanks

    in reply to: Tab Element #505283

    Thanks

    in reply to: Tab Event #505282

    I still having the problem. But the workaround is working, so this thread can be closed. Thanks.

Viewing 30 posts - 1 through 30 (of 93 total)