Can you please post the code for your shortcode?
I’m currently using:
add_shortcode( 'myteam', 'mysite_team_sc' );
function mysite_team_sc() {
if (get_option('my_team_grid_display') == '2') // if grid display has been selected.
{
include( plugin_dir_path( __FILE__ ) . 'templates/my_team_grid.php');
}
else
{
include( plugin_dir_path( __FILE__ ) . 'templates/my_team_list.php');
}
}
The shortcode only includes other .php files. The change will need to be made there. Please put the code for templates/my_team_grid.php in a pastebin and post a link to it here.
I’ve altered the shortcode slightly, removing the php files:
http://pastebin.com/ECgKMUrK
Thank for helping
OK, that helps. Now please explain more how you want the shortcode to perform.
When you say you want to display a member by name, do you want the shortcode to display only one member, or do you want the member’s name in the list to show the member’s page when clicked, or something else?
I want the ability to show members by:
– Name (page title)
– Category (taxonomy)
– limit to display
e.g [myteam title=”member name” category=”taxonomy name” display=”2″]
I’ve got a list of team members (custom post type) that appear when adding [myteam] to a page.
But on some page I want the ability to just add one specific team member (using something like the parameters given in the shortcode above)
Hope that makes sense.
I can’t test the code but this should be close to what you want: http://pastebin.com/amjLJjii
If you provide a member name (page title), only that page is displayed: category and display parameters are ignored.