Alex Rollin
Forum Replies Created
-
AuthorPosts
-
August 19, 2019 at 11:58 am in reply to: permalinks suddenly don't work after installing locations plugin. #503667
Hello,
Try changing the settings, then resaving, as described here: https://wpgeodirectory.com/docs-v2/geodirectory/settings/permalinks/#404
The file is empty and the structure cannot match the category export.
You would try working with the export file, and merge your data into it.
Our recommended procedure is here:
https://wpgeodirectory.com/docs-v2/geodirectory/settings/import-export/#recommendedAugust 19, 2019 at 10:13 am in reply to: Difference between, 'Category' pull-down menu and 'Search for' #503653Search for field will search titles/category/tags/description
Adding the category as a select to the search bar will filter results by the selected category.
To setup whoop, run the setup wizard:
https://wpgeodirectory.com/docs-v2/geodirectory/getting-started/#wizardI see what you mean there. Please update all GD Addons and let us know if that doesn’t fix the problem.
On The tabs UI (Places -> Tabs) you would ‘click’ the shortcode field to add it, just like any other.
Snippet to show a list of cities that have upcoming events
/** * Cities with upcoming events. * * PHP : echo do_shortcode( '[gd_snippet_cities_upcoming_events]' ); * HTML: [gd_snippet_cities_upcoming_events] */ function gd_snippet_cities_upcoming_events_sc( $atts, $content = '' ) { global $geodirectory; $results = gd_snippet_cities_upcoming_events(); $content = ''; if ( ! empty( $results ) ) { $content .= '<div class="gd-snippet-cities-items"><ul class="gd-snippet-cities-rows">'; foreach ( $results as $key => $row ) { $location = $geodirectory->location->get_location_by_names( $row->city, $row->region, $row->country ); $search_event_url = add_query_arg( array( 'geodir_search' => 1, 'stype' => 'gd_event', 's' => '', 'snear' => '', 'sgeo_lat' => '', 'sgeo_lon' => '', 'etype' => 'upcoming', 'city' => ( ! empty( $location->city_slug ) ? $location->city_slug : $row->city ), 'region' => ( ! empty( $location->region_slug ) ? $location->region_slug : $row->region ), 'country' => ( ! empty( $location->country_slug ) ? $location->country_slug : $row->country ), ), geodir_search_page_base_url() ); $label = $row->city . ', ' . $row->region . ', ' . $row->country; $title = wp_sprintf( __( 'View upcoming events in %s' ), $label ); $content .= '<li class="gd-snippet-cities-row"><a href="' . esc_url( $search_event_url ) . '", title="' . esc_attr( $title ) .'">' . $label . '</a></li>'; } $content .= '</ul></div>'; } return $content; } add_shortcode( 'gd_snippet_cities_upcoming_events', 'gd_snippet_cities_upcoming_events_sc' ); function gd_snippet_cities_upcoming_events() { global $wpdb; $event_table = geodir_db_cpt_table( 'gd_event' ); $schedule_table = GEODIR_EVENT_SCHEDULES_TABLE; $date_today = date_i18n( 'Y-m-d' ); $query = $wpdb->prepare( "SELECT gd_event.city, gd_event.region, gd_event.country FROM {$event_table} gd_event LEFT JOIN {$wpdb->posts} p ON p.ID = gd_event.post_id LEFT JOIN {$schedule_table} schedule ON schedule.event_id = p.ID WHERE p.post_type = 'gd_event' AND p.post_status = 'publish' AND ( schedule.start_date >= %s OR ( schedule.start_date <= %s AND schedule.end_date >= %s ) ) GROUP BY gd_event.city, gd_event.region ORDER BY gd_event.city ASC", $date_today, $date_today, $date_today ); $results = $wpdb->get_results( $query ); return $results; }Hello,
Support for free users is only provided when the site is running only the free plugin. Please login to the account where you purchased the premium addons or get a membership to receive support.
https://wpgeodirectory.com/support-policy/
Thanks
Claims have a notification (orange dot with number) that shows on the geodirectory menu item. If you continue to have a problem with the dashboard, let us know while it is happening and we will take a look.
Thanks
Hello,
An “Archive” is a WordPress technical term for a page where all of the past posts of a particular post type are displayed. That is called a Post Type Archive. Then there is more than one type of archive, as there can also be Post Type Category archive and post type tag archive.
When the Archive template is edited, that will control the output on a page like /places/ (post archive) or /places/category/my-category/ (post type category archive).
When a post is view on the archive, the post is shown in a small/mini format. This mini format is referred to as the ‘archive item’ meaning, it is the way the listing/post is shown as an ‘item’ within the archive page itself.
So, there is the archive-item template, which controls that output. Then there is the GD Details template, which is the full page view of a post.
To see which templates you have set and where to edit them, visit
GeoDirectory – Settings – Pages
On that page you can click to edit the archive, archive item, or details templates.
The Design page settings are for the edge case for certain themes. Best to set that for auto unless you need it.
Please share WP Admin credentials and we will look into why the default issue is working the way it is for featured. It should show in the dropdown. All sorting options, if available in the UI, should work.
The “Default value” is shown on the load of the form for the place. If nothing else is entered, then it is stored to the database. Setting the default will not automatically go and store that value for all previous listings. They would need to be edited and re-saved for each listing.
If you are trying to do this with price package controls, we have a snippet to hide a tab based on package here: https://wpgeodirectory.com/docs-v2/addons/pricing-manager/#hide
Instead of using a user field you could add this as a shortcode in a tab. I head you saying you might want to override it, so, that may not work for you, but it’s an idea that might help.
The ‘Grid’ display can look however you want because you can make a custom archive item template that has the style you want, just for events.
Events have several additional options for settings, in the GeoDirectory -> Settings, in Events -> Settings -> Sort etc
Please share WP Admin credentials in a private reply and we will check out the issue. Which CPT?
This reply has been marked as private. -
AuthorPosts