Templating Places' descritpion

This topic contains 5 replies, has 2 voices, and was last updated by  Stiofan O’Connor 7 years, 7 months ago.

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

Open Support Ticket
  • Author
    Posts
  • #415042

    SOMSAK
    Expired Member

    Hi,

    I’d like to know if its possible to create a default template for all Places description when they are created.

    Here is my website: https://finisherbox.es/escapadas/carreras/edp-san-fermin-marathon-pamplona-21k/

    As you may see, I’ve added some content to the description. I’d like to get this content and place it on every Place description. Is there any way to do this?

    And also, could listing be edited with Visual Composer?

    Thanks in advanced,

    #415133

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    HI Jonathan,

    You can use “the_content” filter to add things to the description.
    https://codex.wordpress.org/Plugin_API/Filter_Reference/the_content

    We are not compatible with VC in GDv1, we will be looking at it for GDv2.

    Thanks,

    Stiofan

    #415135

    SOMSAK
    Expired Member

    Hi Stiofan,

    I tested CV yesterday and it seemed to work, that was weird in fact.

    Regarding “the_content”, I think I don’t understand you. The point is that I have a template in this Place that I’d like to paste into all other Places. Could you please tell me how to do that?

    Thanks!

    #415166

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    I am not sure what you mean by “template” a php file?

    Stiofan

    #415167

    SOMSAK
    Expired Member

    I mean the description of this Place: https://finisherbox.es/escapadas/carreras/edp-san-fermin-marathon-pamplona-21k/

    I mean the content in the tab. I need to take this content and place it a descritpion of all Places.

    Thanks,

    #415210

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Not tested but maybe something like this code snippet (you can add it via the code snippet plugin):

    
    
    add_filter('geodir_description_field_desc','_my_default_description',10);
    function _my_default_description($desc){
    if(empty($desc)){
    $desc = "my new default description, this will show if the description is empty";
    }
    return $descl
    }

    Thanks,

    Stiofan

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

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

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount