Paolo

Forum Replies Created

Viewing 15 posts - 20,116 through 20,130 (of 27,715 total)
  • Author
    Posts
  • in reply to: Change Title Text for Category links on Detail page #51963

    Paolo
    Site Admin
    Post count: 31211

    There is tiny mistake in the code above.

    Please find correct code below for future refernces:

    
    
    remove_action('geodir_details_main_content', 'geodir_action_details_taxonomies', 40);
    
    									 
    									  add_action( 'geodir_details_main_content', 'geodir_category_custom',40 );
    									  function geodir_category_custom() {
    global $preview,$post;?>
    <p class="geodir_post_taxomomies clearfix">  
    <?php
    
    $taxonomies = array();
    //print_r($post) ;
    
    if($preview)
    {
    	$post_type = $post->listing_type;
    	$post_taxonomy  = 	$post_type.'category' ;
    	$post->$post_taxonomy = $post->post_category[$post_taxonomy ] ;
    }
    else
    {
    	$post_type = $post->post_type;
    	$post_taxonomy  = 	$post_type.'category' ;
    }
    //{	
    $post_type_info = get_post_type_object( $post_type );
    $listing_label = $post_type_info->labels->singular_name;
    
                        if(!empty($post->post_tags))
    					{
                           
                            if(taxonomy_exists($post_type.'_tags')):
                                $links = array();
                                $terms = array();
    							// to limit post tags
    							$post_tags = trim($post->post_tags,",");
    							$post_id = isset($post->ID) ? $post->ID : '';
    							$post_tags = apply_filters('geodir_action_details_post_tags', $post_tags, $post_id);
                               
    						    $post->post_tags = $post_tags;
    							$post_tags = explode(",",trim($post->post_tags,","));
                            	
    							foreach($post_tags as $post_term){
            						
    								/*
    								$post_term = trim($post_term);
    							   
    							    if($insert_term = term_exists( $post_term, $post_type.'_tags' )){
                                        $term = get_term_by( 'name', $post_term, $post_type.'_tags'); 
                                    }else{
                                        $insert_term = wp_insert_term($post_term, $post_type.'_tags');
                                         $term = get_term_by( 'name', $post_term, $post_type.'_tags');
                                    }	
                                    
                                    if(! is_wp_error( $term ))
                                    {	
                                        //$links[] = "<a href='" . esc_attr( get_tag_link($term->term_id) ) . "'>$term->name</a>";
    									// fix tag link on detail page
    									$links[] = "<a href='" . esc_attr( get_term_link($term->term_id, $term->taxonomy) ) . "'>$term->name</a>";
    									$terms[] = $term;
                                    }
    								*/
    								// fix slug creation order for tags & location
    								$post_term = trim($post_term);
    							   	
    								$priority_location = false;
    								if($insert_term = term_exists( $post_term, $post_type.'_tags' )){
                                        $term = get_term_by( 'name', $post_term, $post_type.'_tags'); 
                                    }else{
                                        $post_country = isset($_REQUEST['post_country']) && $_REQUEST['post_country']!='' ? $_REQUEST['post_country'] : NULL;
    									$post_region = isset($_REQUEST['post_region']) && $_REQUEST['post_region']!='' ? $_REQUEST['post_region'] : NULL;
    									$post_city = isset($_REQUEST['post_city']) && $_REQUEST['post_city']!='' ? $_REQUEST['post_city'] : NULL;
    									$match_country = $post_country && sanitize_title($post_term) == sanitize_title($post_country) ? true : false;
    									$match_region = $post_region && sanitize_title($post_term) == sanitize_title($post_region) ? true : false;
    									$match_city = $post_city && sanitize_title($post_term) == sanitize_title($post_city) ? true : false;
    								    if ($match_country || $match_region || $match_city) {
    										$priority_location = true;
    										$term = get_term_by( 'name', $post_term, $post_type.'_tags');
    									} else {
    								    	$insert_term = wp_insert_term($post_term, $post_type.'_tags');
                                        	$term = get_term_by( 'name', $post_term, $post_type.'_tags');
    									}
                                    }	
                                    
                                    if(! is_wp_error( $term ))
                                    {	
                                        //$links[] = "<a href='" . esc_attr( get_tag_link($term->term_id) ) . "'>$term->name</a>";
    									// fix tag link on detail page
    									if ($priority_location) {
    										$links[] = "<a href=''>$post_term</a>";
    									} else {
    										$links[] = "<a href='" . esc_attr( get_term_link($term->term_id, $term->taxonomy) ) . "'>$term->name</a>";
    									}
    									$terms[] = $term;
                                    }
    								//
                                }
                            	if(!isset($listing_label)){$listing_label='';}
                                $taxonomies[$post_type.'_tags'] = wp_sprintf('%s: %l', ucwords($listing_label.' '. __('Tags' , GEODIRECTORY_TEXTDOMAIN) ), $links, (object)$terms);
                            endif;	
                            
                        }
                        
    					if(!empty($post->$post_taxonomy))
    					{
    					
    						$links = array();
                            $terms = array();
    						$post_term = explode(",",trim($post->$post_taxonomy,","));
    						
    						$post_term = array_unique($post_term);
    						if(!empty($post_term)){
    							foreach($post_term as $post_term){
    								$post_term = trim($post_term);
    								
    								if($post_term != ''):	
    									$term = get_term_by( 'id', $post_term, $post_taxonomy); 
    								  
    									$links[] = "<a href='".esc_attr( get_term_link($term,$post_taxonomy) ) . "'>$term->name</a>";
    									$terms[] = $term;
    								endif;
    							}
    						}
    						
    						if(!isset($listing_label)){$listing_label='';}
                            $taxonomies[$post_taxonomy] = wp_sprintf('%s: %l', ucwords( __('Area of Laws' , GEODIRECTORY_TEXTDOMAIN)), $links, (object)$terms);
                            
                        }
                        
                        
                        if(isset($taxonomies[$post_taxonomy])){ echo '<span class="geodir-category">' . $taxonomies[$post_taxonomy] . '</span>';	}	
    										
    										if(isset($taxonomies[$post_type.'_tags']))		
                        echo '<span class="geodir-tags">' . $taxonomies[$post_type.'_tags'] . '</span>';	
    
    ?> </p> <?php } 
    

    Thank you

    in reply to: Email Notification Request for information #51960

    Paolo
    Site Admin
    Post count: 31211

    Hi,

    that nornally happens when using a different registration form, or if you have any plugin hooking into the wordpress registration procees.

    Are you using GeoDirectory signup page to register?

    Let us know,

    Thanks

    in reply to: CSV Import Export Bug… ? #51942

    Paolo
    Site Admin
    Post count: 31211

    Hi,

    I just double checked to make sure and it exports both language and original_post_id.

    This means you can edit your export and reimport to update listings without losing translation relationships.

    Let us know,

    Thanks

    in reply to: Redirection Loop #51941

    Paolo
    Site Admin
    Post count: 31211

    Hi Luke,

    I’ve did some test now with both Firefox and Chrome with GD Booster enabled and everything seems to work well. Quite a fast response too from your server.

    DId you try clearing your browser cache?

    One thing I noticed, which is wrong, is that yu have the GeoDirectory List Manager add-on installed, that only works with Whoop! theme, which you haven’t installed. So I deactivated it, but that shouldn’t have caused any trouble.

    If you tell me exactly how to recreate the problem step by step, I’ll look into it further.

    Let us know,

    Thanks

    in reply to: Site width on GDFramework child theme #51939

    Paolo
    Site Admin
    Post count: 31211

    Thanks for letting us know.

    in reply to: Map not displaying on home page #51937

    Paolo
    Site Admin
    Post count: 31211

    Setting width to 100% should definitely solve that. Let us know if it doesn’t and it that case if you also provide admin credentials in a private reply, we will have a look.

    Thanks

    in reply to: Add Listing Page #51936

    Paolo
    Site Admin
    Post count: 31211

    No, thank you! 🙂

    in reply to: Add Listing Page #51932

    Paolo
    Site Admin
    Post count: 31211

    I understand now, I’ve never used the widget user interface of the customizer (exists since almost 1 year).

    I always use Appearance >> Widgets in wordpress backend. I find it much more user friendly.

    Still don’t understand if this is resolved or not though. Could you please let me know?

    Thanks

    in reply to: Listings are not in activity stream #51929

    Paolo
    Site Admin
    Post count: 31211

    Hi Dee,

    I’ve just tested on my demo, with GD plugin and all addons up to date. Listings are tracked correctly in activity and you can test directly here: http://dropct.com/enfold/activity/

    I would guess your problem could be caused by another plugin that you have installed and that I haven’t on my demo.

    Could you please kindly deactivate all non GD plugins to do a quick test and let us know if the problem persist? If it doesn’t at least we would know where to look at.

    Let us know,

    Thanks

    p.s. is that a live website? Wouldn’t it be wiser to work on addin/editing things on a staging server instread of working on a website that is generating traffic?

    in reply to: Add Listing Page #51926

    Paolo
    Site Admin
    Post count: 31211

    Hi,

    The add listing page is one for all custom post types. Places and Events share the same add listing page:

    http://contractorclubusa.com/add-listing/?listing_type=gd_place
    http://contractorclubusa.com/add-listing/?listing_type=gd_event

    The variable at the end determin if the form will be for a place or an event.

    However, I’m not 100% sure I understand the problem.

    GDF has 1 sidebar for the add listing page: GD Add Listing Right Sidebar.

    What problem are you experiencing exactly? Widgets added to that widget area are not showing up in the add listing sidebar?

    If you provide admin credentials in a private reply, we can have a look at your website directly and probably tell you more.

    Let us know,

    Thanks for your patience and for the awesome review!

    in reply to: Counted for favorite feature #51923

    Paolo
    Site Admin
    Post count: 31211

    Hi,

    not that I know of.

    Thanks

    in reply to: Map not displaying on home page #51921

    Paolo
    Site Admin
    Post count: 31211

    Let us know if that was the problem, if it was not, please provide admin credentials in a private reply and we will ahve a look.

    Thanks

    in reply to: Theme compability TrueMag Theme by cactusthemes #51842

    Paolo
    Site Admin
    Post count: 31211

    Hi,

    if you are not using the same theme , the solution provided above cannot work for you too.

    Please provide a link and admin credentials in a private reply and we will have a look.

    Thanks

    p.s. please open your own topics next time

    in reply to: List of locations #51827

    Paolo
    Site Admin
    Post count: 31211

    Hi,

    I just happened to test it for our next release and it’s working as it should.

    Please provide a link to the page where you are trying to add it and admin credentials in a private reply and we will have a look.

    Thanks

    in reply to: List of locations #51820

    Paolo
    Site Admin
    Post count: 31211

    The closest thing could be done with this shortcode: [gd_location_switcher]

    this is best used on a page or a wide content area, this shows searchable lists of locations.

    Or you could also use the popular location widget.

    Let us know how you went.

    Thanks

Viewing 15 posts - 20,116 through 20,130 (of 27,715 total)
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount