Json api to groups page
-
Hi, would be nice someone could help me.
I’m trying to display some json data on a groups page,
But all i get is the php code printed out.(I’m not a programmer :))This is what i use:
<?php
function jabbajabbab() {
?>
$url = ‘http://some-site.com:1359/api/groups/jabbajabba’;
$content = file_get_contents($url);
$json = json_decode($content, true);foreach($json[‘some_data’] as $item) {
print $item[‘registration_date’];
print ‘some text’;
<?php
}
add_action( ‘bp_before_group_header_meta’, ‘jabbajabbab’ );
?>i have that in my bp-custom.php
i have that in my bp-custom.php
- The topic ‘Json api to groups page’ is closed to new replies.