Title: dohertyjf's Replies | WordPress.org

---

# dohertyjf

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

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

 Search replies:

## Forum Replies Created

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

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Customer Reviews] Can we have option for auto publish review?](https://wordpress.org/support/topic/can-we-have-option-for-auto-publish-review/)
 *  [dohertyjf](https://wordpress.org/support/users/dohertyjf/)
 * (@dohertyjf)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/can-we-have-option-for-auto-publish-review/#post-10923762)
 * I’d also be interested in this.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Plugin: FacetWP] Only indexing first page of results](https://wordpress.org/support/topic/plugin-facetwp-only-indexing-first-page-of-results/)
 *  Thread Starter [dohertyjf](https://wordpress.org/support/users/dohertyjf/)
 * (@dohertyjf)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/plugin-facetwp-only-indexing-first-page-of-results/#post-7448185)
 * The hole gets deeper.
 * When I change (add, really) a query on the page and pull something different (
   eg blog posts) than tags, the filters do not change.
 * Scenario 1:
    Filters pull 10 agencies, 5 consultants. Page shows 15 results (
   10 agencies, 5 consultants)
 * Scenario 2:
    Filters pull 10 agencies, 5 consultants Page shows 25 blog posts
   not associated with that tag.
 * What am I doing wrong?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Plugin: FacetWP] Only indexing first page of results](https://wordpress.org/support/topic/plugin-facetwp-only-indexing-first-page-of-results/)
 *  Thread Starter [dohertyjf](https://wordpress.org/support/users/dohertyjf/)
 * (@dohertyjf)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/plugin-facetwp-only-indexing-first-page-of-results/#post-7448171)
 * This code has updated a bit.
 * Code – [http://pastebin.com/AWH78xhq](http://pastebin.com/AWH78xhq)
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [Help for Related Posts within Custom Post Type? Not looping](https://wordpress.org/support/topic/help-for-related-posts-within-custom-post-type-not-looping/)
 *  Thread Starter [dohertyjf](https://wordpress.org/support/users/dohertyjf/)
 * (@dohertyjf)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/help-for-related-posts-within-custom-post-type-not-looping/#post-7016804)
 * Thanks [@bcworkz](https://wordpress.org/support/users/bcworkz/). Didn’t really
   do anything unfortuntely. Changing it to grab just one tag actually further restricted.
 * An example page is [http://www.getcredo.com/team-member/john-doherty/](http://www.getcredo.com/team-member/john-doherty/).
   If you click around between the different profiles, you’ll often just see the
   same three. But, [http://www.getcredo.com/team-member/greg-gifford/](http://www.getcredo.com/team-member/greg-gifford/)
   returns better since he just has 1 tag. Thoughts?
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [Help for Related Posts within Custom Post Type? Not looping](https://wordpress.org/support/topic/help-for-related-posts-within-custom-post-type-not-looping/)
 *  Thread Starter [dohertyjf](https://wordpress.org/support/users/dohertyjf/)
 * (@dohertyjf)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/help-for-related-posts-within-custom-post-type-not-looping/#post-7016748)
 * So here’s another question – how would I make this code grab the first tag and
   match based off of that? I’m still only getting three or four different related“
   posts” pulling and not sure why.
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [Help for Related Posts within Custom Post Type? Not looping](https://wordpress.org/support/topic/help-for-related-posts-within-custom-post-type-not-looping/)
 *  Thread Starter [dohertyjf](https://wordpress.org/support/users/dohertyjf/)
 * (@dohertyjf)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/help-for-related-posts-within-custom-post-type-not-looping/#post-7016739)
 * Thanks [@bcworks](https://wordpress.org/support/users/bcworks/). Found that solution
   last night!
 * Right now my code is this:
 *     ```
       <div class="partner-area">
       <?php if (is_singular( 'team-member' ) ):
       								$orig_post = $post;
       								global $post;
       								$tags = wp_get_post_tags($post->ID);
   
       								if ($tags) {
       								$tag_ids = array();
       								foreach($tags as $individual_tag) $tag_ids[] = $individual_tag->term_id;
   
       								$args=array(
       								'tag__in' => $tag_ids,
       								'post__not_in' => array($post->ID),
       								'posts_per_page'=>3, // Number of related posts to display.
       								'caller_get_posts'=>1,
       								'post_type' => 'team-member',
       								'taxonomy' => 'team-member',
       								'orderby' => 'rand'
       								);
   
       								$my_query = new wp_query( $args );
   
       								while( $my_query->have_posts() ) {
       								$my_query->the_post();   ?>
   
       								<div class="relatedthumb">
       								<a rel="external" href="<? the_permalink()?>">
       									<div class="related-image"><?php the_post_thumbnail(array(200,200)); ?></div>
       									<br />
       									<div class="partner-name"><?php the_title(); ?></div>
       									</a>
       								</div>
   
       								<?php
   
       								$post = $orig_post;
       								wp_reset_query();
   
       								} }
   
       								endif;
   
       ?>
       ```
   
 * It’s working pretty well! Now just buttoning up some CSS.
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [Help for Related Posts within Custom Post Type? Not looping](https://wordpress.org/support/topic/help-for-related-posts-within-custom-post-type-not-looping/)
 *  Thread Starter [dohertyjf](https://wordpress.org/support/users/dohertyjf/)
 * (@dohertyjf)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/help-for-related-posts-within-custom-post-type-not-looping/#post-7016671)
 * My friend helped me figure out. Here is the working code:
 *     ```
       <div class="partner-area">
       <?php if (is_singular( 'team-member' ) ):
       								$orig_post = $post;
       								global $post;
       								$tags = wp_get_post_tags($post->ID);
   
       								if ($tags) {
       								$tag_ids = array();
       								foreach($tags as $individual_tag) $tag_ids[] = $individual_tag->term_id;
   
       								$args=array(
       								'tag__in' => $tag_ids,
       								'post__not_in' => array($post->ID),
       								'posts_per_page'=>3, // Number of related posts to display.
       								'caller_get_posts'=>1,
       								'post_type' => 'team-member',
       								'taxonomy' => 'team-member'
       								);
   
       								$my_query = new wp_query( $args );
   
       								while( $my_query->have_posts() ) {
       								$my_query->the_post();   ?>
   
       								<div class="relatedthumb">
       									<a rel="external" href="<? the_permalink()?>"><?php the_post_thumbnail(array(200,200)); ?><br />
       									<div class="partner-name"><?php the_title(); ?></div>
       									</a>
       								</div>
   
       								<?php
   
       								$post = $orig_post;
       								wp_reset_query();
   
       								} }
   
       								endif;
   
       ?>
       </div>
       ```
   
 * Now to figure out how to randomize what it calls so it’s not just calling the
   first 3…
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [[CSS] Mobile CSS layout issue](https://wordpress.org/support/topic/mobile-css-layout-issue/)
 *  Thread Starter [dohertyjf](https://wordpress.org/support/users/dohertyjf/)
 * (@dohertyjf)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/mobile-css-layout-issue/#post-6720802)
 * This is fixed mostly for me. I had to declare another class within CSS to make
   it work correctly.
 * Originally it was this:
 *  `#et-logo { float: none; margin-bottom: 20; } */
    body.home #et-logo { float:
   left; margin-bottom`: 0; }`
 * Now it’s this:
 *  `#top-menu.et-fixed #et-logo { float: left; }
    body.home #et-logo { float: left;
   margin-bottom: 0; }`
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [[CSS] Mobile CSS layout issue](https://wordpress.org/support/topic/mobile-css-layout-issue/)
 *  Thread Starter [dohertyjf](https://wordpress.org/support/users/dohertyjf/)
 * (@dohertyjf)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/mobile-css-layout-issue/#post-6720759)
 * Sorry, links if it’s helful.
 * [hiregun.co](http://hiregun.co) (I like this mobile nav layout when you scroll)
   
   [hiregun.com/seo-consultants/](http://hiregun.co/seo-consultants/) (formatting
   issues, want it like the homepage)

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