Post from a different plugin – UserPro Forums https://forum.userproplugin.com/forums/topic/post-from-a-different-plugin/feed/ Fri, 03 May 2024 20:29:22 +0000 https://bbpress.org/?v=2.6.2 en-US https://forum.userproplugin.com/forums/topic/post-from-a-different-plugin/#post-14940 <![CDATA[Post from a different plugin]]> https://forum.userproplugin.com/forums/topic/post-from-a-different-plugin/#post-14940 Thu, 26 Dec 2013 13:57:03 +0000 Dominick Amorosso Hi and Merry Christmas. I’m trying to figure out how I can input this php code into a users profile. They are post from a Q&A plugin but they are not post ie. post or pages.. Since I don’t let users post posts or pages this would be awesome to have some kind of integration with the Q&A plugin I do use.

global $wp_query;

if( $wp_query->query_vars[‘post_type’] != ‘dwqa-question’ ) {

$query = array(

‘post_type’ => ‘dwqa-question’,

‘posts_per_page’ => $wp_query->query_vars[‘posts_per_page’],

‘author_name’ => $wp_query->query_vars[‘author_name’]

);

query_posts( $query );

}

I know this asking a lot but can you tell me how and where to put it. If it can even be done. God knows I spent the last two days trying to figure it out. Thanks in advance..

]]>