Foros del Web » Creando para Internet » Sistemas de gestión de contenidos » WordPress »

Problema con get_header()

Estas en el tema de Problema con get_header() en el foro de WordPress en Foros del Web. Hola, verán, hace poco que descubrí el php claro qué, e visto mucha ayuda por aquí y llevo 2 semanas con muchos problemas, verán: ''Tengo ...
  #1 (permalink)  
Antiguo 03/10/2009, 12:36
Avatar de elporta111  
Fecha de Ingreso: octubre-2009
Mensajes: 1
Antigüedad: 14 años, 6 meses
Puntos: 0
Problema con get_header()

Hola, verán, hace poco que descubrí el php
claro qué, e visto mucha ayuda por aquí y llevo 2 semanas
con muchos problemas, verán:

''Tengo un diseño web en php, pensé que saldría el html, pero no, es todo php y otros scripts, en fin, ahora, sólo me pedía subirlo y abrir el index.php ¡EHH! el error creo que es el index.php lo descomprimí, subí lo que me pidió y salió el típico error. Tomad, aquí tengo el código del index.php, más abajo os digo el error''

Código PHP:
<?php get_header(); ?>

<!-- Left // -->
<div class="left">
    <?php if (have_posts()) : ?>
        
        <?php if(is_home() && !get_query_var('paged')) : ?>
        <!-- Highlights // -->
        <span class="heading2"><span>Highlights</span></span>
        <ul class="highlights">
        <?php $highlight1 = new WP_Query("meta_key=thumbnail&cat=".get_wpn_config('highlights_category_id_1')."&showposts=1"); while($highlight1->have_posts()) : $highlight1->the_post();?>
            <li>
            <?php if(get_post_meta($post->ID"thumbnail"true)) : ?>
                <a href="<?php the_permalink(); ?>" class="thumbnail"><img src="<?php echo get_post_meta($post->ID"thumbnail"true); ?>" /></a>
            <?php endif; ?>
                <span class="title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></span>
                <span class="cat"><?php the_category(', '); ?></span>
            </li>
        <?php endwhile; ?>

        <?php $highlight2 = new WP_Query("meta_key=thumbnail&cat=".get_wpn_config('highlights_category_id_2')."&showposts=1"); while($highlight2->have_posts()) : $highlight2->the_post();?>
            <li>
            <?php if(get_post_meta($post->ID"thumbnail"true)) : ?>
                <a href="<?php the_permalink(); ?>" class="thumbnail"><img src="<?php echo get_post_meta($post->ID"thumbnail"true); ?>" /></a>
            <?php endif; ?>
                <span class="title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></span>
                <span class="cat"><?php the_category(', '); ?></span>
            </li>
        <?php endwhile; ?>

        <?php $highlight3 = new WP_Query("meta_key=thumbnail&cat=".get_wpn_config('highlights_category_id_3')."&showposts=1"); while($highlight3->have_posts()) : $highlight3->the_post();?>
            <li>
            <?php if(get_post_meta($post->ID"thumbnail"true)) : ?>
                <a href="<?php the_permalink(); ?>" class="thumbnail"><img src="<?php echo get_post_meta($post->ID"thumbnail"true); ?>" /></a>
            <?php endif; ?>
                <span class="title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></span>
                <span class="cat"><?php the_category(', '); ?></span>
            </li>
        <?php endwhile; ?>

        </ul>
        <div class="clear"></div>
        <!-- // Highlights -->
        <?php endif; ?>
    
        <!-- Latest Articles // -->
        <span class="heading2"><span><?php echo $_GET['paged'] ? 'Page'.$_GET['paged'] : 'Latest Articles'?></span></span>
        <ul class="articles">
        <?php while (have_posts()) : the_post(); ?>
            <li id="post-<?php the_ID(); ?>">    
                <a class="title" href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a>
                <span class="pinfo">
                    <a class="comments" href="<?php the_permalink() ?>#comments"><?php comments_number(__('0'), __('1'), __('%')); ?> Comments</a>Posted by <?php the_author_posts_link() ?> on <?php the_date(); ?> under <span><?php the_category(', '?></span>
                </span>
                <?php if(get_post_meta($post->ID"thumbnail"true)) : ?>
                    <a href="<?php the_permalink(); ?>" class="thumb"><img src="<?php echo get_post_meta($post->ID"thumbnail"true); ?>" /></a>
                <?php endif; ?>
                <div class="post">
                    <?php wpn_content_limit(get_the_content(),400); ?> <a href="<?php the_permalink(); ?>">more</a>.
                </div>
                <div class="clear"></div>
            </li>
        <?php endwhile; ?>
        </ul>
        <!-- // News List -->
        
        <!-- Page Navigation -->
        <?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?>
        
    <!-- 404 Error -->
    <?php else : include ('editable/404/404-error.php'); endif; ?>
    <div class="wpn_clear"></div>
</div>
<!-- // Left -->
<?php get_sidebar(); ?>
<?php get_footer
(); ?>
Claro, tiene que salir el típico error tocapelotas (Y con perdón) que es el siguiente:

Código:
Fatal error: Call to undefined function get_header() in /home/webcindario/h/a/habbo-liderazgo/index.php on line 1
Leí por aquí que a veces, es ''Ger_headers()'' así que lo prové. Pero, el error continuaba con esta:

Código:
Warning: get_headers() expects at least 1 parameter, 0 given in /home/webcindario/h/a/habbo-liderazgo/index.php on line 1

Fatal error: Call to undefined function have_posts() in /home/webcindario/h/a/habbo-liderazgo/index.php on line 5
Estoy desesperado, porqué cuanto más arreglo, más estropeado está. ¿Alguien podría decirme cuál es el error? ¡Se lo agradecería en lo más hondo!

Última edición por elporta111; 03/10/2009 a las 12:41
  #2 (permalink)  
Antiguo 03/10/2009, 13:23
Avatar de pateketrueke
Modernizr
 
Fecha de Ingreso: abril-2008
Ubicación: Mexihco-Tenochtitlan
Mensajes: 26.399
Antigüedad: 16 años
Puntos: 2534
Respuesta: Problema con get_header()

primero, revisa el manual...
http://php.net/get_headers

luego... los otros errores no tienen que ver con PHP en si... son derivados del sistema que utilizas, y obviamente dice: la función have_posts() no existe!!

y como esa función no es nativa de PHP, es tu problema...


suerte
__________________
Y U NO RTFM? щ(ºдºщ)

No atiendo por MP nada que no sea personal.
  #3 (permalink)  
Antiguo 04/10/2009, 14:06
Avatar de GatorV
$this->role('moderador');
 
Fecha de Ingreso: mayo-2006
Ubicación: /home/ams/
Mensajes: 38.567
Antigüedad: 18 años
Puntos: 2135
Respuesta: Problema con get_header()

Tema trasladado desde PHP
  #4 (permalink)  
Antiguo 04/10/2009, 20:55
Avatar de lucasan
Colaborador
 
Fecha de Ingreso: junio-2007
Ubicación: Cali - Colombia
Mensajes: 1.144
Antigüedad: 16 años, 10 meses
Puntos: 59
Respuesta: Problema con get_header()

El problema es que estas tratando de usar un Tema de Wordpress fuera de Wordpress. Lee un poco al respecto y te darás cuenta.
__________________
Plan Original Desarrollo Web
~$>sudo apt-get install -f
"Asi debería arreglarse todo en la vida"
  #5 (permalink)  
Antiguo 15/10/2009, 04:48
 
Fecha de Ingreso: noviembre-2008
Mensajes: 14
Antigüedad: 15 años, 5 meses
Puntos: 0
Respuesta: Problema con the_permalink()

Hola, a ver si me podéis ayudar.
Me pasa algo parecido al anterior problema, pero con the_permalink, me dice siempre:
Fatal error: Call to undefined function: the_permalink() in /includes/common.inc(1355) : eval()'d code on line 1
  #6 (permalink)  
Antiguo 15/10/2009, 08:06
 
Fecha de Ingreso: noviembre-2008
Mensajes: 14
Antigüedad: 15 años, 5 meses
Puntos: 0
Respuesta: Problema con get_header()

.. la web está hecha en drupal, y quiere meter enlaces a redes sociales, especialmente a facebook.
  #7 (permalink)  
Antiguo 15/10/2009, 10:47
Avatar de Nekko
Colaborador
 
Fecha de Ingreso: marzo-2008
Ubicación: Buenos Aires
Mensajes: 3.141
Antigüedad: 16 años, 1 mes
Puntos: 656
Respuesta: Problema con get_header()

Pero si la web está hecha en drupal, deberías postear en el subforo de esa plataforma.

http://www.forosdelweb.com/f136/
__________________
Taller para crear themes wordpress desde cero | Presupuestos para trabajos particulares vía MP
  #8 (permalink)  
Antiguo 16/10/2009, 10:04
AlvaroG
Invitado
 
Mensajes: n/a
Puntos:
Respuesta: Problema con get_header()

El problema parece ser que estás intentando usar un tema de WordPress en Drupal.
Comfirma si quieres dejar el tema por aquí o moverlo al foro de Drupal.


Saludos.
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 21:23.