Giri

Forum Replies Created

Viewing 15 posts - 346 through 360 (of 2,661 total)
  • Author
    Posts
  • in reply to: Add class to searchbar input #384731

    Giri
    Expired Member
    Post count: 3155

    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";
    }

    Giri
    Expired Member
    Post count: 3155

    Hi 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');
    in reply to: NEW function ? #384537

    Giri
    Expired Member
    Post count: 3155

    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

    in reply to: Move Event Date on Details Page #384518

    Giri
    Expired Member
    Post count: 3155

    Hi Jorge,

    Please post your site url where we can check the issue. If possible provide the login details too.

    Thanks

    in reply to: Add class to searchbar input #384510

    Giri
    Expired Member
    Post count: 3155

    Hi Falk, Please provide the html code with your class. I’ll add the code and give you.

    Thanks


    Giri
    Expired Member
    Post count: 3155

    I’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.

    in reply to: Show complete address #384352

    Giri
    Expired Member
    Post count: 3155

    Hi Nick, Please open a new thread and give me the site credentials.

    Thanks


    Giri
    Expired Member
    Post count: 3155

    Hi 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.


    Giri
    Expired Member
    Post count: 3155

    Please post your wp admin login details in a private reply.

    Thanks


    Giri
    Expired Member
    Post count: 3155

    If 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/


    Giri
    Expired Member
    Post count: 3155

    My 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 #1b

    However 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>&nbsp;/&nbsp;<span>' . $overall_max_rating . '</span> '.__( 'based on', 'geodir_reviewratings' ) . '&nbsp;<span class="count">' . $total_reviews . '</span>&nbsp;';
    				$html .= $total_reviews > 1 ? __( 'reviews', 'geodir_reviewratings' ) : __( 'review', 'geodir_reviewratings' );
    				$html .= '</span><br />';
    				$html .= '</div>';
    			}
    		}
    	}
    
    	echo $html;
    }
    in reply to: Show complete address #384302

    Giri
    Expired Member
    Post count: 3155
    in reply to: Show complete address #384209

    Giri
    Expired Member
    Post count: 3155

    Hi Tania,

    Try this css.

    
    
    .sd-detail-info .sd-address, .sd-detail-info .sd-ratings {
        clear: both;
    }

    Giri
    Expired Member
    Post count: 3155

    Hi,

    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>&nbsp;/&nbsp;<span>' . $overall_max_rating . '</span> '.__( 'based on', 'geodir_reviewratings' ) . '&nbsp;<span class="count">' . $total_reviews . '</span>&nbsp;';
    				$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?

    in reply to: Show complete address #384165

    Giri
    Expired Member
    Post count: 3155

    Hi Tania,

    You need custom css. Can you provide your site link. I’ll give you the css.

    Thanks

Viewing 15 posts - 346 through 360 (of 2,661 total)
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount