johnanderson10
Forum Replies Created
-
Forum: Networking WordPress
In reply to: ms sites dont seem to have roleshere is an image that shows no role for this site inside a ms site with a user added to it
Forum: Fixing WordPress
In reply to: list pages without wp_list_pagesahh never mind found out the error there was a space with the child_of = instead of child_of=
oh well sorry to post this but guess i need to write it out to solve it
Forum: Fixing WordPress
In reply to: list pages without wp_list_pages$pages = get_pages('parent=0'); if ($pages) { $output=''; foreach ($pages as $page) { if($page->post_status=='publish'){ $output.='<li><a href="'.$page->guid.'"><span class="normal">'.$page->post_title.'</span></a>'; $sub_pages = get_pages( 'child_of ='. $page->ID); if ($sub_pages){ $output.='<ul>'; foreach ($sub_pages as $sub_page) { if($sub_page->post_status=='publish'&& $sub_page->post_parent== $page->ID){ $output.='<li><a href="'.$sub_page->guid.'">'.$sub_page->post_title.'</a></li> '; } } $output.='</ul>'; }} $output.='</li>'; } } echo $output
Forum: Fixing WordPress
In reply to: list pages without wp_list_pagesok so i goofed and found out that get_pages is an actual function I just made it up for the example
but now I dont know why its not getting the current child of when i get the sub pages
$pages = get_pages(‘parent=0’);
if ($pages) {
$output=”;
foreach ($pages as $page) {
if($page->post_status==’publish’){
$output.=’- guid.'”><span class=”normal”>’.$page->post_title.'</span>‘;
$sub_pages = get_pages( ‘child_of =’. $page->ID);
if ($sub_pages){
$output.=’- ‘;
- guid.'”>’.$sub_page->post_title.’
foreach ($sub_pages as $sub_page) {
if($sub_page->post_status==’publish’&& $sub_page->post_parent== $page->ID){
$output.=’‘;
}
}
$output.=’‘;
}}
$output.=’
‘;
}
}
echo $outputForum: Networking WordPress
In reply to: wp3.0 disable wysiwyg but still shows up in ms setupYa I went in on every site and try-ed to disable the WYSIWYG but it still shows up no matter what….
reason I want to disable the editor is because im using exec plugin to run php code then everytime i edit it the code gets messed up due to the editor formatting the code.
Forum: Fixing WordPress
In reply to: list categoriesAHHHHHH it works but it wontr show more then 1 sub-cat
Forum: Fixing WordPress
In reply to: list categoriesHa it works thanks so mu i just did a few tweaks to the code you gave m its running just fine
here is the code if anyone need its
foreach((get_categories('')) as $cat) { $parents = explode('|',get_category_parents($cat,false,'|')); if ($parents[1] == "") { echo '<b>' . $cat->cat_name . '</b>'.$cat->cat_name.'<br /> '; $categories= get_categories('child_of='.$cat->cat_ID); foreach ($categories as $cat2) { $option = $cat2->cat_name; $option .= ','; echo $option; } echo '<br /><br />'; } }
Forum: Fixing WordPress
In reply to: list categorieslol no ya in the second post i made some code that would show it the way i want but once its finished with listing the sub cat its then starts to list the sub-cat as main-categories like this
MAIN_CAT
sub,sub,subSUB_CAT
SUB_CAT
SUB_CAT
I belive the frist loop is reading the subcategories as well I only want the top level categories in the frist loop as I will do a second loop to get the sub categoriesthat my problem right now
Forum: Fixing WordPress
In reply to: list categoriesHey i came up with this and its almost there but it list the sub categories aswell is there any way that it dosent list the sub categories
<?php foreach((get_categories(”)) as $cat)
{
echo ‘cat_name . ‘”>’.$cat->cat_name.’
‘;
$categories= get_categories(‘child_of=’.$cat->cat_ID);
foreach ($categories as $cat2) {
$option .= $cat2->cat_name;
$option .= ‘,’;
$option .= ”;
echo $option;
}
echo ‘‘;
}
?>Forum: Fixing WordPress
In reply to: index show onlyYa i see what you mean thank you so much
Forum: Fixing WordPress
In reply to: index show onlyLenK thank you for your reply, But is there away to show all the post in the category ?
The thing is I would like it so when some one visit the site they see all the recent post to the news category but not the rest of the post
Forum: Fixing WordPress
In reply to: Theme list new postdid even know they had plugins for that thank you so much