Thread Starter
evmia
(@evmia)
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
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
(@evmia)
I have already solved the problem. The problem was in the function.php file
Thread Starter
evmia
(@evmia)
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?
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
(@evmia)
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
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 on your website.
Thread Starter
evmia
(@evmia)
Thank you Greg! Thank you so much!!! =)
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