Shortcode in category description

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

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

Open Support Ticket
  • Author
    Posts
  • #340929

    sithonia
    Full Member
    Post count: 63

    I’d like some help with how to enable shortcode in the category description field.

    With your excellent support and browsing the forum here I’ve enabled shortcode in the location description and in the custom fields for the place listing, but I can’t figure out the proper code and term to apply it to the description of the Place Category. Could you help me?

    #341035

    sithonia
    Full Member
    Post count: 63

    OK, I think I got it working with the following code:

    
    
    function my_enable_shortcodes_in_desc($html){
     
        $html = do_shortcode( $html );    
        return $html;
    }
    
    add_filter( 'geodir_listings_page_description', 'my_enable_shortcodes_in_desc');

    My problem now is that the Category + Location Top Description has a real problem to save any changes. I tick and untick “Use description of default” and save in between, but it very randomly at best saves any changes to the description.
    If the description was blank it’s ok to add something, but it’s next impossible to remove or edit what’s been saved once.
    A caching issue? Please help.

    #341173

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    please provide a link and admin credentials and we will have a look.

    Thanks

    #341276

    sithonia
    Full Member
    Post count: 63
    This reply has been marked as private.
    #341424

    Giri
    Expired Member
    Post count: 3155

    Hi sithonia,

    I think you misunderstand Location top description.

    You need to add description for each location if you are planning to go for this route.

    I have tested your site and it seems to be working fine.

    https://www.dropbox.com/s/fln7p49z5wfappn/Screenshot%202017-01-12%2020.10.01.png?dl=0

    https://www.dropbox.com/s/4ze3z0z6q3i5a3z/Screenshot%202017-01-12%2020.10.29.png?dl=0

    You need to select the location from the dropdown, enter description and then save it.

    Let me know if i’m missing something.

    Thanks

    #341425

    Giri
    Expired Member
    Post count: 3155
    This reply has been marked as private.
    #341444

    sithonia
    Full Member
    Post count: 63

    That is what I have been doing. Selected the location from the dropdown, typed the description and saved. The problem is it doesn’t always work right away, especially not if the text needs to be changed or edited afterward.

    Now for example I tried to change the description you wrote. It won’t accept a simple deleting the text and saving that. The text still remains.

    I’ve found a way of working around it, as I mentioned above, but it’s quite tedious.

    #341478

    Giri
    Expired Member
    Post count: 3155

    Hi sithonia,

    I have just erased some part of the description I added and it seems to be working fine for me.

    Have you tried it in a different browser?

    I see only one problem after saving the description. It goes back to the first location description instead of staying on the currently saved location

    When I save the description for “Gerakini, Psakoudia, Sithonia, Greece”, after saving it redirect me to “Agios Nikolaos, Sithonia, Greece” which is the first item.

    Other than that I couldn’t find any problem.

    If you can record a screencast of your issue, then I can understand and help you.

    Thanks

    #341487

    sithonia
    Full Member
    Post count: 63

    I now tried it in Firefox, and it works normal, accepts the edit right away. I was using Safari, and that for some reason caused this strange issue.

    Thanks for looking in to it! Next time I have any issues, I’ll try another browser first.

    #341488

    Giri
    Expired Member
    Post count: 3155

    No problem.

    Glad it works.

Viewing 10 posts - 1 through 10 (of 10 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