erigriffin
Forum Replies Created
-
Thanks Paolo for your reply.
I’d really appreciate if Stiofan can find a solution.
I’d like to show him how long is the search filter length (it’s really long), so I’ll get a GD support access, and I’ll post the same questions (including my other questions) on GD support forum then.Thank you so much for your help! See you on GD forum then.
Kind Regards,
Hello Stiofan,
Sorry for keep you wait for long time on this.
I asked a few local developers to help me, however no one can help me on this, so I have to make it happen!You previously taught me that I should use;
$post_info = geodir_get_post_info($customer_post_id);
and
print_r($post_info);
I’m really sorry for my poor knowledge, would you please let me know which file and how I can use above codes? I’m keep researching, however I’m keep seeing a piece of codes, not sure where and how I can use them.
Thank you so much for your patience!
Hello again,
Additional question about search form.
I use 3 Custom Post Type, 2 custom post type are for public, but one of custom post type is for members only.For example, there are 3 custom post type;
-typeA
-typeB
-typeC (members only)I don’t want to show ‘typeC’ custom post type as search form selector, is there any way I can hose this? I use s2member for menbership, I’d like to use ‘typeC’ as member level 2 or higher, so non member can’t see or search.
Hope it’s possible to hide custom post type, thanks for your help in advance.
Kind Regards,
Hi Stiofan,
Hope you had a good weekend.
Thank you so much for your help, I’ve tried and tried last Friday and I couldn’t make it. I think it’s because of my poor PHP understanding.
I’ll give a try this morning, and will come back to you. I just wanted to say how I’m appreciated with your help, thank you!Thank you so much for the tips Stiofan!
I’m off work today, but definitely try your tips tomorrow morning.
I’m sorry to ask you a very basic question (I’m a designer, not a developer, so my knowledge has limitation), do you mean that I should copy and insert
geodir_get_post_info
function onto the custom page template, and I should point that$post_id
as arthor as well?If so, should I write like this:
<?php global $current_user; get_currentuserinfo(); $args = array( 'author' => $current_user->ID, // I could also use $user_ID, right? 'orderby' => 'post_date', 'order' => 'ASC' ); // get his posts 'ASC' $current_user_posts = get_posts( $args ); } ?> <?php function geodir_get_post_info($post_id = '') { global $wpdb, $plugin_prefix, $post, $post_info; if ($post_id == '' && !empty($post)) $post_id = $post->ID; $post_type = get_post_type($post_id); $all_postypes = geodir_get_posttypes(); if (!in_array($post_type, $all_postypes)) return false; $table = $plugin_prefix . $post_type . '_detail'; /** * Apply Filter to change Post info * * You can use this filter to change Post info. * * @since 1.0.0 * @package GeoDirectory */ $query = apply_filters('geodir_post_info_query', "SELECT p.*,pd.* FROM " . $wpdb->posts . " p," . $table . " pd WHERE p.ID = pd.post_id AND post_id = " . $post_id); $post_detail = $wpdb->get_row($query); return (!empty($post_detail)) ? $post_info = $post_detail : $post_info = false; } ?>
I’m sorry I don’t have very much php skill! I’d really appreciate if you could take a look.
Tnaks again for all your help!
Kind Regards,Hi Paolo,
Thanks for your reply and I’m sorry for poor information.
The users are as companies. Each company, there is
– a Company Admin (can edit listing & member info and make payment)
– company members (restricted, only can edit their personal profile)So yes, each company will have only (max) 1 listing. Each company admin can edit their listing info, however they can not either register nor add new listing. They have to send a request to the site admin.
Hope this is clear!
Thank you so much for your help.Hello again,
I somehow solved “Edit My Listing” link, I created shortcode;
add_shortcode('bpGDEditLink','bpGDEditLink'); function bpGDEditLink ( $atts=null, $content=null ) { global $user_ID; if ( is_user_logged_in() ) { return '<a href='.bp_core_get_user_domain( $user_ID ).'listings/>Edit Directory Profile</a>'; } else { return ""; } }
So now my problem is only one, however my previous message is not correct (sorry!)
What I’d like to do is;- GD user’s listing map, address and some of listing info (sales contact / telephone etc) to be shown under “My Directory Profile”
Sorry for confusion!!
I’m getting there, if I could solve this problem, I could finally start importing directory lists!Kind Regards,
Hi Paolo,
Your code worked! Now I see each page has different body class! It’s very handy!
https://www.prm-demo.com/tsa/places/united-kingdom/city-of-edinburgh/edinburgh/laundry/creativeprm/Now I move onto connect GD and BuddyPress, very excited to see the directory part is getting gathered!
Thanks for all your help, and have a great weekend.
Thank you so much for your help Paolo!!!!
I could do this design because of cleverly flexible GeoDirectory!
I’m off work today, but I’ll definitely try your codes, and also read more about GeoDirectory Framework tomorrow morning, then will let you know how it goes!Thanks again for all your very fast and kind help!
Hello again,
I followed instruction to change my theme’s search.php and search form.php, but I’m still getting the error of ‘could not bind to search form…’.
What I’m trying to do is that I’m using ajax on particular pages only. it works great, but top navigation stopped working.