Title: cabplan's Replies | WordPress.org

---

# cabplan

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

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

 Search replies:

## Forum Replies Created

Viewing 15 replies - 1 through 15 (of 19 total)

1 [2](https://wordpress.org/support/users/cabplan/replies/page/2/?output_format=md)
[→](https://wordpress.org/support/users/cabplan/replies/page/2/?output_format=md)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[AMP] Vimeo video iframe source is not working](https://wordpress.org/support/topic/vimeo-video-iframe-source-is-not-working/)
 *  Thread Starter [cabplan](https://wordpress.org/support/users/cabplan/)
 * (@cabplan)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/vimeo-video-iframe-source-is-not-working/#post-8676148)
 * So after digging and digging, and no one answering my question above, I believe
   it actually turns out that is had to do with the Vimeo link used, it was a private
   Vimeo link, instead of the public link, even though it was set to public. Also
   there was discrepancies where I had to re-save Vimeo settings in Vimeo to actually
   get videos to appear in the post when the AMP page was displaying fine, very 
   strange.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[AMP] Vimeo video iframe source is not working](https://wordpress.org/support/topic/vimeo-video-iframe-source-is-not-working/)
 *  Thread Starter [cabplan](https://wordpress.org/support/users/cabplan/)
 * (@cabplan)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/vimeo-video-iframe-source-is-not-working/#post-8582221)
 * The script I added to my functions.php to let the AMP version of the post is 
   this:
 *     ```
       add_action( 'amp_post_template_footer', 'amp_add_iframe' );  // Adding iframe script to head tag of Amp page 
       function amp_add_iframe( $amp_template ) { ?>
       <script>
       	window.onload = function () {
       		var t = document.getElementsByName('amp_iframe0')[0].src;
       		t = t.substr(0, t.lastIndexOf("/"));
       		var frame_src = document.getElementsByName('amp_iframe0')[0].src = t;
       	}
   
       </script>
       ```
   
 * But again this does not help the CDN that cdn.ampproject.org is serving, because
   Apps like LinkedIn serve that CDN version, not my URL.
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [[Eventbrite Venue] Errors and links not working](https://wordpress.org/support/topic/errors-and-links-not-working/)
 *  [cabplan](https://wordpress.org/support/users/cabplan/)
 * (@cabplan)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/errors-and-links-not-working/#post-6831266)
 * I am also having this same error. Does no one know how to fix this? Here is my
   test site:
 * [http://wptest.thewiptheater.com](http://wptest.thewiptheater.com)
 * Please let me know if there is code I can adjust or what steps need to be made
   to make this work.
 * Please do not tell me it is a PHP 64 bit issue cause that would be ridiculous.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Redirection] Redirection Plugin iThemes Security Plugin](https://wordpress.org/support/topic/redirection-plugin-ithemes-security-plugin/)
 *  [cabplan](https://wordpress.org/support/users/cabplan/)
 * (@cabplan)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/redirection-plugin-ithemes-security-plugin/#post-4960153)
 * I am having the same issues with redirection plugin and using iThemes, any assistance
   would be much appreciated.
 * WP Version: 4.1
    iThemes Security: 4.6.6
 *   Forum: [Networking WordPress](https://wordpress.org/support/forum/multisite/)
   
   In reply to: [Multiple Multi-sites on one set of core files](https://wordpress.org/support/topic/multiple-multi-sites-on-one-set-of-core-files/)
 *  Thread Starter [cabplan](https://wordpress.org/support/users/cabplan/)
 * (@cabplan)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/multiple-multi-sites-on-one-set-of-core-files/#post-5641898)
 * Actually doing a little research, I was able to accomplish what I was trying 
   to do from this article:
 * [http://jason.pureconcepts.net/2012/08/wordpress-multitenancy/](http://jason.pureconcepts.net/2012/08/wordpress-multitenancy/)
 * This explained exactly what I needed to do in terms of setting up core WP files
   but also have unique wp-config files on lower levels of other instances.
 * Another article I found useful was:
    [http://viastudio.com/configuring-wordpress-multiple-environments/](http://viastudio.com/configuring-wordpress-multiple-environments/)
 *   Forum: [Networking WordPress](https://wordpress.org/support/forum/multisite/)
   
   In reply to: [Multiple Multi-sites on one set of core files](https://wordpress.org/support/topic/multiple-multi-sites-on-one-set-of-core-files/)
 *  Thread Starter [cabplan](https://wordpress.org/support/users/cabplan/)
 * (@cabplan)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/multiple-multi-sites-on-one-set-of-core-files/#post-5641880)
 * Hi Mike, so I would add these commands to the main wp-config.php file on the 
   root level? What happens file I have a dev URL, would I have add that in as well?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Paid Membership Plugin, Ecommerce, User Registration Form, Login Form, User Profile & Restrict Content – ProfilePress] using [avatar_upload] and Choose Image button won't work](https://wordpress.org/support/topic/using-avatar_upload-and-choose-image-button-wont-work/)
 *  [cabplan](https://wordpress.org/support/users/cabplan/)
 * (@cabplan)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/using-avatar_upload-and-choose-image-button-wont-work/#post-4811774)
 * I also found out that if you are trying to use symlinks to different versions
   of the plugins for testing, the files actually have to be in the root folder 
   of wp-user-avatar, you cannot have a symlink pointing to wp-user-avatar/wp-user-
   avatar-1.19.7, the buttons do not work and images are broken when you attempt
   this. Once I put the files in the root of wp-user-avatar and symlinked to that
   folder, the plugin worked.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Filter by User Custom Field](https://wordpress.org/support/topic/filter-by-user-custom-field/)
 *  Thread Starter [cabplan](https://wordpress.org/support/users/cabplan/)
 * (@cabplan)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/filter-by-user-custom-field/#post-2542912)
 * Yes, here are the fields in my functions.php file:
 *     ```
       update_usermeta( $user_id, 'location', $_POST['location'] );
       update_usermeta( $user_id, 'program', $_POST['program'] );
       ```
   
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Filter by User Custom Field](https://wordpress.org/support/topic/filter-by-user-custom-field/)
 *  Thread Starter [cabplan](https://wordpress.org/support/users/cabplan/)
 * (@cabplan)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/filter-by-user-custom-field/#post-2542910)
 * You can see all the bloggers here, [http://blogs.luc.edu/goglobal/bloggers/](http://blogs.luc.edu/goglobal/bloggers/),
   I want the same layout but just filter it by country that matches “Rome, Italy”
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Filter by User Custom Field](https://wordpress.org/support/topic/filter-by-user-custom-field/)
 *  Thread Starter [cabplan](https://wordpress.org/support/users/cabplan/)
 * (@cabplan)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/filter-by-user-custom-field/#post-2542909)
 * Every user has a field in their actual profile called “location” where they indicate
   where they are traveling to, here is the blog: [http://blogs.luc.edu/goglobal](http://blogs.luc.edu/goglobal)
 * Every blogger has a country (i.e. location) they indicate in the user profile,
   so it is not associated with a post but their user profile. So trying to figure
   out how to filter by the field that matches say “Rome, Italy”, does that clarify?
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Filter by User Custom Field](https://wordpress.org/support/topic/filter-by-user-custom-field/)
 *  Thread Starter [cabplan](https://wordpress.org/support/users/cabplan/)
 * (@cabplan)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/filter-by-user-custom-field/#post-2542907)
 * Basically what I am trying to do is output a list of bloggers based on country.
   This country is a field they indicate in their User Profile (i.e. Rome, Italy).
   I currently can list all the bloggers and their locations but I was to build 
   a page for say “Rome, Italy” and only show the bloggers who put that in their‘
   location’ field. Does that describe what I am trying to do? Thanks for helping
   me out.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Filter by User Custom Field](https://wordpress.org/support/topic/filter-by-user-custom-field/)
 *  Thread Starter [cabplan](https://wordpress.org/support/users/cabplan/)
 * (@cabplan)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/filter-by-user-custom-field/#post-2542905)
 * basically, to this sql line I need to somehow add the location field that is 
   in the User profile to filter on Rome, Italy:
 *     ```
       <?php
       			$excluded = '824, 265, 9, 1435, 1372, 920, 1437, 1695'; // To exclude Admin accounts
       			$sql = 'SELECT DISTINCT post_author FROM '.$wpdb->posts. " WHERE post_author NOT IN ($excluded) ORDER BY post_date ASC";
       			$authors = $wpdb->get_results($sql);
       			if($authors):
       			foreach($authors as $author):
       			?>
       ```
   
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Filter by User Custom Field](https://wordpress.org/support/topic/filter-by-user-custom-field/)
 *  Thread Starter [cabplan](https://wordpress.org/support/users/cabplan/)
 * (@cabplan)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/filter-by-user-custom-field/#post-2542904)
 * Actually I just tried to remove all my code and just use your code, and nothing
   is actually pulling in the source, before I had my old code in there as well 
   so I must have been pulling the admin account so nothing is actually pulling
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Filter by User Custom Field](https://wordpress.org/support/topic/filter-by-user-custom-field/)
 *  Thread Starter [cabplan](https://wordpress.org/support/users/cabplan/)
 * (@cabplan)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/filter-by-user-custom-field/#post-2542903)
 * Ok so it does look like this is outputting something in the source:
 *     ```
       <div class="author" id="author-">
       			<a href="http://blogs.luc.edu/goglobal/author/">
       			<span class="read-blog">Read</span>
       						<ul class="info">
       				<li class="name"></li>
       						</a>
       		</div>
       ```
   
 * But I am not sure how to use $args to output all the different elements I need
   to be displayed, here is my code the that works for displaying all users:
 * _[36 lines of code moderated as per the [Forum Rules](http://codex.wordpress.org/Forum_Welcome#Posting_Code).
   The maximum number of lines of code that you can post in these forums is **ten
   lines**. Please use the [pastebin](http://wordpress.pastebin.com/)]_
 * How do I use that filter to output all the elements, even just listing one would
   help me. Thanks for all your help
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Filter by User Custom Field](https://wordpress.org/support/topic/filter-by-user-custom-field/)
 *  Thread Starter [cabplan](https://wordpress.org/support/users/cabplan/)
 * (@cabplan)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/filter-by-user-custom-field/#post-2542898)
 * I still need help trying to filter on some fields I have in user profile, here
   is my code to pull all the authors who have a post:
 *     ```
       $author_count = array();
       	foreach ((array) $wpdb->get_results("SELECT DISTINCT post_author, COUNT(ID) AS count FROM $wpdb->posts WHERE post_type = 'post' AND " . get_private_posts_cap_sql( 'post' ) . " GROUP BY post_author") as $row) {
       		$author_count[$row->post_author] = $row->count;
       	}
       ```
   
 * how do I adjust this so that I can pull only authors who have “Rome, Italy in
   their Location field. I am not a very strong SQL coder so any help would be most
   appreciated.

Viewing 15 replies - 1 through 15 (of 19 total)

1 [2](https://wordpress.org/support/users/cabplan/replies/page/2/?output_format=md)
[→](https://wordpress.org/support/users/cabplan/replies/page/2/?output_format=md)