LPH
Well-known member
I'm trying to build a node list in a WordPress meta box. The list of nodes is showing fine. Now, I'm trying to figure out how to get the categories to show in red ( node_type_id = "Category" ) and the "node_id = Forum" to be in blue.
I don't see a way, though, to get node_type_id and node_id showing in a list.
Does anyone have a suggestion? Is there a way to put a conditional inside the area with the $forum['title'] so there are colors?
I don't see a way, though, to get node_type_id and node_id showing in a list.
PHP:
$forums = XenForo_Model_Node::create('XenForo_Model_Node') -> getModelFromCache('XenForo_Model_Node') -> getAllNodes($ignoreNestedSetOrdering = false, $listView = true);
echo '<select id="xenword_forum_id" name="xenword_forum_id" >';
foreach ( $forums as $forum ) {
echo '<option value="' . $forum['node_id'] . '"';
echo ' selected="selected"';
echo '>' . $forum['title'] . '</option>';
}
echo '</select>';
Does anyone have a suggestion? Is there a way to put a conditional inside the area with the $forum['title'] so there are colors?