peterjonathan
Forum Replies Created
-
Forum: Plugins
In reply to: [User Access Manager] Check if user has rights to view categoryFirstly Alex thanks for a great plugin.
Secondly Jonas thanks for the example code. The snippet below enabled me to do the user group validation required in my plugin.
foreach ($aGroups as $oGroup) {
$sLink .= $oGroup->getGroupName().’, ‘;
}This thread certainly resolved my requirment to check if a user was in a certain group.
Forum: Plugins
In reply to: [Simple Staff List] Disable archive and staff member pageBy copying some of the code from the plugins user-view-show-staff-list.php file I managed to get the image and bio showning on each individuals page.
The template code changes shown below worked for me:
# diff single.php single-staff-member.php 12c12 < get_template_part( 'loop', 'single' ); --- > get_template_part( 'loop', 'single-staff-member' ); # diff loop-single.php loop-single-staff-member.php 18a19,26 > <?php > $custom = get_post_custom(); > $bio = $custom['_staff_member_bio'][0]; > $photo = ''; > if(has_post_thumbnail()){ > $photo = '<img class="staff-member-photo" style="float:right;" src="'.wp_get_attachment_url( get_post_thumbnail_id()).'" alt = "'.get_the_title().'">'; > } > ?> 21a30 > <?php echo($photo); ?> 29c38 < <?php the_content(); ?> --- > <?php echo($bio); ?> #Forum: Plugins
In reply to: [Simple Staff List] Disable archive and staff member pageHalfway there, http://codex.ww.wp.xz.cn/Post_Types details the naming convention for custom type post templates.
The creation of the single-staff-member.php and loop-single-staff-member.php templates in the theme directory (copied from single.php and loop.php) are being used to generate the individuals staff page.
Now how can the [staff-bio] be added …
Forum: Plugins
In reply to: [Simple Staff List] Disable archive and staff member pageI agree, Great Plugin !
I would like to change the template used for the individuals page.
How can I add the [staff-bio] info to the individuals staff member page ?
(I can’t find how http://wp-site/staff-members/fred-bloggs/ translates to a php template, then how can one add the [staff-bio] info to that template)