How to show some content of user profile tab on my own page?

Solved4.82K viewsThemes
0

I already have a user profile page and just want to add list of questions created by some user to this page.

I have tried following:

… code of my user profile shortcode….

 

ob_start();

anspress()->anspress_users->questions_page();

$result .= ‘<div class=”clear”></div>’.ob_get_clean();

 

And I see some result there http://zhendaopai.org/my-profile/?userid=1

but it looks like I need to wp_enqueue_script some css or something else. Could you please help me to show just content od one user profile tab with my own shortcode?

Thank you in advance, you do a really great job!

1

You are missing #anspress, try this:

ob_start();
echo '<div id="anspress">';
anspress()->anspress_users->questions_page();
echo '</div>';

$result .= ob_get_clean();

Thank you, it helps! But I have one more question – now I see page like main Anspress page with questions… but page in user profile with user’s question is different on your site http://anspress.io/user/rahularyan/questions/

Why is that?

I can hide search input, filter and Ask button with display: none but maybe there is more right way – some function with option setting?

check in wp-content\plugins\anspress-question-answer\theme\default\user\about.php, cheers.