Default Data?

This topic contains 2 replies, has 3 voices, and was last updated by  Vikas 9 years, 10 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #8980

    justjim
    Free User
    Post count: 126

    Is there a way to have default profile information if left blank?

    #9008

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    Not if listing is added from the front end. Description is a mandatory field.

    If it is added to the back end you can copy and paste whatever you want in the content field.

    If it is added via csv you can copy and paste whatever you want in the post_content field.

    Otherwise you need to customize the add listing form.

    Thx

    #9086

    Vikas
    Full Member
    Post count: 1128

    U can do this too.
    Put this piece of code in ur theme functions.php file

    
    
    add_filter('the_content' , 'geodir_default_content_if_content_is_blank') ;
    function geodir_default_content_if_content_is_blank($content)
    {
    	if(empty($content) && geodir_is_page('detail'))
    		$content= 'Set content here which u want to show when default content is blank.' ;
    	return $content ;
    }

    This function is using geodir_is_page(‘detail’) which is defined in geodirectory plugin files, so please remove this function before deactivating geodirectory plugin whenever u needed else u will get an error in ur theme functions.php file.

Viewing 3 posts - 1 through 3 (of 3 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket