EH
Forum Replies Created
-
AuthorPosts
-
Thank you Paolo!
Sorry I have another question. Is there a filter I can apply to only show the new tab if there is content?
I figured it out I forgot that I included the wp prefix when I set up this site. Here is what worked for me, hopefully it can be of help to someone else too.
//Add New tab to GeoDirectory Listing page add_filter('geodir_detail_page_tab_list_extend', 'geodir_detail_page_tab_list_extend') ; function geodir_detail_page_tab_list_extend($tab_array) { $tab_array['testimonials_tab'] = array( 'heading_text' => __('Testimonials',GEODIRECTORY_TEXTDOMAIN), 'is_active_tab' => false, 'is_display' => apply_filters('geodir_detail_page_tab_is_display', true,'testimonials_tab'), 'tab_content' => ''); return $tab_array ; } add_action('geodir_after_tab_content' ,'geodir_my_new_tab_content'); function geodir_my_new_tab_content($tab_index) { if($tab_index =='testimonials_tab'){ global $wpdb; $id = get_the_ID(); echo $id; $CustomerTestimonials = $wpdb->get_var("SELECT geodir_testimonials FROM wp_geodir_gd_place_detail WHERE post_id = $id "); echo $CustomerTestimonials; } }
Hi Guust,
That’s what it was. Sorry I didn’t know it was also inside the price language file too. Thank you so much for the help!
Hi Paolo, I was able to change Popular Categories to something else. But I am not able to change the wording of Tags are short keywords, with no space within.(eg: tag1, tag2, tag3) Up to 40 characters only on the add listing page.
Sorry I don’t think I was really clear what I was asking. I’m not looking for translations. I just want to change the wording of when you add a listing and under the tags it says: “Tags are short keywords, with no space within.(eg: tag1, tag2, tag3) Up to 5 characters only for this package.” I would to edit that wording.
I just figured it out I put the wrong Google analytics “Profile ID”. Thank you.
I just saw this page: https://wpgeodirectory.com/docs/customizing-geodirectory-templates/. I’m pretty sure I have what I need now. Thank you
Hi Paolo,
I’m pretty close to achieving what I first set out to do. I now have a proper login/logout on the site. Thank you for pointing out my error. http://new.electronichouse.com Here is my login page, http://new.electronichouse.com/login
The last thing I left to do is remove the login section from here, http://new.electronichouse.com/gd-login I see in geodir-signup.php the section that controls that is do_action(‘geodir_signup_forms’); I really like not to hack the core functions of geodirectory. I was hoping maybe you could recommend a filter to remove this section. If not I’ll keep at it, I understand I been asking a ton of customization questions.
Thanks Paolo,
I have figured out the login/logout link, I just have to figure out how to restructure the gd-login page.
Here is the code I used to get the login/logout for anyone else needing it and using genesis.
add_filter( 'wp_nav_menu_items', 'sp_add_loginout_link', 10, 2 ); function sp_add_loginout_link( $items, $args ) { // Change 'primary' to 'secondary' to put the login link in your secondary nav bar if ( $args->theme_location != 'primary' ) return $items; if ( is_user_logged_in() ) { $items .= '<li class="menu-item"><a href="'. wp_logout_url() .'">Log Out</a></li>'; } else { $items .= '<li class="menu-item"><a href="'. site_url('wp-login.php') .'">Log In</a></li>'; } return $items; }
Thank you worked perfectly.
Thank you!
Ok I figured it okay. I hope you don’t mind me posting me solutions. Hopefully they can help someone else in the future.
In listing-details.php I did the following conditional:
if (isset($post->is_featured) && $post->is_featured) { add_action ('geodir_after_main_content', 'posts_by_dir_tag'); }
then in my own functions.php here is that function:
//Add tagged content function posts_by_dir_tag(){ $post_tag = get_the_title($post->post_title); if (isset($post->is_featured) && $post->is_featured) { echo 'featured'; } $second_query = new WP_Query( array( 'tag_slug__in' => array( $post_tag) ) ); // The Loop while( $second_query->have_posts() ) : $second_query->the_post();?> <a href="<?php the_permalink()?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a> <?php endwhile; wp_reset_postdata(); } add_action ('posts_by_dir_tag');
it seems to be working.
I’m trying to get the package_id here so I can only display posts if they are paid members but for the life of me I can’t seem to get the package id. I don’t know what I’m doing wrong.
//Add tagged content function posts_by_dir_tag(){ $post_tag = get_the_title($post->post_title ); $price_details = geodir_get_post_meta($post_id, 'package_id'); echo $price_details; $second_query = new WP_Query( array( 'tag_slug__in' => array( $post_tag) ) ); // The Loop while( $second_query->have_posts() ) : $second_query->the_post();?> <a href="<?php the_permalink()?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a> <?php endwhile; wp_reset_postdata(); } add_action ('geodir_after_main_content', 'posts_by_dir_tag');
The one thing I can’t seem to figure out is how to show this if they are package_id = 2 or is_featured.
-
AuthorPosts