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

  RSS

gunarcom
(@gunarcom)
Active Member
Joined: 6 months ago
Posts: 8
24/04/2019 6:40 am  

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 4 weeks ago by gunarcom

Quote
Astghik
(@astghik)
Support Team Admin
Joined: 1 year ago
Posts: 2469
24/04/2019 1:00 pm  

Thank you @gunarcom,

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


ReplyQuote
gunarcom
(@gunarcom)
Active Member
Joined: 6 months ago
Posts: 8
24/04/2019 10:05 pm  

@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
(@astghik)
Support Team Admin
Joined: 1 year ago
Posts: 2469
25/04/2019 2:45 pm  

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: