edow
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: How to create groups with YouTube live chatUnfortunately 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
In reply to: How to create groups with YouTube live chat@carike Thanks, some of them looks promising.
Forum: Hacks
In reply to: How to show nearby locations with latitude and longitudeThank 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
In reply to: How to show nearby locations with latitude and longitudeHi 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
In reply to: Is it safe to switch to https?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
In reply to: Is it safe to switch to https?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
In reply to: Sidebar tag check sees only tags from first 9 postsI 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=-1before 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
In reply to: Sidebar tag check sees only tags from first 9 postsWhen 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:
- It still doesn’t show all the tags from the whole category, but only from the current page
- 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
In reply to: How to show the posts with the highest votes on homepageHi! 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
In reply to: How to show the posts with the highest votes on homepageThis 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
In reply to: How to show the posts with the highest votes on homepageI 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
In reply to: Remove text field from comment formI 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
In reply to: Category sidebar seach: checkbox and custom fields problemThanks, 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 and let me know how you want to be mentioned. Do not feel obligated.
Forum: Hacks
In reply to: Category sidebar seach: checkbox and custom fields problemThanks 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
In reply to: Category sidebar seach: checkbox and custom fields problemSomeone made a Javascript solution for me. Everything works fine now.