Resultados de búsqueda para 'wpo'
-
-
Hola a todos.
Tengo una web, donde instalé un blog de wordpress. Actualmente estoy mostrando en la sección «NOTICIAS» de mi web, los posts extraídos de WP. Actualemente se muestran sólo 5 posts.
Mi pregunta es: Cómo puedo hacer para agregar el link «Entradas mas antiguas» al blog? Quiero que el usuario al hacer click en el link se recargue la página mostrando las 5 entradas siguientes!
Me pueden ayudar con eso?
Este es el código que utilicé para importar los posts:
<?php require_once($_SERVER [ 'DOCUMENT_ROOT'].'/blog/wp-config.php'); $my_query = new WP_Query('showposts=5'); while ($my_query->have_posts()) : $my_query->the_post(); $do_not_duplicate = $post->ID; ?> <li> <div id="big_wrapper"> <div id="wrapper"> <div id="cell"> <div class="content"> <?php the_post_thumbnail('medium'); ?> </div> </div> </div> <div class="noticia"> <span id="titulo"><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></span><br> <span id="time"><?php the_time('j') ?>/<?php the_time('M') ?>/<?php the_time('Y') ?></span><br> <span id="contenido"><?php the_excerpt(); ?></span><br> <span id="ver_mas" style="float: right;"><a href="<?php the_permalink() ?>">VER MÁS ></a></span> </div> </li> </div> <?php endwhile;?>
Gracias por leer mi pregunta, espero me puedan ayudar! 😀
-
Buenas tardes, quisiera editar la cabecera de mi tema, para agregar un flash, ya puedo agregarlo a los widgets pero cuando lo coloco en la cabecera por opcion del tema se elimina solo, asi que tendre que hacerlo editando la nota header.php y si alguien me dice como hacerlo lo agreadeceria porfavor, ya tengo el URL del flash y el tema que uso es coller 🙁
?php /** * The Header for our theme. * * Displays all of the <head> section and everything up till <main id="main"> * * @package Coller */ ?><!DOCTYPE html> <html <?php language_attributes(); ?>> <head> <meta charset="<?php bloginfo( 'charset' ); ?>"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title><?php wp_title( '|', true, 'right' ); ?></title> <link rel="profile" href="http://gmpg.org/xfn/11"> <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>"> <?php wp_head(); ?> </head> <body <?php body_class(); ?>> <div id="page" class="hfeed site"> <?php do_action( 'before' ); ?> <header id="masthead" class="site-header" role="banner"> <div class="site-branding"> <?php if((of_get_option('logo', true) != "") && (of_get_option('logo', true) != 1) ) { ?> <h1 class="site-title logo-container"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"> <?php echo "<img class='main_logo' src='".of_get_option('logo', true)."' title='".esc_attr(get_bloginfo( 'name','display' ) )."'></a></h1>"; } else { ?> <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1> <?php } ?> </div> <div id="social_icons"> <?php if ( of_get_option('facebook', true) != "") { ?> <a href="<?php echo of_get_option('facebook', true); ?>" title="Facebook" ><img src="<?php echo get_stylesheet_directory_uri()."/images/facebook.png"; ?>"></a> <?php } ?> <?php if ( of_get_option('twitter', true) != "") { ?> <a href="http://twitter.com/<?php echo of_get_option('twitter', true); ?>" title="Twitter" ><img src="<?php echo get_stylesheet_directory_uri()."/images/twitter.png"; ?>"></a> <?php } ?> <?php if ( of_get_option('google', true) != "") { ?> <a href="<?php echo of_get_option('google', true); ?>" title="Google Plus" ><img src="<?php echo get_stylesheet_directory_uri()."/images/google.png"; ?>"></a> <?php } ?> <?php if ( of_get_option('pinterest', true) != "") { ?> <a href="<?php echo of_get_option('pinterest', true); ?>" title="Pinterest" ><img src="<?php echo get_stylesheet_directory_uri()."/images/pinterest.png"; ?>"></a> <?php } ?> <?php if ( of_get_option('linkedin', true) != "") { ?> <a href="<?php echo of_get_option('linkedin', true); ?>" title="Linked In" ><img src="<?php echo get_stylesheet_directory_uri()."/images/linkedin.png"; ?>"></a> <?php } ?> <?php if ( of_get_option('instagram', true) != "") { ?> <a href="<?php echo of_get_option('instagram', true); ?>" title="Instagram" ><img src="<?php echo get_stylesheet_directory_uri()."/images/instagram.png"; ?>"></a> <?php } ?> <?php if ( of_get_option('youtube', true) != "") { ?> <a href="<?php echo of_get_option('youtube', true); ?>" title="YouTube" ><img src="<?php echo get_stylesheet_directory_uri()."/images/youtube.png"; ?>"></a> <?php } ?> <?php if ( of_get_option('feedburner', true) != "") { ?> <a href="<?php echo of_get_option('feedburner', true); ?>" title="RSS Feed" ><img src="<?php echo get_stylesheet_directory_uri()."/images/rss.png"; ?>"></a> <?php } ?> </div> </header><!-- #masthead --> <nav id="site-navigation" class="main-navigation" role="navigation"> <div id="nav-container"> <h1 class="menu-toggle"><?php _e( 'Menu', 'coller' ); ?></h1> <div class="screen-reader-text skip-link"><a href="#content" title="<?php esc_attr_e( 'Skip to content', 'coller' ); ?>"><?php _e( 'Skip to content', 'coller' ); ?></a></div> <?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?> </div> </nav><!-- #site-navigation --> <div id="content" class="site-content"> <?php if ( (function_exists( 'of_get_option' )) && (of_get_option('slidetitle5',true) !=1) ) { if ( ( of_get_option('slider_enabled') != 0 ) && ( (is_home() == true) || (is_front_page() ==true) ) ) { ?> <div id="slider-wrapper"> <ul class="bxslider"> <?php $slider_flag = false; for ($i=1;$i<6;$i++) { if ( of_get_option('slide'.$i, true) != "" ) { echo "<li><a href='".of_get_option('slideurl'.$i, true)."'><img src='".of_get_option('slide'.$i, true)."' title='".of_get_option('slidetitle'.$i, true)."'></a></li>"; $slider_flag = true; } } ?> </ul> </div> <?php } } ?>
-
Buenas tardes,
Necesito que el tamaño de las imágenes destacadas de los post que se visualiza en la home se distinto de las que si visualizan dentro de las categorías.
Es decir, tengo la home en dos columnas y las imagenes de 312×100 el problema es que cuando pinchas en la categoría, te aparece el listado de los post dentro de esa categoría y las imágenes aparecen igual que en la home, de 312×100, porque para que salieran de esa medida modifique esto:
.entry-thumbnail img {
width: 312px;
height: 120px;
display: block;
}
Necesitaba saber si puedo añadir un código a la home para decirle que el máximo de las imágenes ahi sea de 312×100 y modifico el código de arriba al tamaño anterior, es decir decirle que el máximo de tamaño en la home sea de 312×100.Asi es como tengo configurada la columna izquierda de la home, al igual que la derecha., únicamente cambia la categoría y la cantidad de post a mostrar.
<div class=»left»>
<?php if ( have_posts() ) : ?>
<?php query_posts(‘showposts=1&cat=26’); ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( ‘content’, get_post_format() );?>
<?php endwhile; ?>
<?php endif; ?>
</div>Estoy intentado solucionarlo pero no hay manera y no he encontrado nada ni en español ni en ingles por ningún sitio.
Muchas Gracias por vuestra ayuda.
Un saludo
-
Hola a todos, estamos instalando el plugin dynamic headers en el tema twenty twelve. Lo que nos falta es añadir el código que da el plugin en el header.php de nuestro tema, y necesitamos saber en que parte del código pegarlo.
Éste es nuestro header.php:
<?php
/**
* The Header for our theme.
*
* Displays all of the <head> section and everything up till <div id=»main»>
*
* @package WordPress
* @subpackage Twenty_Twelve
* @since Twenty Twelve 1.0
*/
?><!DOCTYPE html>
<!–[if IE 7]>
<html class=»ie ie7″ <?php language_attributes(); ?>>
<![endif]–>
<!–[if IE 8]>
<html class=»ie ie8″ <?php language_attributes(); ?>>
<![endif]–>
<!–[if !(IE 7) | !(IE 8) ]><!–>
<html <?php language_attributes(); ?>>
<!–<![endif]–>
<head>
<meta charset=»<?php bloginfo( ‘charset’ ); ?>» />
<meta name=»viewport» content=»width=device-width» />
<title><?php wp_title( ‘|’, true, ‘right’ ); ?></title>
<link rel=»profile» href=»http://gmpg.org/xfn/11″ />
<link rel=»pingback» href=»<?php bloginfo( ‘pingback_url’ ); ?>» />
<?php // Loads HTML5 JavaScript file to add support for HTML5 elements in older IE versions. ?>
<!–[if lt IE 9]>
<script src=»<?php echo get_template_directory_uri(); ?>/js/html5.js» type=»text/javascript»></script>
<![endif]–>
<?php wp_head(); ?>
</head><body <?php body_class(); ?>>
<div id=»page» class=»hfeed site»>
<header id=»masthead» class=»site-header» role=»banner»>
<hgroup>
<h1 class=»site-title»>» title=»<?php echo esc_attr( get_bloginfo( ‘name’, ‘display’ ) ); ?>» rel=»home»><?php bloginfo( ‘name’ ); ?></h1>
<h2 class=»site-description»><?php bloginfo( ‘description’ ); ?></h2>
</hgroup><nav id=»site-navigation» class=»main-navigation» role=»navigation»>
<h3 class=»menu-toggle»><?php _e( ‘Menu’, ‘twentytwelve’ ); ?></h3>
«><?php _e( ‘Skip to content’, ‘twentytwelve’ ); ?>
<?php wp_nav_menu( array( ‘theme_location’ => ‘primary’, ‘menu_class’ => ‘nav-menu’ ) ); ?>
</nav><!– #site-navigation –><?php $header_image = get_header_image();
if ( ! empty( $header_image ) ) : ?>
«><img src=»<?php echo esc_url( $header_image ); ?>» class=»header-image» width=»<?php echo get_custom_header()->width; ?>» height=»<?php echo get_custom_header()->height; ?>» alt=»» />
<?php endif; ?>
</header><!– #masthead –><div id=»main» class=»wrapper»>
Y éste el código que tenemos que añadir:
<?php
if(function_exists(‘show_media_header’)){
show_media_header();
}
?>Muchas gracias de antemano
Saludos
-
Buenas,
HE estado revisando mensajes y el codex y no encuentro mi error. A ver si alguien puede ayudarmeHe creado un plugin para hacer un nuevo CUSTOM POST TYPE.
este es el código:
<?php /* Plugin Name: POPUP CUSTOM TYPE */ add_action('init', 'popup_custom_type'); function popup_custom_type(){ register_post_type('popup_custom_type', array( 'labels' => array( 'name' => 'Popup Custom type', 'menu_name' => 'Popup Posts'), 'singular_label' => 'Popup Custom Type', 'public' => true, 'capability_type' => 'post', 'has_archive' => true, 'hierarchical' => false, 'show_in_menu' => true, 'supports' => array( 'title', 'editor', 'author', 'revisions', 'comments') ) ); } ?>
He creado una plantilla, que se llama single-custom_post_type.php con esta llamada:
<?php $query = array( 'post_type' => 'popup_custom_type', 'showposts' => 1, 'post_status' => array('publish', 'pending', 'draft', 'auto-draft', 'future', 'private', 'inherit', 'trash') ); query_posts($query); if (have_posts()) : while (have_posts()) : the_post(); ?> <?php the_content(); ?> <?php endwhile; else: endif; ?>
Y posteriormente he creado mi custom post type, cuando pre-visualizo en versión draft, me aparece perfectamente, con estilos y todo. Pero cuando publico, nada, me sale este error:
Sorry, no posts matched your criteria.¿Alguien sabe qué puede estar pasando???
Graciass
-
Buenas,
HE estado revisando mensajes y el codex y no encuentro mi error. A ver si alguien puede ayudarmeHe creado un plugin para hacer un nuevo CUSTOM POST TYPE.
este es el código:
<?php /* Plugin Name: POPUP CUSTOM TYPE */ add_action('init', 'popup_custom_type'); function popup_custom_type(){ register_post_type('popup_custom_type', array( 'labels' => array( 'name' => 'Popup Custom type', 'menu_name' => 'Popup Posts'), 'singular_label' => 'Popup Custom Type', 'public' => true, 'capability_type' => 'post', 'has_archive' => true, 'hierarchical' => false, 'show_in_menu' => true, 'supports' => array( 'title', 'editor', 'author', 'revisions', 'comments') ) ); } ?>
He creado una plantilla, que se llama single-custom_post_type.php con esta llamada:
<?php $query = array( 'post_type' => 'popup_custom_type', 'showposts' => 1, 'post_status' => array('publish', 'pending', 'draft', 'auto-draft', 'future', 'private', 'inherit', 'trash') ); query_posts($query); if (have_posts()) : while (have_posts()) : the_post(); ?> <?php the_content(); ?> <?php endwhile; else: endif; ?>
Y posteriormente he creado mi custom post type, cuando pre-visualizo en versión draft, me aparece perfectamente, con estilos y todo. Pero cuando publico, nada, me sale este error:
Sorry, no posts matched your criteria.¿Alguien sabe qué puede estar pasando???
Graciass
-
Buenas,
HE estado revisando mensajes y el codex y no encuentro mi error. A ver si alguien puede ayudarmeHe creado un plugin para hacer un nuevo CUSTOM POST TYPE.
este es el código:
<?php /* Plugin Name: POPUP CUSTOM TYPE */ add_action('init', 'popup_custom_type'); function popup_custom_type(){ register_post_type('popup_custom_type', array( 'labels' => array( 'name' => 'Popup Custom type', 'menu_name' => 'Popup Posts'), 'singular_label' => 'Popup Custom Type', 'public' => true, 'capability_type' => 'post', 'has_archive' => true, 'hierarchical' => false, 'show_in_menu' => true, 'supports' => array( 'title', 'editor', 'author', 'revisions', 'comments') ) ); } ?>
He creado una plantilla, que se llama single-custom_post_type.php con esta llamada:
<?php $query = array( 'post_type' => 'popup_custom_type', 'showposts' => 1, 'post_status' => array('publish', 'pending', 'draft', 'auto-draft', 'future', 'private', 'inherit', 'trash') ); query_posts($query); if (have_posts()) : while (have_posts()) : the_post(); ?> <?php the_content(); ?> <?php endwhile; else: endif; ?>
Y posteriormente he creado mi custom post type, cuando pre-visualizo en versión draft, me aparece perfectamente, con estilos y todo. Pero cuando publico, nada, me sale este error:
Sorry, no posts matched your criteria.¿Alguien sabe qué puede estar pasando???
Graciass
-
Buenas noches,
Mi problema es el siguiente:
En la página principal de mi sitio ( http://www.eyesa.es ) tengo una zona a la derecha donde se muestran los títulos de los 4 últimos posts del blog y se enlaza cada título con el contenido o la entrada completa de esa noticia. Ese enlace lleva a otra página del sitio mediante el siguiente código:
<?php require('./blog/wp-blog-header.php'); ?> <?php query_posts('showposts=4');?> <?php while (have_posts()) : the_post(); ?> <?php $id = get_the_ID(); ?> <li><a>" target="_blank"><?php the_title(); ?></a></li> <?php endwhile;?>
Sin embargo, al mostrar la entrada en el propio sitio web en lugar de en el blog, las fotografías se descuadran, las miniaturas de Youtube no aparecen y la imagen destacada que se puede meter en wordpress tampoco aparece.
Tengo dos preguntas:
1) Existe alguna forma de hacer que en la pagina web se vea tal cual como en el blog, con los plugins de youtube y con las fotos con su formato? Tal vez con algun require en php?
2) En el caso de que no pueda mostrarlo en la pagina web y tenga que hacer el enlace directamente a la entrada del blog, ¿Cómo puedo reescribir el código? Es decir, ¿a dónde pongo el link en a href? He probado a poner
<?php require('./blog/wp-blog-header.php'); ?> <?php query_posts('showposts=4');?> <?php while (have_posts()) : the_post(); ?> <?php $id = get_the_ID(); ?> <li><strong><a>" target="_blank"></a></strong><?php the_title(); ?></li> <?php endwhile;?>
3) Desde el punto de vista de SEO, es mejor mostrar el contenido en tu propia sitio web o en el blog (aunque por otra parte, el blog está dentro del propio sitio web…)
Gracias anticipadas.
Saludos
-
Hi amigos.. estoy armando un sitio web con un blog wordpress, mediante wp-load pongo un post recientes en mi página index (fuera de wordpress….) bueno, el hecho es que ya he usado este codigo y funciona, pero esta vez no entiendo porque no funciona.. he buscado la respuesta en todas partes y me doy por vencido.. tal vez ustedes me puedan ayudar el codigo en el index.html es…
<div id=”ultpot”>
<h3>Ultimos Post</h3>
<?php
require (‘blog/wp-load.php’) ?>
<?php query_posts(‘showposts=4′);
while (have_posts()) : the_post(); ?>
<div>
<h2>”><?php the_title(); ?></h2>
<?php if ( has_post_thumbnail() ) { the_post_thumbnail( ‘homepage-thumb’ ); } ?>
<?php the_excerpt(); ?>
</div>
<?php endwhile; wp_reset_query(); ?>
</div>la ruta que uso en el require es correcta pues wordpress esta instalado en el directorio blog a la misma altura de index.html.. les digo que he usado el codigo antes y funcion y no se porque aqui no…
alguien que sepa..?
gracias
-
Hola, he mirado en el foro posibles soluciones, las he aplicado pero no me funcionan.
Estoy haciendo una pagina, y necesito ordenar unos posts que pertenezcan a 2 categorias concretas, para ello, busqué por ahí, y tengo que usar el category__and. Hasta ahí perfecto.
El problema es que si uso category__and los post no se ordenan del mas reciente al mas viejo, sino que se ordena por fecha de creación, el primer post creado el primero y el último al final.
CÓDIGO USADO
NOTA: sobre el tema Infocus. Ellos dicen que pregunte aquí:
http://mysitemyway.com/support/topic/blog_list-order#post-110728CATEGORY__IN = FUNCIONA:
if( trim( $pagination ) == 'true' ) { $paged = mysite_get_page_query(); $blog_query->query(array( 'post__in' => $post_in, 'category__in' => $category_in, 'tag__in' => $tag_in, 'post_type' => 'post', 'posts_per_page' => $showposts, 'paged' => $paged, 'offset' => $offset, 'ignore_sticky_posts' => 1, 'orderby' => 'date', 'order' => 'DESC', )); } else { $blog_query->query(array( 'post__in' => $post_in, 'category__in' => $category_in, 'tag__in' => $tag_in, 'post_type' => 'post', 'showposts' => $showposts, 'nopaging' => 0, 'offset' => $offset, 'ignore_sticky_posts' => 1, 'orderby' => 'date', 'order' => 'DESC', )); }
CATEGORY__AND = NO FUNCIONA
if( trim( $pagination ) == 'true' ) { $paged = mysite_get_page_query(); $blog_query->query(array( 'post__in' => $post_in, 'category__and' => $category_in, 'tag__in' => $tag_in, 'post_type' => 'post', 'posts_per_page' => $showposts, 'paged' => $paged, 'offset' => $offset, 'ignore_sticky_posts' => 1, 'orderby' => 'date', 'order' => 'DESC', )); } else { $blog_query->query(array( 'post__in' => $post_in, 'category__and' => $category_in, 'tag__in' => $tag_in, 'post_type' => 'post', 'showposts' => $showposts, 'nopaging' => 0, 'offset' => $offset, 'ignore_sticky_posts' => 1, 'orderby' => 'date', 'order' => 'DESC', )); }
Si uso category__in se ordenan bien, si uso category__and, da igual como lo ordene que el orden es el de la fecha de la creación
-
Buenas a todos/as estoy utilizando el theme Brunelleschi. El problema que tengo es que no me deja colocar imagen de cabecera. La coloco en Header, la veo en vista previa, pero no puedo verla en la página real. La página es http://pruebablogemi.netii.net/
Este es header.php
<!doctype html>
<!–[if lt IE 7]> <html class=»no-js ie6 lt-ie9 lt-ie8 lt-ie7″ <?php echo language_attributes(); ?>> <![endif]–>
<!–[if IE 7]> <html class=»no-js ie7 lt-ie9 lt-ie8″ <?php echo language_attributes(); ?>> <![endif]–>
<!–[if IE 8]> <html class=»no-js ie8 lt-ie9″ <?php echo language_attributes(); ?>> <![endif]–>
<!–[if gt IE 8]><!–> <html class=»no-js» <?php echo language_attributes(); ?>> <!–<![endif]–>
<head>
<meta charset=»<?php bloginfo( ‘charset’ ); ?>» />
<meta http-equiv=»X-UA-Compatible» content=»IE=edge,chrome=1″>
<meta name=»viewport» content=»width=device-width»>
<title><?php brunelleschi_title(); ?></title>
<link rel=»profile» href=»http://gmpg.org/xfn/11″ />
<link rel=»pingback» href=»<?php bloginfo( ‘pingback_url’ ); ?>» />
<style type=»text/css»> #wrapper { max-width: <?php echo brunelleschi_options(‘content-width’); ?>px !important;} </style>
<?php
if ( is_singular() && get_option( ‘thread_comments’ ) )
wp_enqueue_script( ‘comment-reply’ );
wp_head();
?>
<style><?php if(brunelleschi_options(‘extra-css’)){ echo brunelleschi_options(‘extra-css’); }?></style>
</head>
<body <?php body_class(); ?>>
<div id=»wrapper» class=»hfeed container»>
<header id=»header» class=»row clearfix»>
<?php if( (brunelleschi_options(‘header-order’) === __(‘Text on Top’,’brunelleschi’) || brunelleschi_options(‘header-order’) === __(‘Text on the Left’,’brunelleschi’) || ! brunelleschi_options(‘header-order’)) && !(brunelleschi_options(‘navigation-position’) === __(‘Nav Above Banner’,’brunelleschi’) && brunelleschi_options(‘header-order’) === __(‘Text on the Left’,’brunelleschi’)) ) : ?>
<hgroup id=»branding» class=»<?php brunelleschi_branding_class(); ?>»>
<h1 class=»site-title»>» title=»<?php echo esc_attr( get_bloginfo( ‘name’, ‘display’ ) ); ?>» rel=»home»><?php bloginfo( ‘name’ ); ?></h1>
<h2 class=»site-description»><?php bloginfo( ‘description’ ); ?></h2>
</hgroup>
<?php endif; ?>
<?php if(!brunelleschi_options(‘hide-navigation’) && brunelleschi_options(‘navigation-position’) === __(‘Nav Above Banner’,’brunelleschi’)): ?>
<div id=»access» role=»navigation» class=»twelvecol last clearfix»>
<div class=»skip-link screen-reader-text»>«><?php _e( ‘Skip to content’, ‘brunelleschi’ ); ?></div>
<?php wp_nav_menu( array( ‘container_class’ => ‘menu-header’, ‘theme_location’ => ‘primary’ ) ); ?>
</div><!– #access –>
<?php endif; ?>
<?php if( brunelleschi_options(‘navigation-position’) === __(‘Nav Above Banner’,’brunelleschi’) && ( brunelleschi_options(‘header-order’) === __(‘Text on the Left’,’brunelleschi’) || ! brunelleschi_options(‘header-order’) )) : ?>
<hgroup id=»branding» class=»<?php brunelleschi_branding_class(); ?>»>
<h1 class=»site-title»>» title=»<?php echo esc_attr( get_bloginfo( ‘name’, ‘display’ ) ); ?>» rel=»home»><?php bloginfo( ‘name’ ); ?></h1>
<h2 class=»site-description»><?php bloginfo( ‘description’ ); ?></h2>
</hgroup>
<?php endif; ?>
<?php if(brunelleschi_options(‘use-featured-content’)): ?>
<?php get_template_part( ‘featured’, ‘content’ ); ?>
<?php elseif(brunelleschi_options(‘use-header-image’)) : ?>
<?php
// Check if this is a post or page, if it has a thumbnail, and if it’s a big one
if ( is_singular() && current_theme_supports( ‘post-thumbnails’ ) &&
has_post_thumbnail( $post->ID ) &&
( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), ‘post-thumbnail’ ) ) &&
$image[1] >= HEADER_IMAGE_WIDTH ) :
// Houston, we have a new header image!
echo get_the_post_thumbnail( $post->ID, array( HEADER_IMAGE_WIDTH, HEADER_IMAGE_HEIGHT ), array( ‘id’ => ‘headerimg’) );
elseif ( get_header_image() ) : ?>
» class=»<?php brunelleschi_banner_class(); ?>» title=»<?php echo esc_attr( get_bloginfo( ‘name’, ‘display’ ) ); ?>» rel=»home»>
<img src=»<?php header_image(); ?>» alt=»» id=»headerimg» />
<?php endif; ?>
<?php endif; ?>
<?php if(brunelleschi_options(‘header-order’) === __(‘Text on the Bottom’,’brunelleschi’) || brunelleschi_options(‘header-order’) === __(‘Text on the Right’,’brunelleschi’)) : ?>
<hgroup id=»branding» class=»<?php brunelleschi_branding_class(); ?>»>
<h1 class=»site-title»>» title=»<?php echo esc_attr( get_bloginfo( ‘name’, ‘display’ ) ); ?>» rel=»home»><?php bloginfo( ‘name’ ); ?></h1>
<h2 class=»site-description»><?php bloginfo( ‘description’ ); ?></h2>
</hgroup>
<?php endif; ?>
<?php if((brunelleschi_options(‘navigation-position’)) == false || !brunelleschi_options(‘hide-navigation’) && brunelleschi_options(‘navigation-position’) === __(‘Nav Below Banner’,’brunelleschi’)): ?>
<div id=»access» role=»navigation» class=»twelvecol last clearfix»>
<div class=»skip-link screen-reader-text»>«><?php _e( ‘Skip to content’, ‘brunelleschi’ ); ?></div>
<?php wp_nav_menu( array( ‘container_class’ => ‘menu-header’, ‘theme_location’ => ‘primary’ ) ); ?>
</div><!– #access –>
<?php endif; ?>
</header><!– #header –>
<div id=»container» class=»row clearfix»>¿A qué se debe?
Muchas gracias.
Saludos
-