GeoDirectory SupportCan't add a listings – GeoDirectory Support https://wpgeodirectory.com/support/topic/cant-add-a-listings/feed Fri, 13 Feb 2026 18:24:31 +0000 http://bbpress.org/?v=2.5.14-6684 en-US https://wpgeodirectory.com/support/topic/cant-add-a-listings/#post-10327 <![CDATA[Can't add a listings]]> https://wpgeodirectory.com/support/topic/cant-add-a-listings/#post-10327 Wed, 30 Jul 2014 08:13:09 +0000 We Love Travel Group Hi, on our website: http://www.welovekohphangan.com when a user tries to add a listing from the ‘add listing widget’ link it is just sending them to a listing that is already on our website. This listing has nothing to do with any new users. All our payments are set up and the link should send them to add new listing page with these payment options but it’s not.

On our other websites this is working fine and we have checked to make sure the settings are the same, which they seem to be.

Please can somebody have a look and see if they know what the problem is.
Thank you

]]>
https://wpgeodirectory.com/support/topic/cant-add-a-listings/#post-10345 <![CDATA[Reply To: Can't add a listings]]> https://wpgeodirectory.com/support/topic/cant-add-a-listings/#post-10345 Wed, 30 Jul 2014 11:13:14 +0000 Guust All your virtual pages are gone. I’ll get Vikas again. He will need your FTP details and phpadmin, so please post them in a private message.

]]>
https://wpgeodirectory.com/support/topic/cant-add-a-listings/#post-10437 <![CDATA[Reply To: Can't add a listings]]> https://wpgeodirectory.com/support/topic/cant-add-a-listings/#post-10437 Wed, 30 Jul 2014 20:12:47 +0000 We Love Travel Group https://wpgeodirectory.com/support/topic/cant-add-a-listings/#post-10495 <![CDATA[Reply To: Can't add a listings]]> https://wpgeodirectory.com/support/topic/cant-add-a-listings/#post-10495 Thu, 31 Jul 2014 06:33:01 +0000 Vikas Hi,

Thanks for sending all these info, these really help me to fix the problem.
Everything should work fine now. Plz check and let me know.

If anyone else has same problem of missing default GD pages please follow these instructions

1. Put below code in ur theme’s functions.php file.




function geodir_restore_default_pages()
{
	
    //geodir_create_page( esc_sql( _x('home-map', 'page_slug', 'geodirectory') ), 'geodir_home_map_page', __('Home Map', 'geodirectory'), '',0,'publish' );
    geodir_restore_default_page( esc_sql( _x('listings', 'page_slug', GEODIRECTORY_TEXTDOMAIN) ), 'geodir_listing_page', __('All Listings', GEODIRECTORY_TEXTDOMAIN), '' );
	geodir_restore_default_page( esc_sql( _x('add-listing', 'page_slug', GEODIRECTORY_TEXTDOMAIN) ), 'geodir_add_listing_page', __('Add Listing', GEODIRECTORY_TEXTDOMAIN), '' );
	geodir_restore_default_page( esc_sql( _x('listing-preview', 'page_slug', 'geodirectory') ), 'geodir_preview_page', __('Listing Preview', GEODIRECTORY_TEXTDOMAIN), '' );
	geodir_restore_default_page( esc_sql( _x('listing-success', 'page_slug', GEODIRECTORY_TEXTDOMAIN) ), 'geodir_success_page', __('Listing Success', GEODIRECTORY_TEXTDOMAIN), '' );
	geodir_restore_default_page( esc_sql( _x('location', 'page_slug', GEODIRECTORY_TEXTDOMAIN) ), 'geodir_location_page', __('Location', GEODIRECTORY_TEXTDOMAIN), '' );
	
	
}

function geodir_restore_default_page( $slug, $option, $page_title = '', $page_content = '', $post_parent = 0,$status = 'virtual' )
{
	global $wpdb, $current_user;
	 
	$page_found =	$wpdb->get_var(
									$wpdb->prepare(
										"SELECT ID FROM " . $wpdb->posts . " WHERE post_name = %s LIMIT 1;",
										array($slug)
									)
								);
	
	if ($page_found) :
		// Page exists
		update_option($option, $page_found);
		return;
	endif;
	
	$page_data = array(
        'post_status' => $status,
        'post_type' => 'page',
        'post_author' => $current_user->ID,
        'post_name' => $slug,
        'post_title' => $page_title,
        'post_content' => $page_content,
        'post_parent' => $post_parent,
        'comment_status' => 'closed'
    );
    $page_id = wp_insert_post($page_data);
    
    add_option($option, $page_id);
	
}

add_action('init' , 'geodir_restore_default_pages') ;

2. once u find that everything is working fine now just remove this piece of code from theme’s functions.php file

Thanks for ur patience.

]]>
https://wpgeodirectory.com/support/topic/cant-add-a-listings/#post-10496 <![CDATA[Reply To: Can't add a listings]]> https://wpgeodirectory.com/support/topic/cant-add-a-listings/#post-10496 Thu, 31 Jul 2014 06:46:20 +0000 We Love Travel Group Hi Vikas,

Great Job and massive thank you for your help again!

Looks like it’s all working now as it should so do i now remove the code or have you done that on this site already?

]]>
https://wpgeodirectory.com/support/topic/cant-add-a-listings/#post-10497 <![CDATA[Reply To: Can't add a listings]]> https://wpgeodirectory.com/support/topic/cant-add-a-listings/#post-10497 Thu, 31 Jul 2014 06:52:10 +0000 Vikas I have removed that code from your site.
These instructions are for others who might have deleted those pages accidentally.

Thanks

]]>