Note that there are some explanatory texts on larger screens.

plurals
  1. POGetting items in metabox which was created by plugin
    primarykey
    data
    text
    <p>i have a plugin and in there team members can be added. its actually a list of some members. now i have created a metabox for pages. in this metabox i want to show those members name in a select box to chose. so that those member will show up in that page. in the metabox code i am trying to get the members like this:</p> <pre><code>$post_type2 = 'team'; $orderby2 = 'menu_order'; $order2 = 'ASC'; $posts_per_page2 = 100; $query2 = new WP_Query( array ( 'post_type' =&gt; $post_type2, 'posts_per_page' =&gt; $posts_per_page2, 'orderby' =&gt; $orderby2, 'order' =&gt; $order2, 'no_found_rows' =&gt; 1 ) ); //Get post type count $members = array(); $members2 = array(); $post_count2 = $query2-&gt;post_count; if( $post_count2 &gt; 0) : while ($query2-&gt;have_posts()) : $query2-&gt;the_post(); $members2['mid'] = get_the_id(); $members2['mname'] = get_the_title(); $members[] = $members2; //echo the_id(); endwhile; endif; </code></pre> <p>but it messing up with the page itself. i can get the members, but the name of the page is changed to member's name. my page is "home" and in the title area, it shows jhon doe - member name. any idea why? i think i am using the wrong "get" method to get the items.</p> <h1>EDITED</h1> <p><strong>The idea:</strong><br> The team plugin adds some member. I want to show these members in pages. But not same members in all pages. For example: "john doe" can be appear in "about" page but not in "service" page. Like this. Thats why I was thinking of creating metabox in pages to choose members. Is this the right way to do that? Or any other idea??</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload