Notifications
Clear all

Tricky situation with comment form not showing up when overriding post_data to dynamically call post based on user ID

4 Posts
2 Users
0 Likes
1,173 Views
(@gunarcom)
Active Member
Joined: 5 years ago
Posts: 8
Topic starter  

So, I have wpDiscuz installed and it's working everywhere on my site like intended. Love the plugin. I have it enabled both single pages and on the custom post type that I am calling in with my setup_postdata(). But when I call in the post, the normal comment form shows up. Here is the code I am using to call the post object:

// Setup Post Object defined in users profile 
$post_object = get_field('club_membership_profile', 'user_'.get_current_user_id());
if( $post_object ):
// override $post
$post = $post_object;
setup_postdata( $post );

There is only one comment form on the page and the default comment template shows up / works just fine. But I would love to be able to have the wpDiscuz form override it.

I am not sure if I am explaining this clearly because I have been working on this for too long and my brain is kind of fried at this point. Let me know if you have any ideas that might help me accomplish my goal. I appreciate it. 

This topic was modified 5 years ago by gunarcom

   
Quote
Astghik
(@astgh)
Illustrious Member Admin
Joined: 6 years ago
Posts: 5872
 

Thank you @gunarcom,

Please provide us some example URLs with and without wpDiscuz comment forms to allow us to check it. 


   
ReplyQuote
(@gunarcom)
Active Member
Joined: 5 years ago
Posts: 8
Topic starter  

@astghik - I sent an email to info@gvectors.com with login / password information to my site. The page I am asking about requires you to be logged in to see the content. 


   
ReplyQuote
Astghik
(@astgh)
Illustrious Member Admin
Joined: 6 years ago
Posts: 5872
 

Thank you @gunarcom,

For further support we'll need feedbacks for the points mentioned in this post:

https://gvectors.com/forum/how-to-and-troubleshooting/resolved-wpdiscuz-comment-form-is-missing/#post-349

Please check the points and provide information for each one. 


   
ReplyQuote
Share:
Scroll to top