Naveen Giri

Forum Replies Created

Viewing 15 posts - 166 through 180 (of 1,165 total)
  • Author
    Posts
  • in reply to: Edit Location Pages #536060

    Naveen Giri
    Moderator
    Post count: 1559

    Hi joy,

    For #1, you can use following snippet.

    
    
    
    add_filter('geodir_location_meta_value', 'geodir_location_meta_value_callback', 10,4 );
    function geodir_location_meta_value_callback( $value, $_type, $info, $instance  ){
    	if( !empty( $instance['key'] ) &&  'location_image' == $instance['key'] ){
    		$value = wp_get_attachment_image_url( $info->image, $instance['image_size'], "", array( "class" => "img-responsive" ) );
    	}
    	return $value;
    }
    
    add_action( 'wp_head', function () { 
    	global $gd_post; 	
      $image_url = do_shortcode("[gd_location_meta title='search'  type=''  key='location_image'  image_size='full'  no_wrap='true'  alignment=''  text_alignment=''  list_hide=''  list_hide_secondary=''  css_class='' ]");
    $featured_img = get_the_post_thumbnail_url($gd_post->ID, 'full');
      $image_url = ( !empty( $image_url ))? $image_url : $featured_img;
    ?>
    	<style>
    		#custom-location-page-header{
    			background: url( ' <?php echo $image_url; ?>');
    		  background-position: center center;
    		  background-size: cover;
    		}
    	</style>
    <?php } );
    

    for #2, that is customization request. you can take help of our GD experts
    http://geodirectoryexperts.com/

    Thanks

    in reply to: Edit Location Pages #536045

    Naveen Giri
    Moderator
    Post count: 1559

    Please have a look now, you should have that option now.

    in reply to: Edit Location Pages #536042

    Naveen Giri
    Moderator
    Post count: 1559

    Hi Joy,

    Just reconfirmed, the location meta is not yet in Location manager v-2.0.0.24.
    It will be released in the upcoming version.
    If you want that I can add a patch for you.

    Please share your site details in a private reply.

    Thanks

    in reply to: Images type of files & GD Snippet issue #536040

    Naveen Giri
    Moderator
    Post count: 1559

    Hi Adrien,

    The script is correct and added from

    https://developer.wordpress.org/reference/hooks/comment_form_default_fields/

    It’s working fine.

    in reply to: Edit Location Pages #536037

    Naveen Giri
    Moderator
    Post count: 1559

    Hi joy

    if you have latest version of the location manager addon. there is a block that you can to pull location meta’s, like location images.

    You can also use the below shortcode to pull the current location image.

    
    [gd_location_meta title='search'  type=''  key='location_image'  image_size=''  no_wrap='false'  alignment=''  text_alignment=''  list_hide=''  list_hide_secondary=''  css_class='' ]
    

    If you building the page with elementor layouts. maybe you will have to do some CSS adjustments.

    Thanks

    in reply to: Output HTML for custom fields #535937

    Naveen Giri
    Moderator
    Post count: 1559

    Thanks for the confirmation, Stay safe from COVID-19.

    in reply to: Custom Post type ordering #535891

    Naveen Giri
    Moderator
    Post count: 1559

    Hi Joe,

    Please paste the full code you trying inside < code> tag.

    I will check and send you the correct code back.

    Thanks

    in reply to: Other Listings Nearby – Show only upcoming events. #535844

    Naveen Giri
    Moderator
    Post count: 1559

    Thanks for confirming. Stay safe from COVID-19.

    in reply to: Custom Post type ordering #535824

    Naveen Giri
    Moderator
    Post count: 1559

    Hi Joe,

    Please replace this line in your code in the begining.

    
    $args = array('post_type' => 'gd_place', 'orderby' => 'title', 'order' => 'DESC') ;

    Thanks

    in reply to: Other Listings Nearby – Show only upcoming events. #535823

    Naveen Giri
    Moderator
    Post count: 1559

    Hi Matt,

    for #2, you can try this code snippet.

    
    add_filter( 'get_terms', 'custom_cat_count_get_terms', 8, 4 );
    function custom_cat_count_get_terms( $terms, $taxonomy, $query_vars, $term_query ){
        remove_filter( 'get_terms', array( 'GeoDir_Event_Query', 'get_terms' ), 9, 4 );
        return $terms;
    }
    

    Thanks

    in reply to: Delete unused images #535812

    Naveen Giri
    Moderator
    Post count: 1559

    GD is saving images for portfolio, magazine, accordions, gallery, masonry and so on.

    If ( portfolio, magazine, accordions, gallery, masonry ) images sizes are defined in WordPress. every new post image will get cropped in those sizes.
    there is an only possible way to not allow those images from creation is to remove the add_image_size() function call for those sizes.

    Those images will never be used, GD is storing them itself without access to them.

    As there is no access to them, you can’t clean the library, because the images are not there.

    How you found that GD storing it without any public access?
    Could you please also share FTP and Site details so we can check it from our side?

    Thanks

    in reply to: Delete unused images #535793

    Naveen Giri
    Moderator
    Post count: 1559

    Hi P O,

    In WordPress we define sizes using add_image_size function. Generally, images sizes are defined in the theme function.php
    https://developer.wordpress.org/reference/functions/add_image_size/

    This function itself does not have any check for the post type.
    So if a size got added using it. It will be applicable to all the uploaded images on WordPress.

    If you want to completely disable a few image sizes for specific post types.
    You can search for the following code: add_image_size and/or set_post_thumbnail_size and comment it. Since its a customization. You can look for our GD Experts

    If you want to delete unused images. you can follow this article.
    https://wpengine.com/resources/wordpress-media-library-clean-up/

    Thanks

    in reply to: custom field used as meta description #535740

    Naveen Giri
    Moderator
    Post count: 1559
    This reply has been marked as private.
    in reply to: Output HTML for custom fields #535720

    Naveen Giri
    Moderator
    Post count: 1559

    Please use,

    
    global $gd_post;
    $field_value = $gd_post->merchantarticleupload;
    $field_value_array = explode( '|', $field_value );
    $file_url = ( !empty( $field_value_array[0] ) )? $field_value_array[0]: '';
    echo $file_url; 
    

    Thanks

    in reply to: Category descriptions disappeared #535702

    Naveen Giri
    Moderator
    Post count: 1559

    the patch is inside the location manager addon. which will be released in the upcoming version.

    but based on the issue. I have applied it to your site.

Viewing 15 posts - 166 through 180 (of 1,165 total)
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount