Ver Mensaje Individual
  #1 (permalink)  
Antiguo 17/06/2010, 20:23
Avatar de edmkz
edmkz
 
Fecha de Ingreso: junio-2010
Ubicación: Mexico City
Mensajes: 3
Antigüedad: 13 años, 10 meses
Puntos: 0
Headers distintos por páginas

Hola, soy nuevo en el foro, había entrado para leer las soluciones a problemas que alguien ya habia posteado, sin embargo apenas ahora me encuentro con un muro, espero puedan ayudarme.

Vallamos al problema.

Quiero que mi CMS WP me presente distintos headers, dependiendo de las páginas que este me muestre, he tratado de trabajar las finciones condicionales, tal es el caso de is_page, pero sin exito alguno.

Esto es lo que he encontrado, y procurado poner en uso
Código PHP:
<?php
if     (is_page('contacto') {
    <?
php include (TEMPLATEPATH '/headercontacto.php'); ?>
}
elseif (is_page('foro') {
    <?php include (TEMPLATEPATH '/headerforo.php'); ?>
}
else {
    <?php get_header(); ?>
}
?>


Sin embargo con el Header.php de mi theme no logro hacerlo funcional, lo he intentado de la siguiente forma
Código PHP:
<div id="wrapper">

<?php include TEMPLATEPATH'/widgets/header.html'?>
<?php 
if     (is_page('Acerca de') {
    <?
php include (TEMPLATEPATH '/widgets/headeracerca.html'); ?>
<?php 
elseif (is_page('Foros') {
    <?
php include (TEMPLATEPATH '/widgets/headerforos.html'); ?>
<?php 
include TEMPLATEPATH'/widgets/menu.html'?>
Espero puedan ayudarme, dejo tambien el header.php en virgen

Código PHP:
<?php global $options?>
<?php 
if (!empty($_GET['lang'])) : include TEMPLATEPATH.'/languages/'.$_GET['lang']; else : include TEMPLATEPATH.'/languages/'.$options['language']; endif; ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="<?php echo $options['text_direction']; ?>" lang="<?php bloginfo('language'); ?>" xml:lang="<?php bloginfo('language'); ?>">
<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
<title><?php seotitles(); ?></title>
<!--CONDITIONAL CSS-->
<?php if (!empty($_GET['style'])) : ?>
<link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/styles/<?php print $_GET['style']; ?>/stylesheet.css" type="text/css" media="screen" />
<?php else : ?>
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
<?php endif; ?>
<!--CONDITIONAL CSS-->
<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" />
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
<link rel="shortcut icon" href="<?php bloginfo('template_directory'); ?>/favicon.ico" />
<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/scripts/jquery-1.3.1.min.js"></script>
<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/scripts/jquery-custom.js"></script>
<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/scripts/tabs.js"></script>
<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/scripts/clear-input.js"></script>
<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/scripts/jquery.cookie.js"></script>
<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/scripts/jquery.textarearesizer.js"></script>
<script type="text/javascript">
    $(document).ready(function() {
    $("textarea.resizable:not(.processed)").TextAreaResizer();
    });
</script>
<?php wp_head(); ?>
</head>
<body>
<?php if(ereg("el5tosol.com"$_SERVER["SCRIPT_URI"])) : require_once '../toolbar/toolbar.php'; endif; ?>
<?php 
if($options['loptions'] == true) : ?>
<div class="layout_options">
<p><?php print RESET_LAYOUT?></p>
<a href="#resetLayout" id="reset"><?php print RESET?></a>
</div>
<?php endif; ?>

<div id="wrapper">

<?php include TEMPLATEPATH'/widgets/header.html'?>
<?php 
include TEMPLATEPATH'/widgets/menu.html'?>
gracias!!