Classified ads won't post photos

I’m using the Classifieds plugin and it will allow ads to be posted, but they will not allow photos to be posted. When creating the ad, you can click the Add Media button and add them, and they show up in the editor, but when you actually publish the ad, they don’t show up on the site.

You can also set a featured image, but it won’t show up either. However, if you go back in and edit the listing, you can select the featured image and it will show up on the site, but it never works when creating a new ad. However, adding images to the ad itself (other than setting a featured image), doesn’t work even when editing an existing ad. Again, they show up in the editor but will not show up on the site.

I contacted my host about this and they tried to troubleshoot it but said I’d need to contact you. They said to pass along this error that gets generated in the error log:

[Fri Feb 24 14:04:14.720977 2017] [:error] [pid 30151] [client] PHP Fatal error: Call to a member function switch_to_locale() on null in /nas/content/live/needgreater/wp-includes/l10n.php on line 1277

  • Dimitris
    • Support Star

    Hey there Todd Heitner,

    hope you’re doing good and thanks for reaching us! :slight_smile:

    In order to display images and more HTML content in classified description, you should edit

    /wp-content/plugins/classifieds/ui-front/general/single-classifieds.php file

    and replace line#164

    echo wp_kses($content,wp_kses_allowed_html());


    echo $content;

    As for the featured image issues I was unable to replicate this, I just create a new private classified (titled “dimitrisWPMUDEV”:wink: and featured image was being displayed from the beginning.

    Is there any other necessary step that I should follow to replicate this? Please advise!

    Warm regards,


  • Todd Heitner
    • The Incredible Code Injector

    So I have to edit the plugin? I can do that, but I’d prefer not to so it won’t have to be done every time there is an update available. The plugin isn’t designed to allow users to post images? If not, why does the “Add Media” button show up when posting a new ad?

    Also, it used to allow users to add photos, so was this functionality recently removed?

    I find it strange that users wouldn’t be allowed to post images because sites like Craigslist allow multiple images.

  • Todd Heitner
    • The Incredible Code Injector

    Also, for the issue of the featured image, if you create a new ad and click Featured Image and select an image and publish the ad, the featured image will not show up with the listing. It shows up within the editor screen, but not on the website itself.

  • Adam Czajczyk
    • Support Gorilla

    Hello Todd!

    As for the featured image. The issue occurs if the “enable full media manager for feature image uploads” option in the plugin is enabled. There’s already a fix for that being tested and if it passes tests successfully it should be released soon.

    As for post images. It’s something that should also be fixed and I belive Dimitris was about to let you know about that but he just missed that once he suggested a patch. I’m sorry for confusion that it caused. I’m not able to give you an ETA on a fix release but I can confirm that it’s been reported to the developers.

    Kind regards,


Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.