• Resolved rudyyy

    (@rudyyy)


    The site reviews plugin doesn’t seem to recognize my custom post type. My custom posts do not show up when title or id is typed in the assigned post field (in the admin backend). The custom post type is set to public (= true). Do you know how to solve this issue?

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Gemini Labs

    (@geminilabs)

    Are you using an existing theme or are you using your own theme?

    When you use the assigned_posts="post_id" option on the shortcodes (or if you use the Block option to assign reviews to the current page), Site Reviews uses the Post ID of the global $post object.

    If you are writing your own theme, make sure that you are using WP_Query correctly. For example, if using WP_Query outside of the The Loop, you need to make sure that you restore the original Post Data after your custom wp_query with wp_reset_postdata();.

    Thread Starter rudyyy

    (@rudyyy)

    I am using the Kadence theme.

    The problem is not about showing the reviews on a specific page, but about assigning them in the first place.

    So right now, my reviews are not assigned to any custom post because it couldn’t find one. However, regular posts like ‘hello world’ do show up in the search box under assigned post on the edit review page in admin area.

    • This reply was modified 2 years ago by rudyyy.
    Plugin Author Gemini Labs

    (@geminilabs)

    Ah.

    Have you set exclude_from_search = true to your Custom Post Type?

    If you have, then that custom post type will be excluded from the Assigned Posts search box on the admin pages.

    Thread Starter rudyyy

    (@rudyyy)

    Exclude from search was set to ‘true’. So should it be set to ‘false’?

    Plugin Author Gemini Labs

    (@geminilabs)

    Sorry, I meant to say exclude_from_search = true.

    Since you set “exclude_from_search” to true, the custom post type is being excluded from the search results.

    I’ll add a filter hook in the next version which you will be able to use to override it, but for now you would need to set exclude_from_search to false in order for your custom post type to be included in the search results.

    Thread Starter rudyyy

    (@rudyyy)

    That solved the issue. Thanks a lot!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Can’t assign review to custom post’ is closed to new replies.