Kiran
Forum Replies Created
-
AuthorPosts
-
June 24, 2019 at 10:45 am in reply to: Add custom subnav to buddypress userprofile tab \'favorites\' #494453
Hello,
If I make a blog CPT, can users create categories front-end?
Front-end users are not allowed to create categories. Only admin have permission to create new categories.
Kiran
June 24, 2019 at 10:07 am in reply to: Paid listings not being published, no record in WP Invoicing… #494449This reply has been marked as private.June 24, 2019 at 9:49 am in reply to: website screenshot instead of category image in listings #494443Hello Markus,
Is there a way to use a gd_category as a filter, when exporting.
Instead of adding Post Types.
For me it seems Post Types and Categories are same.Sorry, currently it is not possible to export listings for particular category/categories.
But you can use following PHP snippet to export listings for particular category.
/** * Export listings by category. */ function gd_snippet_240619_export_filter_category( $where, $post_type ) { global $wpdb; /*** CATEGORY ID ***/ $category_id = 34; /*** CATEGORY ID ***/ $table = geodir_db_cpt_table( $post_type ); $where .= $wpdb->prepare( " AND ( FIND_IN_SET( %d, {$table}.post_category ) OR {$table}.default_category = %d )", array( $category_id, $category_id ) ); geodir_error_log( $where, $post_type, __FILE__, __LINE__ ); return $where; } add_filter( 'geodir_get_posts_count', 'gd_snippet_240619_export_filter_category', 100, 2 ); add_filter( 'geodir_get_export_posts','gd_snippet_240619_export_filter_category', 100, 2 );Regards,
KiranThis reply has been marked as private.This reply has been marked as private.Hello hezekiah,
This has been fixed and it will be in next release.
Please provide us FTP credentials if you want me to apply patch on your site.
Regards,
KiranJune 24, 2019 at 7:23 am in reply to: Paid listings not being published, no record in WP Invoicing… #494419This reply has been marked as private.June 24, 2019 at 5:35 am in reply to: Export listings created date & last modified date & expiry date #494399Hi Vivek,
Try following PHP snippet to export post modified date.
function gd_snippet_240619_export_posts_columns( $columns, $post_type ) { global $wpdb; $columns[] = "{$wpdb->posts}.post_modified"; return $columns; } add_filter( 'geodir_get_export_posts_columns', 'gd_snippet_240619_export_posts_columns', 10, 2 );Regards,
KiranHello marktowers,
I have checked and found that due to privacy problem, it not provides protected content(description, event schedules, phone, email etc.) when fetching event page content by direct url.
Kiran
Hi Joe,
Neighborhood slug only applicable to archive pages urls like location, categories etc.
Use following PHP snippet to achieve what you asked.
/** * Usage: gd_widget_logic_post_neighborhood() == 'my-neighborhood-slug' */ function gd_widget_logic_post_neighborhood() { global $gd_post; $neighborhood = ''; if ( ! empty( $gd_post ) && ! empty( $gd_post->neighbourhood ) && ( geodir_is_page( 'detail' ) || geodir_is_page( 'preview' ) ) ) { $neighborhood = $gd_post->neighbourhood; } return $neighborhood; }Steps:
1) Put above snippet in theme/child theme functions.php file or add via any PHP Snippets plugin
2) Usegd_widget_logic_post_neighborhood() == 'my-neighborhood-slug'Kiran
Hello,
Now FTP credentials are working.
I have checked file geodirectory-es_ES.po and found it has some
keywords missing in “X-Poedit-KeywordsList” parameter.I have added those keywords and re-scan & saved .po file.
See for more details: https://wpgeodirectory.com/support/topic/some-translations-dont-work-2/#post-484624Now translation is working fine.
Please check and let us know.
Regards,
KiranJune 21, 2019 at 12:10 pm in reply to: Listings Not Saving and Custom Fields Not Displaying Information #494163Hi Terry,
Custom posts types listing content should not setup with page builder. Page builder setups the page layout, section, rows and content. GeoDirectory custom post types has its own layout for archive, detail pages.
Page builder should be used on GeoDirectory page templates which are available at GeoDirectory > Settings > Pages.
Let us know.
Kiran
Que1. Are you providing this type of customization or I have to hire from somewhere else? If Yes, What will be the cost of adding a radius slider bar in search?
We do not provide paid customization. You can find help here:
https://geodirectoryexperts.com—
Que2. Can we use the driving path instead of crow flies path or direct lines that cross rivers path to measure distance in search?
No, this is not possible with search.
—
Que3. Can we sort the professional listing by some custom keyword?
You can achieve this by using hooks.
Here are examples:
https://wpgeodirectory.com/support/topic/sort-by-featured-and-rating/#post-394349
https://wpgeodirectory.com/support/topic/search-radius-not-working/page/3/#post-452121Kiran
Hello,
Use following PHP snippet to display post excerpt when description is empty.
/** * Show post excerpt when post description is empty. */ function gd_snippet_210619_custom_field_output_post_excerpt( $html, $location, $cf, $output ) { global $gd_post; if ( ! empty( $gd_post ) && empty( $gd_post->post_content ) && ! empty( $gd_post->post_excerpt ) ) { $post_excerpt = $gd_post->post_excerpt; $extra_fields = ! empty( $cf['extra_fields'] ) ? stripslashes_deep( maybe_unserialize( $cf['extra_fields'] ) ) : NULL; $field_icon = geodir_field_icon_proccess( $cf ); $output = geodir_field_output_process( $output ); if ( strpos( $field_icon, 'http' ) !== false ) { $field_icon_af = ''; } elseif ( $field_icon == '' ) { $field_icon_af = ''; } else { $field_icon_af = $field_icon; $field_icon = ''; } $max_height = ! empty( $output['fade'] ) ? absint( $output['fade'] ) . "px" : ''; $max_height_style = $max_height ? " style='max-height:$max_height;overflow:hidden;' " : ''; $html = '<div class="geodir_post_meta ' . $cf['css_class'] . ' geodir-field-' . $cf['htmlvar_name'] . '" ' . $max_height_style . '>'; if ( $output == '' || isset( $output['icon'] ) ) $html .= '<span class="geodir_post_meta_icon geodir-i-text" style="' . $field_icon . '">' . $field_icon_af; if ( $output == '' || isset( $output['label'] ) ) $html .= trim( $cf['frontend_title'] ) != '' ? '<span class="geodir_post_meta_title" >'.__( $cf['frontend_title'], 'geodirectory') . ': '.'</span>' : ''; if ( $output == '' || isset( $output['icon'] ) ) $html .= '</span>'; if ( $output == '' || isset( $output['value'] ) ) { $content = wp_strip_all_tags( do_shortcode( wpautop( stripslashes( $post_excerpt ) ) ) ); if ( $content ) { if ( ! empty( $output['limit'] ) ) { $content = wp_trim_words( $content, absint( $output['limit'] ), '' ); } $html .= $content; if ( isset( $output['more'] ) ) { $more_text = empty( $output['more'] ) ? __( "Read more...","geodirectory" ) : __( $output['more'], "geodirectory" ); $link_class = ! empty( $output['fade'] ) ? 'gd-read-more-fade' : ''; $html .= " <a href='" . get_permalink( $gd_post->ID ) . "#" . $cf['htmlvar_name'] . "' class='gd-read-more $link_class'>" . esc_attr( $more_text ) . "</a>"; } } } $html .= '</div>'; } return $html; } add_filter( 'geodir_custom_field_output_textarea_var_post_content', 'gd_snippet_210619_custom_field_output_post_excerpt', 100, 4 );Kiran
This reply has been marked as private. -
AuthorPosts