Paolo
Forum Replies Created
-
AuthorPosts
-
September 4, 2015 at 6:42 pm in reply to: Change Title Text for Category links on Detail page #51963
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
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
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
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
Thanks for letting us know.
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
No, thank you! 🙂
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
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?
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_eventThe 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!
Hi,
not that I know of.
Thanks
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
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
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
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
-
AuthorPosts