Title: sloweye's Replies | WordPress.org

---

# sloweye

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

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

 Search replies:

## Forum Replies Created

Viewing 13 replies - 1 through 13 (of 13 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Relevanssi - A Better Search] Remove Url left by relevanssi_kill_autoembed](https://wordpress.org/support/topic/remove-url-left-by-relevanssi_kill_autoembed/)
 *  Thread Starter [sloweye](https://wordpress.org/support/users/sloweye/)
 * (@sloweye)
 * [4 years, 12 months ago](https://wordpress.org/support/topic/remove-url-left-by-relevanssi_kill_autoembed/#post-14777169)
 * I was able to cobble together the following (Edited from this [regex](https://www.regextester.com/96461)
   and your example for the [filter](https://www.relevanssi.com/user-manual/filter-hooks/relevanssi_excerpt_content/)),
   which seems to be working to remove YouTube and Vimeo urls other than for videos
   embedded in Woocommerce products:
 *     ```
       add_filter( 'relevanssi_excerpt_content', 'sly_remove_youtube_vimeo_urls' );
       function sly_remove_youtube_vimeo_urls( $content ) {
           return preg_replace( '#^(http:\/\/|https:\/\/)((player\.)?vimeo\.com|youtu\.be|www\.youtube\.com)\/([\w\/]+)([\?].*)?$#im', '', $content );
       }
       ```
   
 * Is a different filter required to work with relevanssi’s excerpt for Woocommerce
   products?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Relevanssi - A Better Search] Remove Url left by relevanssi_kill_autoembed](https://wordpress.org/support/topic/remove-url-left-by-relevanssi_kill_autoembed/)
 *  Thread Starter [sloweye](https://wordpress.org/support/users/sloweye/)
 * (@sloweye)
 * [5 years ago](https://wordpress.org/support/topic/remove-url-left-by-relevanssi_kill_autoembed/#post-14762541)
 * Hello Mikko,
 * Thanks for your response. I’ve tried adding the code you provided in the functions.
   php of my child theme, but the embed urls are still appearing in Relevanssi’s
   excerpts.
 * As in my first post, I’d be happy to just hide the embed url in the excerpt if
   that is easier.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Relevanssi - A Better Search] Remove Url left by relevanssi_kill_autoembed](https://wordpress.org/support/topic/remove-url-left-by-relevanssi_kill_autoembed/)
 *  Thread Starter [sloweye](https://wordpress.org/support/users/sloweye/)
 * (@sloweye)
 * [5 years ago](https://wordpress.org/support/topic/remove-url-left-by-relevanssi_kill_autoembed/#post-14759211)
 * Part two of this- it might also be a workable solution for me to [remove the autoembed disabler](https://www.relevanssi.com/knowledge-base/relevanssi-breaks-autoembeds-on-result-pages/).
   However I am unable to get this to work using the snippet you provide. Does it
   need a priority?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Shared Counts - Social Media Share Buttons] posts hidden when sorting by shared counts column](https://wordpress.org/support/topic/posts-hidden-when-sorting-by-shared-counts-column/)
 *  Thread Starter [sloweye](https://wordpress.org/support/users/sloweye/)
 * (@sloweye)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/posts-hidden-when-sorting-by-shared-counts-column/#post-11464294)
 * Here’s a more recent answer in the stackexchange thread I linked to earlier that
   has more about the order of the meta queries: [https://wordpress.stackexchange.com/a/329687/144711](https://wordpress.stackexchange.com/a/329687/144711)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Shared Counts - Social Media Share Buttons] posts hidden when sorting by shared counts column](https://wordpress.org/support/topic/posts-hidden-when-sorting-by-shared-counts-column/)
 *  Thread Starter [sloweye](https://wordpress.org/support/users/sloweye/)
 * (@sloweye)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/posts-hidden-when-sorting-by-shared-counts-column/#post-11463871)
 * I don’t know why, but the order worked better for me if the ‘NOT EXISTS’ array
   is before the ‘EXISTS’ array.
    -  This reply was modified 7 years, 3 months ago by [sloweye](https://wordpress.org/support/users/sloweye/).
      Reason: typo
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Jetpack - WP Security, Backup, Speed, & Growth] Turning Publicize off throws fatal error on Gutenberg editor](https://wordpress.org/support/topic/turning-publicize-off-throws-fatal-error-on-gutenberg-editor/)
 *  Thread Starter [sloweye](https://wordpress.org/support/users/sloweye/)
 * (@sloweye)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/turning-publicize-off-throws-fatal-error-on-gutenberg-editor/#post-10934450)
 * Ok, understood. Thanks for the tip about avoiding triggering Publicize, will 
   put the snippet back in and wait for the fix.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Jetpack - WP Security, Backup, Speed, & Growth] Turning Publicize off throws fatal error on Gutenberg editor](https://wordpress.org/support/topic/turning-publicize-off-throws-fatal-error-on-gutenberg-editor/)
 *  Thread Starter [sloweye](https://wordpress.org/support/users/sloweye/)
 * (@sloweye)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/turning-publicize-off-throws-fatal-error-on-gutenberg-editor/#post-10931665)
 * Thanks for both responses.
 * Yes, this was with the site my profile links to.
 * Just tried the snippet, but that doesn’t fix it for me. Problem is only showing
   up on a few jetpack-portfolio posts that have already been edited with Gutenberg.
   And only if the Publicize module is deactivated. No problem with the default 
   post-type where Gutenberg is used. Not using Gutenberg w/ Woocommerce products
   yet, so can’t test that.
 * I tried editing the snippet to ‘remove_post_type_support( ‘jetpack-portfolio’,‘
   publicize’ );’ instead of woocommerce, but no luck.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Shared Counts - Social Media Share Buttons] posts hidden when sorting by shared counts column](https://wordpress.org/support/topic/posts-hidden-when-sorting-by-shared-counts-column/)
 *  Thread Starter [sloweye](https://wordpress.org/support/users/sloweye/)
 * (@sloweye)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/posts-hidden-when-sorting-by-shared-counts-column/#post-10927747)
 * In case it saves anyone else the time, adding the following filter on `pre_get_posts`
   as an admin only [code snippet](https://wordpress.org/plugins/code-snippets/)
   got this working for me.
 *     ```
       add_action( 'pre_get_posts', 'my_sort_admin_column' );
       function my_sort_admin_column( $query ) {
   
          /**
           * We only want our code to run in the main WP query
           * AND if an orderby query variable is designated.
           */
          if ( $query->is_main_query() && ( $orderby = $query->get( 'orderby' ) ) ) {
   
             switch( $orderby ) {
   
       			// If we're ordering by 'shared_counts_total'
                  case 'shared_counts':
   
       			// Setting just <code>meta_key</code> is not sufficient, as this 
       			// will ignore posts that do not yet, or never will have 
       			// a value for the specified key. This meta query will 
       			// register the <code>meta_key</code> for ordering, but will not 
       			// ignore those posts without a value for this key.
       		  $query->set( 'meta_query', array(
       				'relation' => 'OR',
       				array(
       					'key' => 'shared_counts_total', 
       					'compare' => 'NOT EXISTS'
       				),
       				array(
       					'key' => 'shared_counts_total', 
       					'compare' => 'EXISTS'
       				),
       			) );
   
       			// Order by the meta value, then by the date if multiple 
       			// posts share the same value for the provided meta key.
       			// Use <code>meta_value_num</code> since the meta value
                               // for shared_counts are numeric.
       			$query->set( 'orderby', 'meta_value_num date' );
   
                  break;
   
   
             }
   
          }
   
       }
       ```
   
 * The nice function using ‘switch’ comes from [wpdreamer](https://wpdreamer.com/2014/04/how-to-make-your-wordpress-admin-columns-sortable/)
   and was helpful since I had columns from another plugin with the same issue. 
   This [answer on stackexchange](https://wordpress.stackexchange.com/a/301163/144711)
   provided the solution for getting the posts without a shared_count_total to show.
    -  This reply was modified 7 years, 8 months ago by [sloweye](https://wordpress.org/support/users/sloweye/).
      Reason: corrections to comments in code
    -  This reply was modified 7 years, 8 months ago by [sloweye](https://wordpress.org/support/users/sloweye/).
    -  This reply was modified 7 years, 8 months ago by [sloweye](https://wordpress.org/support/users/sloweye/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce Tax (formerly WooCommerce Shipping & Tax)] No receipt for label purchases?](https://wordpress.org/support/topic/no-receipt-for-label-purchases/)
 *  Thread Starter [sloweye](https://wordpress.org/support/users/sloweye/)
 * (@sloweye)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/no-receipt-for-label-purchases/#post-9800347)
 * Thanks for both responses, but I may have emphasized the wrong part of the problem
   by titling my request as I did. Let me try again!
 * I had no problem locating the receipts in the WordPress.com account info. The
   problem is that I have no way to tell which transaction goes with which shipment.
 * If a shipping address or tracking number or “any” identifying information was
   present on the receipt, it would be a big help.
 * To make it even better, why not just provide a link to or copy of the receipt
   in the woocommerce order view? This would make it possible for someone with shop
   manager permissions to see the paper trail (and know whether a label was purchased
   for that order) without needing permission to log into the WordPress.com account.
 * Does that explain the problem in a way that makes sense?
 * Thanks.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Boxzilla - WordPress Popup Builder] No luck with manual HTML links](https://wordpress.org/support/topic/no-luck-with-manual-html-links/)
 *  Thread Starter [sloweye](https://wordpress.org/support/users/sloweye/)
 * (@sloweye)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/no-luck-with-manual-html-links/#post-8782686)
 * Thank you for taking time to respond. The plug-in most defintely is not working
   in the way you describe.
 * Version of Boxzilla is 3.1.8, looks to be the latest version on WordPress.org
 * Please take a look at the the following link:
    [This page is set-up with a box with exactly the settings you describe](http://staging2.sloweye.net/sand-boxzilla-test/#boxzilla-4219)
 * The box is loading immediately on page load, does not respond to clicks on the
   link at all.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Connect Matomo - Analytics Dashboard for WordPress] Error in combination with Jetpack comments](https://wordpress.org/support/topic/error-in-combination-with-jetpack-comments/)
 *  [sloweye](https://wordpress.org/support/users/sloweye/)
 * (@sloweye)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/error-in-combination-with-jetpack-comments/#post-7267146)
 * This same error message is displayed when attempting to run the Woocommerce Setup
   Wizard with Wp-Piwik activated. The HTML entity is `'rsaquo'` instead of `'hellip'`
 * Switching Wp-Piwik to the Http Mode or deactivating Wp-Piwik both made the problem
   go away with this plugin combination as well.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Infinite-Scroll] FIXED: Infinite Scroll on Custom Post Page](https://wordpress.org/support/topic/fixed-infinite-scroll-on-custom-post-page/)
 *  [sloweye](https://wordpress.org/support/users/sloweye/)
 * (@sloweye)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/fixed-infinite-scroll-on-custom-post-page/#post-3516693)
 * I think the decision to use `is_singular` prevents the infinite scroll script
   from adding to load times on pages where it is not needed. That is one advantage,
   anyway.
 * Unfortunately `is_singular` also prevents the script from loading on custom post
   type archives.[ In Codex here](http://codex.wordpress.org/Function_Reference/is_singular)
 * Replacing `is_singular` with `is_single` (in the Codex [http://codex.wordpress.org/Function_Reference/is_single](http://codex.wordpress.org/Function_Reference/is_single))
   allows custom post archives and custom queries to load the script, while still
   leaving the code out on single page views where it would serve no purpose.
 * So at the bottom of `infinite-scroll/infinite-scroll.php` this:
 *     ```
       /**
       	 * Determines if the jQuery plugin and corresponding options should
       	 * be output onto the page.
       	 *
       	 * @return bool
       	 */
       	function shouldLoadJavascript() {
       		// Don't need to load the plugin on single pages
       		if (is_singular()) {
       			return false;
       		}
   
       		return true;
       	}
       ```
   
 * Is replaced by this:
 *     ```
       /**
       	 * Determines if the jQuery plugin and corresponding options should
       	 * be output onto the page.
       	 *
       	 * @return bool
       	 */
       	function shouldLoadJavascript() {
       		// Don't need to load the plugin on single pages
       		if (is_single()) {
       			return false;
       		}
   
       		return true;
       	}
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Gallery to Slideshow] [Plugin: Gallery to Slideshow] Missing tags in output when link=""](https://wordpress.org/support/topic/plugin-gallery-to-slideshow-missing-tags-in-output-when-link/)
 *  Thread Starter [sloweye](https://wordpress.org/support/users/sloweye/)
 * (@sloweye)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/plugin-gallery-to-slideshow-missing-tags-in-output-when-link/#post-2618171)
 * Actually, I think it’s closer to expected behavior without the `href"#"`– the
   pointer is kind of confusing.
 * But not sure if that is semantic?

Viewing 13 replies - 1 through 13 (of 13 total)