Title: Morphim's Replies - page 3 | WordPress.org

---

# Morphim

  [  ](https://wordpress.org/support/users/morphim/)

 *   [Profile](https://wordpress.org/support/users/morphim/)
 *   [Topics Started](https://wordpress.org/support/users/morphim/topics/)
 *   [Replies Created](https://wordpress.org/support/users/morphim/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/morphim/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/morphim/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/morphim/engagements/)
 *   [Favorites](https://wordpress.org/support/users/morphim/favorites/)

 Search replies:

## Forum Replies Created

Viewing 15 replies - 31 through 45 (of 91 total)

[←](https://wordpress.org/support/users/morphim/replies/page/2/?output_format=md)
[1](https://wordpress.org/support/users/morphim/replies/?output_format=md) [2](https://wordpress.org/support/users/morphim/replies/page/2/?output_format=md)
3 [4](https://wordpress.org/support/users/morphim/replies/page/4/?output_format=md)
[5](https://wordpress.org/support/users/morphim/replies/page/5/?output_format=md)
[6](https://wordpress.org/support/users/morphim/replies/page/6/?output_format=md)
[7](https://wordpress.org/support/users/morphim/replies/page/7/?output_format=md)
[→](https://wordpress.org/support/users/morphim/replies/page/4/?output_format=md)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[HUSKY - Products Filter Professional for WooCommerce] Random order (orderby=rand) with pagination](https://wordpress.org/support/topic/random-order-orderbyrand-with-pagination/)
 *  Thread Starter [Morphim](https://wordpress.org/support/users/morphim/)
 * (@morphim)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/random-order-orderbyrand-with-pagination/#post-10826693)
 * Hi. Thanks for the reply.
 * Here is a non pagination page (quite long and takes a while to load) but uses
   orderby=rand
    [http://sohovo-test-com.stackstaging.com/uk-voices/](http://sohovo-test-com.stackstaging.com/uk-voices/)
 * And here is a page with orderby=rand & per_page=24
    Therefore this has pagination.
   It’s not too easy to spot but some artists are duplicated on other pages. [http://sohovo-test-com.stackstaging.com/international-voices/](http://sohovo-test-com.stackstaging.com/international-voices/)
 * I tried YITH infinite scroll too but it does the same as i guess it replicates
   the pagination pages.
 * There is a plugin here:
    [https://wordpress.org/plugins/woo-random-product-sorting-with-pagination/](https://wordpress.org/plugins/woo-random-product-sorting-with-pagination/)
   that seems to overcome this problem by introducing a 1 hour cache to the random
   seed but this is for WC and not WOOF. Maybe it’s possible to add something from
   this to a function in WOOF? Or edit this plugin to hook into WOOF rather then
   WC? Here’s the code of that plugin:
 *     ```
       <?php
       if(!defined('ABSPATH')){
       	exit; //Exit if accessed directly.
       }
       if(in_array('woocommerce/woocommerce.php', apply_filters('active_plugins', get_option('active_plugins')))){
       	if(!function_exists('do2_addRandomProductOrderSetting')&&!function_exists('do2_randomizeProductWhenSet')){
   
       		//add "Random" setting to product sorting menu
       		function do2_addRandomProductOrderSetting($sortby){
       			$sortby['random_order'] = 'Random';
       			return $sortby;
       		}
       		add_filter('woocommerce_default_catalog_orderby_options','do2_addRandomProductOrderSetting');
       		add_filter('woocommerce_catalog_orderby','do2_addRandomProductOrderSetting');
   
       		//randomize products when setting is used
       		function do2_randomizeProductWhenSet($args){
       			$orderbySetting = isset($_GET['orderby']) ? wc_clean($_GET['orderby']) : apply_filters('woocommerce_default_catalog_orderby', get_option('woocommerce_default_catalog_orderby'));
       			if('random_order' == $orderbySetting){
       				if(false===($seed = get_transient('do2_randSeed'))){
       					$seed = rand();
       					set_transient('do2_randSeed', $seed, 3600 );
       				}
       				$args['orderby'] = 'RAND('.$seed.')';
       				$args['order'] = '';
       				$args['meta_key'] = '';
       			}
       			return $args;
       		}
       		add_filter('woocommerce_get_catalog_ordering_args','do2_randomizeProductWhenSet');
       	}
       } else {
       	if(!function_exists('do2_WooCommerceAdminNotice')){
       		//warn on missing WooCommerce
       		function do2_WooCommerceAdminNotice() {
       	    ?>
       		    <div class="notice error is-dismissible" >
       		        <p><?php _e('Your site must be running WooCommerce to benefit from the WooCommerce Random Product Sorting with Pagination plugin.'); ?></p>
       		    </div>
       	    <?php
       		}
       		add_action('admin_notices', 'do2_WooCommerceAdminNotice');
       	}
       }
       ```
   
 * Thanks again in advance
    -  This reply was modified 7 years, 6 months ago by [Morphim](https://wordpress.org/support/users/morphim/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce] Short description on shop page – playlist not displaying in search](https://wordpress.org/support/topic/short-description-on-shop-page-playlist-no-displaying-in-search/)
 *  Thread Starter [Morphim](https://wordpress.org/support/users/morphim/)
 * (@morphim)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/short-description-on-shop-page-playlist-no-displaying-in-search/#post-10792220)
 * Don’t worry. I fixed this. I think the code is fine but some corruption of the
   database during migration might have been to blame.
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [[GeneratePress] Change comma divider between category meta](https://wordpress.org/support/topic/change-comma-divider-between-category-meta/)
 *  Thread Starter [Morphim](https://wordpress.org/support/users/morphim/)
 * (@morphim)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/change-comma-divider-between-category-meta/#post-10662259)
 * Can I just add, for anyone else looking at this, that the code goes within the
   functions.php of a child theme.
 * Thanks very much, Tom. Your theme and support is second to none : )
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [[GeneratePress] Change comma divider between category meta](https://wordpress.org/support/topic/change-comma-divider-between-category-meta/)
 *  Thread Starter [Morphim](https://wordpress.org/support/users/morphim/)
 * (@morphim)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/change-comma-divider-between-category-meta/#post-10633124)
 * Ah, man!!
    Don’t worry. I’d somehow reverted to the main theme rather than the
   child, which is why my child edits weren’t having any effect. Not sure how that
   happened but I’ve fixed it now.
 * Thanks all the same (before you had to indulge me : )
    -  This reply was modified 7 years, 8 months ago by [Morphim](https://wordpress.org/support/users/morphim/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Elementor Website Builder - more than just a page builder] gallery shortcode within accordion?](https://wordpress.org/support/topic/gallery-shortcode-within-accordion/)
 *  Thread Starter [Morphim](https://wordpress.org/support/users/morphim/)
 * (@morphim)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/gallery-shortcode-within-accordion/#post-10318687)
 * This was two months ago!! THIS IS NOT SUPPORT. It’s pointless, as is the brevity
   of your reply.
 * Very, very poor. I’m now using WPBakery.
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [[Twenty Seventeen] How to stop auto-replay of video header](https://wordpress.org/support/topic/how-to-stop-auto-replay-of-video-header/)
 *  [Morphim](https://wordpress.org/support/users/morphim/)
 * (@morphim)
 * [8 years ago](https://wordpress.org/support/topic/how-to-stop-auto-replay-of-video-header/#post-10238189)
 * This didn’t work for me either until I noticed that the above code has different
   quote and speech marks. I’ve had this before when pasting code in regular text
   that it changes it to opening quotes and closing quotes, which are different 
   characters and not recognised by the code
    If I pasted this code it shows errors.
   However, if I retyped all of the quote and speech marks with the standard (below
   the @ sign on my keyboard for quotes and above no. 2 for speech marks) it works
   fine.
 * Try this:
 *     ```
       // Add header video class after the video is loaded.
       $( document ).on( 'wp-custom-header-video-loaded', function() {
       $body.addClass( 'has-header-video' );
       });
       $( document ).ready( function() {
       $( document ).on( 'wp-custom-header-video-loaded', function() {
       $("#wp-custom-header-video").attr('autoplay',true );
       $("#wp-custom-header-video").attr('loop',false );
       });
       });
       ```
   
 * Also, under the original code there is
    `})( jQuery );`
 * Make sure you leave that after this code.
    Hope that helps
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [[Twenty Seventeen] Twenty Seventeen mobile menu – close on click – Safari](https://wordpress.org/support/topic/twenty-seventeen-mobile-menu-close-on-click-safari/)
 *  Thread Starter [Morphim](https://wordpress.org/support/users/morphim/)
 * (@morphim)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/twenty-seventeen-mobile-menu-close-on-click-safari/#post-10149187)
 * Sorry. Forgot to click ‘resolved
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [[Twenty Seventeen] Twenty Seventeen mobile menu – close on click – Safari](https://wordpress.org/support/topic/twenty-seventeen-mobile-menu-close-on-click-safari/)
 *  Thread Starter [Morphim](https://wordpress.org/support/users/morphim/)
 * (@morphim)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/twenty-seventeen-mobile-menu-close-on-click-safari/#post-10149183)
 * Oh, by the way, yes, it was only desktop and only safari. Very odd.
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [[Twenty Seventeen] Twenty Seventeen mobile menu – close on click – Safari](https://wordpress.org/support/topic/twenty-seventeen-mobile-menu-close-on-click-safari/)
 *  Thread Starter [Morphim](https://wordpress.org/support/users/morphim/)
 * (@morphim)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/twenty-seventeen-mobile-menu-close-on-click-safari/#post-10149180)
 * Hi Andrew. Thank you so much for taking a look at this for me.
 * Your updated main.js code seems to have done the trick. Brilliant. You’re a genius;
   for the original code and for giving your time to help me with the new code.
 * I’m very grateful and appreciate you giving your time freely for all of this.
 * I’m no coder so have little idea what is going on or what affects what.
 * My hearty thanks again : )
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [[Twenty Seventeen] Twenty Seventeen mobile menu – close on click – Safari](https://wordpress.org/support/topic/twenty-seventeen-mobile-menu-close-on-click-safari/)
 *  Thread Starter [Morphim](https://wordpress.org/support/users/morphim/)
 * (@morphim)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/twenty-seventeen-mobile-menu-close-on-click-safari/#post-10142172)
 * Thanks for your time on this. I have tested it now and it does the same
 * You need to be on Safari and I’ve only tested on a Mac. (it doesn’t seem to do
   this with FF, Edge or Chrome on either Mac or PC)
    If you scroll down to the 
   2 x 2 grid of video thumbnails, under the ‘Work’ heading, when clicking any of
   these, it should open a popup window with the video.
 * However, what it actually does, when clicked, is scroll to the top of the page.
   If you then scroll back down to the videos, whichever you click opens correctly.
   
   However, if you then close and re-click or try to open a different one, it scrolls
   to the top again.
 * Hope fully that makes sense.
    Please let me know how you get on. Thanks again
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [[Twenty Seventeen] Twenty Seventeen mobile menu – close on click – Safari](https://wordpress.org/support/topic/twenty-seventeen-mobile-menu-close-on-click-safari/)
 *  Thread Starter [Morphim](https://wordpress.org/support/users/morphim/)
 * (@morphim)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/twenty-seventeen-mobile-menu-close-on-click-safari/#post-10141850)
 * Hi there, [This site](http://www.wearenoisy.co.uk/snapper) should function the
   same. I’ve not checked in Safari yet though to see if the problem is still present
   here.
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [[Twenty Seventeen] Twenty Seventeen mobile menu – close on click – Safari](https://wordpress.org/support/topic/twenty-seventeen-mobile-menu-close-on-click-safari/)
 *  Thread Starter [Morphim](https://wordpress.org/support/users/morphim/)
 * (@morphim)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/twenty-seventeen-mobile-menu-close-on-click-safari/#post-10141667)
 * I can but I’ve deactivated it as it’s now an active site. I have a test site.
   I’ll see if i can set it up on that. Back soon …
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [[Twenty Seventeen] Create sticky collapsable menu on mobile phone](https://wordpress.org/support/topic/create-sticky-collapsable-menu-on-mobile-phone/)
 *  [Morphim](https://wordpress.org/support/users/morphim/)
 * (@morphim)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/create-sticky-collapsable-menu-on-mobile-phone/#post-10137771)
 * Sure. Thanks for the prompt reply : )
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [[Twenty Seventeen] Create sticky collapsable menu on mobile phone](https://wordpress.org/support/topic/create-sticky-collapsable-menu-on-mobile-phone/)
 *  [Morphim](https://wordpress.org/support/users/morphim/)
 * (@morphim)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/create-sticky-collapsable-menu-on-mobile-phone/#post-10137299)
 * Hi there. I was looking for a solution to the mobile Twenty Seventeen menu closing
   when a link is clicked.
    This works but, I have pop up windows (like lightbox)
   on my site for video and images (two different plugins that use PrettyPhoto and
   FancyBox) The script mentioned here causes a problem with the pop-ups but only
   on Safari (it’s _always_ Safari!!
 * Basically, with this code, when clicking the video or image lighbox popups, they
   don’t open and the Safari browser jumps to the top of the page. If you then scroll
   back down to the video / image, it will open . But, if you close the lighbox 
   and try again, it scrolls to the top again.
 * Any ideas why this might be? (I Know this is quite an old initial topic)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce] Sort products by last word in title?](https://wordpress.org/support/topic/sort-products-by-last-word-in-title/)
 *  Thread Starter [Morphim](https://wordpress.org/support/users/morphim/)
 * (@morphim)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/sort-products-by-last-word-in-title/#post-10007441)
 * Hello. Last message, I promise : )
 * I got this all working. Thanks for your help.
 * The guys at WOOF filter sent me this:
    add code to: plugins\woocommerce-products-
   filter\index.php”
 *  case ‘surname’ :
    $meta_key = ‘surname’; $order = ‘ASC’; break;
 * Which got their plugin to honour the ‘surname’ meta orderby.
 * I’m actually thinking now though that using the second word in the title (surname)
   as the sku then sorting with that would be easier but can’t work out how to do
   it.
 * I’m sure I’ll get there.

Viewing 15 replies - 31 through 45 (of 91 total)

[←](https://wordpress.org/support/users/morphim/replies/page/2/?output_format=md)
[1](https://wordpress.org/support/users/morphim/replies/?output_format=md) [2](https://wordpress.org/support/users/morphim/replies/page/2/?output_format=md)
3 [4](https://wordpress.org/support/users/morphim/replies/page/4/?output_format=md)
[5](https://wordpress.org/support/users/morphim/replies/page/5/?output_format=md)
[6](https://wordpress.org/support/users/morphim/replies/page/6/?output_format=md)
[7](https://wordpress.org/support/users/morphim/replies/page/7/?output_format=md)
[→](https://wordpress.org/support/users/morphim/replies/page/4/?output_format=md)