Giri
Forum Replies Created
-
AuthorPosts
-
Hi Falk,
I still have no idea what are the fields you talking about. I presume its Search input and near input fields.
If thats the case use this code.
remove_action( 'geodir_search_form_inputs', 'geodir_search_form_search_input', 20 ); add_action( 'geodir_search_form_inputs', 'custom_geodir_search_form_search_input', 20 ); function custom_geodir_search_form_search_input() { $default_search_for_text = SEARCH_FOR_TEXT; if ( get_option( 'geodir_search_field_default_text' ) ) { $default_search_for_text = __( get_option( 'geodir_search_field_default_text' ), 'geodirectory' ); } $new_style = get_option('geodir_show_search_old_search_from') ? false : true; if($new_style){ echo "<div class='gd-search-input-wrapper gd-search-field-search'>"; } ?> <input class="search_text form-control" name="s" value="<?php if ( isset( $_REQUEST['s'] ) && trim( $_REQUEST['s'] ) != '' ) { echo esc_attr( stripslashes_deep( $_REQUEST['s'] ) ); } else { echo $default_search_for_text; } ?>" type="text" onblur="if (this.value.trim() == '') {this.value = '<?php echo esc_sql( $default_search_for_text ); ?>';}" onfocus="if (this.value == '<?php echo esc_sql( $default_search_for_text ); ?>') {this.value = '';}" onkeydown="javascript: if(event.keyCode == 13) geodir_click_search(this);"> <?php if($new_style){ echo "</div>"; } } add_filter('geodir_search_near_class', 'custom_geodir_search_near_class'); function custom_geodir_search_near_class() { return "form-control"; }
June 26, 2017 at 10:56 am in reply to: add star rating under event title, add individual rating summary #384729Hi Edit this file.
wp-content/plugins/geodir_review_rating_manager/geodir_reviewrating_template_functions.php
Function: geodir_reviewrating_show_post_ratings()
Replace this part
echo '<div class="gd-rating-overall-rating"><span class="gd-rating-overall-rating-title">'.__('Overall Rating:', 'geodir_reviewratings').'</span>'.$overall_html.'</div>'.$ratings_html;
with
echo '<div class="gd-rating-overall-rating"><span class="gd-rating-overall-rating-title">'.__('Overall Rating:', 'geodir_reviewratings').'</span>'.$overall_html.'</div>'.$ratings_html; do_action('gd_rating_manager_overall_after');
Hi Eric,
We have a RSVP feature called “Are you interested” in whoop. We recently moved that to bp integration addon. You can find the whoop doc here.
https://wpgeodirectory.com/docs/whoop-theme-available-widgets/#ayi-widget
If you want to remove that, please use this snippet somewhere.
remove_action('plugins_loaded','geodir_load_ayi_buddypress');
I’ll add setting in next version.
Thanks
Hi Jorge,
Please post your site url where we can check the issue. If possible provide the login details too.
Thanks
Hi Falk, Please provide the html code with your class. I’ll add the code and give you.
Thanks
June 23, 2017 at 2:18 pm in reply to: add star rating under event title, add individual rating summary #384508I’m not seeing the second rating in this page.
https://www.whatrun.com/races/australia/western-australia/perth/10-km-6-2-mi/test-race-10k-1/
Have you added the code I given?
One more question: What happens when Whoop is upgraded? Do I have to modify reviews.php and events.php each time whoop is upgraded?
I added the hooks in whoop development copy too. So when you upgrade, you won’t lose your modifications.
Hi Nick, Please open a new thread and give me the site credentials.
Thanks
June 22, 2017 at 2:33 pm in reply to: add star rating under event title, add individual rating summary #384348Hi there,
You should have mentioned you are using whoop theme. Whoop theme uses customized event template.
I have modified your snippet.
How ever you need to add two lines of code by editing whoop theme source code. I’m unable to do it via wp-admin
Follow these steps
File: /wp-content/themes/geodirectory_whoop/reviews.php
line number: ~ 24
Modify this line
<?php // You can start editing here -- including this comment! ?>
with
<?php // You can start editing here -- including this comment! ?> <?php do_action('geodir_before_review_list'); ?>
File: /wp-content/themes/geodirectory_whoop/functions/events.php
Search and Modify this line
<div class="whoop_event_details">
with
<?php do_action('geodir_whoop_event_detail_after_title'); ?> <div class="whoop_event_details">
Let me know how that goes.
June 22, 2017 at 1:43 pm in reply to: add star rating under event title, add individual rating summary #384342Please post your wp admin login details in a private reply.
Thanks
June 22, 2017 at 12:48 pm in reply to: add star rating under event title, add individual rating summary #384330If my code doesn’t work, then either you have not activated the snippet or you have already customised the templates.
For #2, you can submit a feature request here. https://wpgeodirectory.com/requests/
June 22, 2017 at 10:28 am in reply to: add star rating under event title, add individual rating summary #384310My old code should work. Because i tested that before giving it to you. keep in mind that would work only in event detail pages since thats what you asked.
You can replace my old code with this one.
This should solve #1a and #1bHowever for 2 its not possible without hiring a 3rd party developer.
Sorry about that.
add_action('geodir_before_review_list', 'custom_geodir_reviewrating_detail_page_rating_summary'); add_action('geodir_details_main_content', 'custom_geodir_reviewrating_detail_page_rating_summary', 21); function custom_geodir_reviewrating_detail_page_rating_summary() { global $post; if ($post->post_type != 'gd_event') { return; } $post_id = $post->ID; $avg_rating = geodir_get_post_rating($post->ID); $html = ''; if ( get_option( 'geodir_reviewrating_hide_rating_summary' ) ) { return; } if ( !empty( $post_id ) && $avg_rating != '' ) { $geodir_post_info = geodir_get_post_info( $post_id ); if ( !empty( $geodir_post_info ) ) { $overall_max_rating = (int)get_option( 'geodir_reviewrating_overall_count' ); $total_reviews = geodir_get_review_count_total( $post_id ); if ( $total_reviews > 0 ) { echo geodir_reviewrating_draw_overall_rating($avg_rating); $html .= '<div class="average-review">'; $avg_ratings = ( is_float( $avg_rating ) || ( strpos( $avg_rating, ".", 1 ) == 1 && strlen( $avg_rating ) > 3) ) ? number_format( $avg_rating, 1, '.', '') : $avg_rating; $html .= '<span>'; $html .= '<span class="rating">' . $avg_ratings . '</span> / <span>' . $overall_max_rating . '</span> '.__( 'based on', 'geodir_reviewratings' ) . ' <span class="count">' . $total_reviews . '</span> '; $html .= $total_reviews > 1 ? __( 'reviews', 'geodir_reviewratings' ) : __( 'review', 'geodir_reviewratings' ); $html .= '</span><br />'; $html .= '</div>'; } } } echo $html; }
This code displays city too.
https://wpgeodirectory.com/support/topic/show-complete-address/#post-383803
Hi Tania,
Try this css.
.sd-detail-info .sd-address, .sd-detail-info .sd-ratings { clear: both; }
June 21, 2017 at 12:25 pm in reply to: add star rating under event title, add individual rating summary #384170Hi,
You can use this code for #1
add_action('geodir_details_main_content', 'custom_geodir_reviewrating_detail_page_rating_summary', 21); function custom_geodir_reviewrating_detail_page_rating_summary() { global $post; if ($post->post_type != 'gd_event') { return; } $post_id = $post->ID; $avg_rating = geodir_get_post_rating($post->ID); $html = ''; if ( get_option( 'geodir_reviewrating_hide_rating_summary' ) ) { return; } if ( !empty( $post_id ) && $avg_rating != '' ) { $geodir_post_info = geodir_get_post_info( $post_id ); if ( !empty( $geodir_post_info ) ) { $overall_max_rating = (int)get_option( 'geodir_reviewrating_overall_count' ); $total_reviews = geodir_get_review_count_total( $post_id ); if ( $total_reviews > 0 ) { echo geodir_reviewrating_draw_overall_rating($avg_rating); $html .= '<div class="average-review">'; $avg_ratings = ( is_float( $avg_rating ) || ( strpos( $avg_rating, ".", 1 ) == 1 && strlen( $avg_rating ) > 3) ) ? number_format( $avg_rating, 1, '.', '') : $avg_rating; $html .= '<span>'; $html .= '<span class="rating">' . $avg_ratings . '</span> / <span>' . $overall_max_rating . '</span> '.__( 'based on', 'geodir_reviewratings' ) . ' <span class="count">' . $total_reviews . '</span> '; $html .= $total_reviews > 1 ? __( 'reviews', 'geodir_reviewratings' ) : __( 'review', 'geodir_reviewratings' ); $html .= '</span><br />'; $html .= '</div>'; } } } echo $html; }
For #2 I need more details. What do you mean individual ratings? You mean you created separate ratings using review rating manager plugin?
If yes where you want that to display? Under title just like #1?
Hi Tania,
You need custom css. Can you provide your site link. I’ll give you the css.
Thanks
-
AuthorPosts