Need Help with showing pages; code fix
-
I am having trouble correcting a bit of modification to a templates code. MichaelH, one of the moderators was very helpful and was able to show me how to not display certain posts by replacing this:
if (is_page($the_page_id)) { $addclass = ' class="current_page"'; } else { $addclass = ''; } $output .= '<li' . $addclass . '><a href="'.get_permalink($thats_all->ID).'" title="'.$thats_all->post_title.'"><span>'.$thats_all->post_title.'</span></a></li>'; } return $output; }
with this:
if ( $the_page_id != '2' && $the_page_id != '3' && $the_page_id != '4' ) { if (is_page($the_page_id)) { $addclass = ' class="current_page"'; } else { $addclass = ''; } $output .= '<li' . $addclass . '><a href="'.get_permalink($thats_all->ID).'" title="'.$thats_all->post_title.'"><span>'.$thats_all->post_title.'</span></a></li>'; } return $output; } }
However, now I’m having trouble getting any new pages to display. That code seems to make any pages that were added after I put it in invisible. I tried changing the pageid numbers in the code but it had no effect. Does anyone know how to correct this? I couldn’t send it in a pm to MichaelH because pm’s don’t seem to exist. So any help I can get would be appreciated.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Need Help with showing pages; code fix’ is closed to new replies.