Title: edow's Replies | WordPress.org

---

# edow

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

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

 Search replies:

## Forum Replies Created

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

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

 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [How to create groups with YouTube live chat](https://wordpress.org/support/topic/how-to-create-groups-with-youtube-live-chat/)
 *  Thread Starter [edow](https://wordpress.org/support/users/edow/)
 * (@edow)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/how-to-create-groups-with-youtube-live-chat/#post-12705460)
 * Unfortunately I can’t find what I’m looking for.
    It need to be a service which
   is widely used like something from Google of Facebook, so most people can login
   or you don’t need a login and now how it works.
 * Also, you have to create teams in the iframe.
    The size of the iframe will be
   about 25% of the screen.
 * In short, the user comes to the site, login in the iframe and can join a group
   chat.
 * Perhaps someone has a live example or experience with this.
 * I’m looking for something free, but willing to pay a one time price.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [How to create groups with YouTube live chat](https://wordpress.org/support/topic/how-to-create-groups-with-youtube-live-chat/)
 *  Thread Starter [edow](https://wordpress.org/support/users/edow/)
 * (@edow)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/how-to-create-groups-with-youtube-live-chat/#post-12700550)
 * [@carike](https://wordpress.org/support/users/carike/) Thanks, some of them looks
   promising.
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [How to show nearby locations with latitude and longitude](https://wordpress.org/support/topic/how-to-show-nearby-locations-with-latitude-and-longitude/)
 *  Thread Starter [edow](https://wordpress.org/support/users/edow/)
 * (@edow)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/how-to-show-nearby-locations-with-latitude-and-longitude/#post-5221969)
 * Thank you for your comprehensive answer! I have to think hard about this, because
   it sounds like a lot of work which (I think) I can’t do myself. As you mentioned
   it could also contain a lot of errors, so it have to be a solid code.
 * I’m going to read the websites you mentioned and think hard about this. Again
   thank you and I’ll come back on this topic soon.
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [How to show nearby locations with latitude and longitude](https://wordpress.org/support/topic/how-to-show-nearby-locations-with-latitude-and-longitude/)
 *  Thread Starter [edow](https://wordpress.org/support/users/edow/)
 * (@edow)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/how-to-show-nearby-locations-with-latitude-and-longitude/#post-5221873)
 * Hi bcworkz! The easy questions I try to manage myself 😉 It seems that you’re
   the only one responding to my complex questions. Thank you for that!
 * I hear it’s not that simple as it seems. Right now there’re about 300 posts, 
   but within a couple of years that should be thousands. For now I can change the
   lat/lon to two seperate custom fields if necessary, but I understand there’re
   more problems.
 * A 20 km square is also fine. It doesn’t have to be that precise, but it would
   be fine if the exact distance is shown. For example:
 * **Nearby accommodations:**
    - **Hotel ABC** _2,1 km_
    - **Hotel Stay2Day** _8,6 km_
    - **B&B 1234** _9,5 km_
    - **Motel OK** _11,9 km_
    - **Hotel Go** _19,1 km_
 * And then a similar list for restaurants/activities.
 * So, it don’t have to be very precise, but the precise distance have to be shown(
   maybe not after the comma). In the future ther’re hopefully a lot of posts (probably
   high in the thousands), so I’m looking for a solid function which is not asking
   to much from the server.
 * Maybe I also should mention that I want this function in the sidebar. I noticed
   that the sidebar sometimes works different than the actual post.
 * What do you mean with _What is the maximum latitude range of all of your records?_
   If I think I know what you mean it is than the answer is that the lat/lon can
   be all over the world. Right now only in Europe, but later I hope/think it will
   be outside Europe also.
 * Hopefully it’s doable. I understand it’s not easy. Where should I start? Hopefully
   you can show me the right way so I can try to achieve this.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Is it safe to switch to https?](https://wordpress.org/support/topic/is-it-safe-to-switch-to-https/)
 *  Thread Starter [edow](https://wordpress.org/support/users/edow/)
 * (@edow)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/is-it-safe-to-switch-to-https/#post-5173849)
 * Thank you for your reply. I changed the http URLs to https and I used your code
   for wp-config.php and everything is working already!
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Is it safe to switch to https?](https://wordpress.org/support/topic/is-it-safe-to-switch-to-https/)
 *  Thread Starter [edow](https://wordpress.org/support/users/edow/)
 * (@edow)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/is-it-safe-to-switch-to-https/#post-5173645)
 * Hi, thank you for your reply.
 * Yes, I was thinking about doing it for the entire website. In my theme I have
   hard coded URLs and some WordPress permalink PHP codes for example, so I have
   both I guess. But I’m not sure about the WordPress core and the plugins. If it’s
   not recommended then I don’t need it for the login page, but otherwise I do.
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [Sidebar tag check sees only tags from first 9 posts](https://wordpress.org/support/topic/sidebar-tag-check-sees-only-tags-from-first-9-posts/)
 *  Thread Starter [edow](https://wordpress.org/support/users/edow/)
 * (@edow)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/sidebar-tag-check-sees-only-tags-from-first-9-posts/#post-5050462)
 * I think I got it. I changed the line to:
    `query_posts('category_name='.$yourcat-
   >slug.'&paged='.$paged.'&posts_per_page=-1');`
 * and now it works. I tried `posts_per_page=-1` before without luck, but it seems
   that it works in combination with `&paged='.$paged.'`.
 * Maybe someone can verify that this code is safe to use. Or maybe someone have
   a better solution.
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [Sidebar tag check sees only tags from first 9 posts](https://wordpress.org/support/topic/sidebar-tag-check-sees-only-tags-from-first-9-posts/)
 *  Thread Starter [edow](https://wordpress.org/support/users/edow/)
 * (@edow)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/sidebar-tag-check-sees-only-tags-from-first-9-posts/#post-5050452)
 * When I change this:
    `query_posts('category_name='.$yourcat->slug);`
 * to this:
    `query_posts('category_name='.$yourcat->slug.'&paged='.$paged.'');`
 * and I go to page 2 then it shows the tags from the post from page 2 (which it
   didn’t before) so that is a beginning.
 * But then it leaves me with the following problems:
    1. It still doesn’t show all the tags from the whole category, but only from the
       current page
    2. When I’m on page 2 and click on a results it redirects to page 1 (that’s what
       I want), but then it doesn’t show the tag in the sidebar, because it’s not page
       2 anymore
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [How to show the posts with the highest votes on homepage](https://wordpress.org/support/topic/how-to-show-the-posts-with-the-highest-votes-on-homepage/)
 *  Thread Starter [edow](https://wordpress.org/support/users/edow/)
 * (@edow)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/how-to-show-the-posts-with-the-highest-votes-on-homepage/#post-5014759)
 * Hi! I hope you had a great time again. I see you’re talking about traveling often,
   which sounds good 🙂
 * I’m sorry I wasn’t clear the first time. Indeed I want a top 5 of posts with 
   the highest score for each category. I was wondering if it was easy to make, 
   but it sounds like a lot of work which, with my skills, will be hard to achieve.
 * Maybe you can show me some hints, so I can look if it’s doable for me.
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [How to show the posts with the highest votes on homepage](https://wordpress.org/support/topic/how-to-show-the-posts-with-the-highest-votes-on-homepage/)
 *  Thread Starter [edow](https://wordpress.org/support/users/edow/)
 * (@edow)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/how-to-show-the-posts-with-the-highest-votes-on-homepage/#post-5014581)
 * This is working for the loops now:
 *     ```
       <?php
       			$popular_restaurants = new WP_Query( array(
       				'post_type'             => 'restaurant',
       				'posts_per_page'        => 5,
       				'category_name'         => 'restaurants',
       				'ignore_sticky_posts'   => true,
       				'orderby'               => 'comment_count',
       				'order'                 => 'DESC',
       				'date_query' => array(
       					array(
       						'after' => '0',
       					),
       				),
       			) );
       		?>
       		<?php if ( $popular_restaurants->have_posts() ) : ?>
       		<?php while ( $popular_restaurants->have_posts() ): $popular_restaurants->the_post(); ?>
       			<li><a href="<?php the_permalink() ?>"><?php the_title(); ?></a> (<?php comments_number( 'Nu stemmen!', '1', '%' ); ?>)</li>
       		<?php endwhile; ?>
       		<?php wp_reset_postdata(); ?>
   
       		<?php else:  ?>
   
       		<p><?php _e( 'Sorry, er gaat even iets fout. We hebben niets kunnen vinden.' ); ?></p>
   
       		<?php endif; ?>
       ```
   
 * Now I only have the question about how to deal with the most voted posts instead
   of showing the most commented posts.
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [How to show the posts with the highest votes on homepage](https://wordpress.org/support/topic/how-to-show-the-posts-with-the-highest-votes-on-homepage/)
 *  Thread Starter [edow](https://wordpress.org/support/users/edow/)
 * (@edow)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/how-to-show-the-posts-with-the-highest-votes-on-homepage/#post-5014549)
 * I changed the query to:
 *     ```
       <?php
       			$popular_activiteit = new WP_Query( array(
       				'post_type'             => 'post',
       				'posts_per_page'        => 5,
       				'category_name'         => 'activiteit',
       				'ignore_sticky_posts'   => true,
       				'orderby'               => 'comment_count',
       				'order'                 => 'DESC',
       				'date_query' => array(
       					array(
       						'after' => '0',
       					),
       				),
       			) );
       		?>
       		<?php if ( $popular_activiteit->have_posts() ) : ?>
       		<?php while ( $popular_activiteit->have_posts() ): $popular_activiteit->the_post(); ?>
       			<li><a href="<?php the_permalink() ?>"><?php the_title(); ?></a> (<?php comments_number( 'Nu stemmen!', '1', '%' ); ?>)</li>
       		<?php endwhile; ?>
       		<?php wp_reset_postdata(); ?>
   
       		<?php else:  ?>
   
       		<p><?php _e( 'Sorry, er gaat even iets fout. We hebben niets kunnen vinden.' ); ?></p>
   
       		<?php endif; ?>
       ```
   
 * The first query works, but when I try three of these queries (with other category
   names) it only shows the post of the first query.
 * Also, I don’t know a solution for the “order by score” function yet. Still trying.
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [Remove text field from comment form](https://wordpress.org/support/topic/remove-text-field-from-comment-form/)
 *  Thread Starter [edow](https://wordpress.org/support/users/edow/)
 * (@edow)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/remove-text-field-from-comment-form/page/4/#post-4673509)
 * I feel guilty to ask something again in this topic, but it seems to me this is
   the best place to ask it.
 * As seen above I use this code to show the post score:
 *     ```
       <?php
       $counts = aigoo_get_score();
       			extract( $counts );  //restores compacted variables
   
       <span>+'.$score.'</span>
       ?>
       ```
   
 * The following code is showing the latest 5 posts with the most comments in a 
   specific category on my homepage:
 *     ```
       <?php
       			$popular = new WP_Query( array(
       				'post_type'             => array( 'post' ),
       				'showposts'             => 5,
       				'cat'                   => 'activiteit',
       				'ignore_sticky_posts'   => true,
       				'orderby'               => 'comment_count',
       				'order'                 => 'dsc',
       				'date_query' => array(
       					array(
       						'after' => '0',
       					),
       				),
       			) );
       		?>
       		<?php while ( $popular->have_posts() ): $popular->the_post(); ?>
       			<li><a href="<?php the_permalink() ?>"><?php the_title(); ?></a> (<?php comments_number( 'Nu stemmen!', '1', '%' ); ?>)</li>
       		<?php endwhile; ?>
       ```
   
 * How can I make it happen that instead of showing the posts with the most comments
   it shows the posts with the **highest** voted comments on my homepage?
 * I don’t know if it’s even possible.
 * To be complete, this is in my functions.php:
 *     ```
       <?php
       /* Display likes/unlikes */
       function aigoo_get_score() {
          $comments = get_comments( array('post_id' => get_the_ID(),) );
       			$likes = array();
       			$unlikes = array();
       			foreach( $comments as $comment ) {
       				if('unlike' == $comment->comment_content ) $unlikes[] = $comment;
       					else $likes[] = $comment;
       			}
           $likescore = count( $likes );
       	$unlikescore = count( $unlikes );
       	$score = count($likes) - count($unlikes);
       	$totalvotes = count($likes) + count($unlikes);
       	return compact('likes', 'unlikes', 'likescore', 'unlikescore', 'score', 'totalvotes');
       }
       ?>
       ```
   
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [Category sidebar seach: checkbox and custom fields problem](https://wordpress.org/support/topic/category-sidebar-seach-checkbox-and-custom-fields-problem/)
 *  Thread Starter [edow](https://wordpress.org/support/users/edow/)
 * (@edow)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/category-sidebar-seach-checkbox-and-custom-fields-problem/page/2/#post-4837589)
 * Thanks, I had a great time. I’d be very happy to mention your name on the website.
   In about a month the new website will be online, so right now you only see the“
   old” website. If you want you can email me at [info@aigoo.nl](https://wordpress.org/support/users/edow/replies/info@aigoo.nl?output_format=md)
   and let me know how you want to be mentioned. Do not feel obligated.
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [Category sidebar seach: checkbox and custom fields problem](https://wordpress.org/support/topic/category-sidebar-seach-checkbox-and-custom-fields-problem/)
 *  Thread Starter [edow](https://wordpress.org/support/users/edow/)
 * (@edow)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/category-sidebar-seach-checkbox-and-custom-fields-problem/page/2/#post-4837565)
 * Thanks a lot! To thank you for all your help I can mention your name and website
   on the new website if you like. I’m on holiday tomorrow, so if you would like
   that I hear it when I’m back.
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [Category sidebar seach: checkbox and custom fields problem](https://wordpress.org/support/topic/category-sidebar-seach-checkbox-and-custom-fields-problem/)
 *  Thread Starter [edow](https://wordpress.org/support/users/edow/)
 * (@edow)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/category-sidebar-seach-checkbox-and-custom-fields-problem/page/2/#post-4837563)
 * Someone made a Javascript solution for me. Everything works fine now.

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

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