Trying to Run a if group = "this name"
-
Im trying to match group names to a predefined list so that I may only output the groups which match the list.
I’ve tried this
<div id="localphone">
<?php if ( bp_has_site_groups() ) : ?>
<div class="pag-count" id="group-dir-count">
<?php bp_site_groups_pagination_count() ?>
</div>
<div class="pagination-links" id="group-dir-pag">
<?php bp_site_groups_pagination_links() ?>
</div>
<?php while ( bp_site_groups() ) : bp_the_site_group(); ?>
<?php $localNetwork = bp_the_site_group_name() ?>;
<?php if ($localPhone== Brighton || $localPhone==Test Group)
<dl>
<dt><a href="http://business-chamber.com/featured-<?php bp_the_site_group_name() ?>/" title=""><?php bp_the_site_group_avatar_thumb() ?></a></dt>
<dd><?php bp_the_site_group_name() ?></dd>
</dl>
<?php }
else {
echo
}
?>
<?php endif; ?>
<?php endwhile; ?>
<?php else: ?>
<div id="message" class="info">
<p><?php _e( 'There were no groups found.', 'buddypress' ) ?></p>
</div>
<?php endif; ?>Can anyone shed any light on why that won’t work. Its basically I’ve got a list of 50 or so that I want shown and then to pull in the name of each and the gravatar. I’m trying to do this in the bphome theme by the way, in a custom page.
Cheers in advance for any help!!!.
Viewing 16 replies - 1 through 16 (of 16 total)
Viewing 16 replies - 1 through 16 (of 16 total)
- The topic ‘Trying to Run a if group = "this name"’ is closed to new replies.