Answers to common GeoDirectory questions about reviews and ratings. Click a question to open the answer.
Each post type has its own settings for this. For events, go to Events > Settings, click Show Advanced, and you will see:
- Disable comments, which turns off comments and reviews for every listing of that post type, so the review form and reviews tab go away.
- Disable ratings, which removes the review stars but still lets people leave comments.
Save the settings. Other post types, such as Places, keep their own reviews. To turn comments off for one listing only, see How to disable comments on a listing.
You do not need to edit the GD > Single Tabs code. There are two ways to do it.
Use the tabs builder. Go to Places > Settings > Tabs, remove the Reviews tab and add a Shortcode tab in its place with the [<span></span>gd_single_reviews] shortcode, which shows the full reviews area with ratings and the review form. Wrap it in your membership plugin’s restrict shortcode, if that plugin runs shortcodes inside its content.
Or remove the tab with a snippet when the visitor should not see it. This example hides it from logged out visitors. Replace the check with your membership plugin’s own function if you need something more specific.
add_filter( 'geodir_single_post_tabs_array', function( $tabs ) {
if ( is_user_logged_in() ) {
return $tabs;
}
foreach ( $tabs as $key => $tab ) {
if ( isset( $tab[<span></span>'tab_key'] ) && $tab[<span></span>'tab_key'] === 'reviews' ) {
unset( $tabs[<span></span> $key ] );
}
}
return array_values( $tabs );
} );
Only one reviews area can show on a page, so do not add GD > Single Reviews elsewhere on the details page as well.
GeoDirectory reviews use the normal WordPress comment form, with a plain text box named comment. GeoDirectory does not add a rich text editor to that form and we do not support one.
Plugins that turn the comment box into a visual editor hide the original text box and show the editor in its place. If the editor does not copy its content back into the hidden box before the form is sent, WordPress receives an empty comment and refuses the review, even though the visitor typed one. Replies to reviews go through the same form, so they fail in the same way.
- Turn the editor plugin off and post a test review. If it now works, the editor is the cause.
- Ask the editor plugin’s author to save the editor content to the comment field when the form is submitted. For TinyMCE that is
tinyMCE.triggerSave(). - Clear your browser cache and any page cache after changing plugins, so the old scripts are not still loaded.
If you only want reviews that are a star rating with no text, see Allow reviews with no comment.
A 405 (Method Not Allowed) error means the web server refused the request before WordPress could handle it. GeoDirectory reviews are WordPress comments, so they are sent to wp-comments-post.php like any other comment, and something on the server is blocking that file.
Common causes are a firewall or security rule at your host, a security plugin that blocks comment posting, or a CDN or caching layer that does not pass form submissions through. To narrow it down:
- Post a normal comment on a blog post. If that also fails, the problem is not specific to GeoDirectory.
- Temporarily turn off security and caching plugins and try again.
- Ask your host to check their firewall (often ModSecurity) and server logs for blocked requests to
wp-comments-post.php.
These errors often come and go with changes at the host, so contacting them first usually gets the quickest answer.