Title: Problem with single.php
Last modified: February 4, 2022

---

# Problem with single.php

 *  [evmia](https://wordpress.org/support/users/evmia/)
 * (@evmia)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/problem-with-single-php/)
 * Good afternoon. I have a problem.
    I created single-advert.php file. I copied
   the code from the template of your add-on single.php into it, but as you can 
   see in the screenshot, the gallery displays all the pictures from the site, information
   about the seller is not displayed on click, there is no title and no description.
   The file itself, which lies in the wpadverts > templates directory, was not connected,
   but only the file from the root folder (default) was connected. I can’t figure
   out what I’m doing wrong. Help [https://disk.yandex.com/i/c8YGPMkKgqn7Lw](https://disk.yandex.com/i/c8YGPMkKgqn7Lw)
   [https://disk.yandex.com/i/EVb_cBLj2liXBQ](https://disk.yandex.com/i/EVb_cBLj2liXBQ)

Viewing 9 replies - 1 through 9 (of 9 total)

 *  Thread Starter [evmia](https://wordpress.org/support/users/evmia/)
 * (@evmia)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/problem-with-single-php/#post-15327718)
 * If you add an ad through the frontend, then everything works fine, but after 
   clicking the “Publish” button, it stops working. Please help, I really need it!
   
   [https://disk.yandex.com/i/-ixa6e5P8clWGw](https://disk.yandex.com/i/-ixa6e5P8clWGw)
 *  Plugin Author [Greg Winiarski](https://wordpress.org/support/users/gwin/)
 * (@gwin)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/problem-with-single-php/#post-15336068)
 * Hi,
    i would need some more details on the problem you are having:
 * 1. does it work with the default template file (that is when you delete or rename
   the single.php you created)?
 * 1a. if it does not work with the default template files, does it work if you 
   switch to a different theme?
 * 2. what will show on the screen on the Ad details pages if add there the following
   code
 *     ```
       <?php var_dump( $post_id ) ?>
       ```
   
 *  Thread Starter [evmia](https://wordpress.org/support/users/evmia/)
 * (@evmia)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/problem-with-single-php/#post-15342317)
 * I have already solved the problem. The problem was in the function.php file
 *  Thread Starter [evmia](https://wordpress.org/support/users/evmia/)
 * (@evmia)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/problem-with-single-php/#post-15342329)
 * But I got a new problem that I can’t solve in any way. The wp discuz plugin is
   installed, and it does not want to display the way of commenting on the ad page
   in any way. Can you tell me how to do this and is it possible to include comments
   in your plugin?
 *  Plugin Author [Greg Winiarski](https://wordpress.org/support/users/gwin/)
 * (@gwin)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/problem-with-single-php/#post-15344978)
 * Hi,
    by default the comments are disabled on the Ad details pages, you can go
   to wp-admin / Classifieds / Options / Core / Types panel and enable comments 
   from there.
 * This will only allow using the comments on the Ad details pages but by default
   the comments will be disabled, to enable them when an Ad is published or updated
   add the code below in your theme functions.php file
 *     ```
       add_action("adverts_insert_post", "enable_adverts_comments_check");
       add_action("adverts_update_post", "enable_adverts_comments_check");
       function enable_adverts_comments_check( $data ) {
           $data["comment_status"] = "open";
           return $data;
       }
       ```
   
 * Note that the ads you already have in the database have the comments disabled,
   so you need to edit each of them from wp-admin panel and enable the comments 
   only then the form will show on the Ad details pages – again this is for existing
   Ads only the ones that you add after adding the above code should have comments
   enabled by default.
 *  Thread Starter [evmia](https://wordpress.org/support/users/evmia/)
 * (@evmia)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/problem-with-single-php/#post-15346433)
 * wp-admin / Classifieds / Options / Core / Types I don’t have such a path in the
   site directory. The code that in functions.php I inserted it, but unfortunately
   I didn’t understand how to include comments in the wp-admin / Classifieds / Options/
   Core/Types path. Help please
    [https://disk.yandex.com/i/CCL8RvGeYSwPnQ](https://disk.yandex.com/i/CCL8RvGeYSwPnQ)
 *  Plugin Author [Greg Winiarski](https://wordpress.org/support/users/gwin/)
 * (@gwin)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/problem-with-single-php/#post-15349574)
 * The wp-admin / Classifieds / Options / Core / Types is not a path in the system
   folder these are basically links in the wp-admin panel you need to click in order
   to get to the Types panel where you can make these changes.
 * In other words clicking them in this order should get you to this page [https://demo.wpadverts.com/lite/wp-admin/edit.php?post_type=advert&page=adverts-extensions&module=core&adaction=types&edit-post=advert](https://demo.wpadverts.com/lite/wp-admin/edit.php?post_type=advert&page=adverts-extensions&module=core&adaction=types&edit-post=advert)
   on your website.
 *  Thread Starter [evmia](https://wordpress.org/support/users/evmia/)
 * (@evmia)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/problem-with-single-php/#post-15350222)
 * Thank you Greg! Thank you so much!!! =)
 *  Plugin Author [Greg Winiarski](https://wordpress.org/support/users/gwin/)
 * (@gwin)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/problem-with-single-php/#post-15354189)
 * Hi,
    ok great, i am glad you have the issue resolved :), I am marking this thread
   as resolved then.
 * BTW. If you are finding the plugin useful i would be thankful if you could write
   a short one or two sentence review here [https://wordpress.org/support/view/plugin-reviews/wpadverts](https://wordpress.org/support/view/plugin-reviews/wpadverts)

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Problem with single.php’ is closed to new replies.

 * ![](https://ps.w.org/wpadverts/assets/icon-256x256.png?rev=2423472)
 * [WPAdverts - Classifieds Plugin](https://wordpress.org/plugins/wpadverts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wpadverts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wpadverts/)
 * [Active Topics](https://wordpress.org/support/plugin/wpadverts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wpadverts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wpadverts/reviews/)

## Tags

 * [single.php](https://wordpress.org/support/topic-tag/single-php/)

 * 9 replies
 * 2 participants
 * Last reply from: [Greg Winiarski](https://wordpress.org/support/users/gwin/)
 * Last activity: [4 years, 3 months ago](https://wordpress.org/support/topic/problem-with-single-php/#post-15354189)
 * Status: not resolved