I've enabled the categories plugin but I can't seem to display them manually. Here's the code:
<?php
$site = elgg_get_site_entity();
$categories = $site->categories;echo $categories;
?>
var_dump($categories) shows me a NULL value.
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- rjcalifornia@rjcalifornia
rjcalifornia - 0 likes
- Cim@manacim
Cim - 0 likes
- Matt Beckett@Beck24
Matt Beckett - 0 likes
- Cim@manacim
Cim - 0 likes
- Cim@manacim
Cim - 0 likes
- Cim@manacim
Cim - 0 likes
You must log in to post replies.This plugin is a little bit tricky. It doesn't have a page where you can see all the site categories listed. It looks like it was done in a lazy way.
This is how I show the categories (To select)
Doesn't work. I'm trying to list the categories on the sidebar of blogs but all I'm getting is NULL. Any devs wanna put their input?
This may seem like a stupid question but are you sure you have categories defined?
What do you mean Matt? I have a bunch of categories inputted in the admin section.
I'm not sure what I did but it's showing up now, weird! I turned on xoxco_tags, went back to site-wide categories and the input box was empty but the categories were showing up in the blog. Weird!
If you guys want the code to list all categories as URLs instead of tags, here it is: