![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
18/10/2009, 12:47
|
| | Fecha de Ingreso: agosto-2009 Ubicación: Madrid
Mensajes: 28
Antigüedad: 15 años, 5 meses Puntos: 0 | |
Respuesta: No puedo excluir paginas del header- PHP Luego intente con lo siguiente:
<div id="nav">
<?php
function get_the_pa_ges (){
global $wpdb;
if ( ! $these_pages = wp_cache_get('these_pages', 'pages') ) {
$these_pages = $wpdb->get_results('select ID, post_title from '. $wpdb->posts .' where post_status = "publish" and post_type = "page" order by ID');
wp_cache_add('these_pages', $these_pages, 'pages');
}
return $these_pages;
}
function list_certain_pages($page_ids=''){
$page_ids = explode(',',$page_ids);
$output = '';
$these_pages = get_the_pa_ges ();
foreach ($these_pages as $thats_them){
$the_page_id = $thats_them->ID;
if (is_page($the_page_id)) {
$addclass = ' class="current_page"';
} else {
$addclass = '';
}
if (isset($page_ids) && in_array($the_page_id,$page_ids)){
$output .= '<li' . $addclass . '>ID)' . " title='".$thats_them->post_title."'>";
}
return $output;
}
?>
<?php
if (is_home()) {
$addclass = ' class="current_page"';
} else {
$addclass = '';
}
echo "<li" . $addclass . "><span>Home</span>"; echo list_certain_pages('142,147,344');?>
<div class="cleared"></div>
</div> <!-- Closes Nav -->
y me sale el siguiente error:
Parse error: syntax error, unexpected $end in /home/hipoteca/domains/tdtinfo.net/public_html/wp-content/themes/Vistalicious/header.php on line 82 |