Ver Mensaje Individual
  #2 (permalink)  
Antiguo 30/05/2009, 11:16
Avatar de -Defero-
-Defero-
Colaborador
 
Fecha de Ingreso: julio-2004
Ubicación: Guipúzcoa
Mensajes: 4.776
Antigüedad: 19 años, 10 meses
Puntos: 76
Respuesta: Integrar página web con Wordpress

Yo eso lo he hecho aquí. Como puedes ver, en la portada de la web aparecen los resúmenes de las últimas noticias (y encima en blingüe). El código de la portada es el siguiente (quitando el código que no interesa a efectos de tu consulta):

Código PHP:
<?

// Obtiene de la URL el idioma que se debe mostrar
$lang mysql_escape_string($_GET["lang"]);

if (
$lang != 'eus')
    {
    
$wp_lang 'es';
    }
else
    {
    
$wp_lang 'eu';
    }
?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
    </head>
<body>

            <div id="noticias" style="float: right; height: 410px; overflow: auto; padding: 0; margin: 0; margin-left: 5px; padding-right: 5px;">
                <?php
                
require_once("./blog/wp-config.php");
                
$q_config['language'] = $wp_lang;
                
?>

                <?php
                $my_query 
= new WP_Query('showposts=10');
                while (
$my_query->have_posts()) : $my_query->the_post();
                
$do_not_duplicate $post->ID?>

                <h3><span class="fecha"><?php the_time('Y/m/d'); ?></span> <a href="<? the_permalink(); ?>"><? the_title(); ?></a></h3><? the_content('<!--:es-->leer m&aacute;s &raquo;<!--:--><!--:eu-->jarraitu irakurtzen &raquo;<!--:-->');?>
                <?php endwhile; ?>
            </div> <!-- cierre div noticias -->

</body>
</html>
__________________
abogado en Errenteria + procuradora en San Sebastián = equipo imparable