Soporte » Buscar » Resultados de búsqueda para 'wpo'

Viendo 15 resultados - del 196 al 210 (de un total de 226)
    • 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 ayudarme

      He 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 ayudarme

      He 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 ayudarme

      He 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

      • Este debate fue modificado hace 4 años, 8 meses por Mariano Perez.

    Prueba con esto:

    <?php
    $ultimas = new WP_Query();
    $ultimas -> query('showposts=3');
    while($ultimas -> have_posts()) : $ultimas ->the_post();
    ?>
    <h3><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h3>
    <?php the_excerpt(); ?>
    <?php endwhile; wp_reset_postdata(); ?>

    Creo que debería funcionar. Esto obtiene las 3 últimas entradas y muestra el título y un extracto de la entrada.

    Un saludo

    • 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 instalé la plantilla GlowTheme en mi sitio WP y no se como hacer que funcione la galería aquí dejo un ejemplo de como debería quedar el slider en esta plantilla y aquí dejo el código php que hay que modificar para hacer que funcione o al menos el que yo creo que es:

      featured.php

      <code>	<!-- Featured Area -->
      			<div id="featured-area">
      				<div id="s1" class="pics">
      <?php $ids = array(); $arr = array(); $i=1;
      query_posts("showposts=3&cat=".get_catId(get_option('glow_feat_cat')));
      while (have_posts()) : the_post(); ?>
      	<?php $thumb = get_post_meta($post->ID, 'Thumbnail', $single = true); ?>
      	<?php if (($thumb == '') && ($glow_grab_image == 'on')) $thumb = catch_that_image(); ?>
      					<div>
      						<img src="<?php bloginfo('stylesheet_directory'); ?>/timthumb.php?src=<?php echo $thumb; ?>&h=298&w=630&zc=1" width="630" height="298" alt="<?php echo(the_title()); ?>" />
      						<div class="excerpt">
      							<p><?php truncate_post(190,true); ?></p>
      						</div>
      						<a href="<?php the_permalink() ?>" title="Link permanente hacia <?php the_title(); ?>"><span class="feat-overlay"></span></a>
      					</div>
      	<?php $arr[$i]["thumb"] = $thumb;
      		  $arr[$i]["title"] = truncate_title(30,false);
      		  $arr[$i]["fulltitle"] = truncate_title(250,false);
      		  $arr[$i]["postinfo"] = "Posted by ". get_the_author_meta('display_name') . " on " . get_the_time(get_option('glow_date_format'));
      	$i++; ?>
      <?php $ids[]= $post->ID;
      endwhile; wp_reset_query(); ?>
      				</div> <!-- end .pics -->
      
      				<div id="slider-control">
      <?php for ($i = 1; $i <= 3; $i++) {
      		if ($arr[$i]["thumb"] <> '' ) { ?>				
      
      					<div class="featitem <?php if ($i==1) echo("active");?>">
      						<img src="<?php bloginfo('stylesheet_directory'); ?>/timthumb.php?src=<?php echo $arr[$i]["thumb"]; ?>&h=67&w=67&zc=1" alt="<?php echo($arr[$i]["fulltitle"]); ?>" />
      						<h2><?php echo($arr[$i]["title"]);?></h2>
      						<span class="meta"><?php echo($arr[$i]["postinfo"]); ?></span>
      						<span class="order"><?php echo($i); ?></span>
      					</div> <!-- end .featitem -->
      
      		<?php } else {
      			break;
      	    }
      } ?>
      				</div> <!-- end slider-control div -->
      
      				<div class="clear"></div>
      			</div> <!-- end featured area --></code>

      timthumb.php

      <code><?php
      /*
      	TimThumb script created by Tim McDaniels and Darren Hoyt with tweaks by Ben Gillbanks
      	http://code.google.com/p/timthumb/
      
      	MIT License: http://www.opensource.org/licenses/mit-license.php
      
      	Paramters
      	---------
      	w: width
      	h: height
      	zc: zoom crop (0 or 1)
      	q: quality (default is 75 and max is 100)
      
      	HTML example: <img src="/scripts/timthumb.php?src=/images/whatever.jpg&w=150&h=200&zc=1" alt="" />
      */
      
      /*
      $sizeLimits = array(
      	"100x100",
      	"150x150",
      );
      */
      
      define ('CACHE_SIZE', 250);		// number of files to store before clearing cache
      define ('CACHE_CLEAR', 5);		// maximum number of files to delete on each cache clear
      define ('VERSION', '1.09');		// version number (to force a cache refresh
      
      $imageFilters = array(
      	"1" => array(IMG_FILTER_NEGATE, 0),
      	"2" => array(IMG_FILTER_GRAYSCALE, 0),
      	"3" => array(IMG_FILTER_BRIGHTNESS, 1),
      	"4" => array(IMG_FILTER_CONTRAST, 1),
      	"5" => array(IMG_FILTER_COLORIZE, 4),
      	"6" => array(IMG_FILTER_EDGEDETECT, 0),
      	"7" => array(IMG_FILTER_EMBOSS, 0),
      	"8" => array(IMG_FILTER_GAUSSIAN_BLUR, 0),
      	"9" => array(IMG_FILTER_SELECTIVE_BLUR, 0),
      	"10" => array(IMG_FILTER_MEAN_REMOVAL, 0),
      	"11" => array(IMG_FILTER_SMOOTH, 0),
      );
      
      // sort out image source
      $src = get_request("src", "");
      if($src == ".../images/img.jpg" || strlen($src) <= 3) {
      	displayError("no image specified");
      }
      
      // clean params before use
      $src = cleanSource($src);
      // last modified time (for caching)
      $lastModified = filemtime($src);
      
      // get properties
      $new_width 		= preg_replace("/[^0-9]+/", "", get_request("w", 0));
      $new_height 	= preg_replace("/[^0-9]+/", "", get_request("h", 0));
      $zoom_crop 		= preg_replace("/[^0-9]+/", "", get_request("zc", 1));
      $quality 		= preg_replace("/[^0-9]+/", "", get_request("q", 80));
      $filters		= get_request("f", "");
      
      if ($new_width == 0 && $new_height == 0) {
      	$new_width = 100;
      	$new_height = 100;
      }
      
      // set path to cache directory (default is ./cache)
      // this can be changed to a different location
      $cache_dir = './cache';
      
      // get mime type of src
      $mime_type = mime_type($src);
      
      // check to see if this image is in the cache already
      check_cache( $cache_dir, $mime_type );
      
      // if not in cache then clear some space and generate a new file
      cleanCache();
      
      ini_set('memory_limit', "30M");
      
      // make sure that the src is gif/jpg/png
      if(!valid_src_mime_type($mime_type)) {
      	displayError("Invalid src mime type: " .$mime_type);
      }
      
      // check to see if GD function exist
      if(!function_exists('imagecreatetruecolor')) {
      	displayError("GD Library Error: imagecreatetruecolor does not exist");
      }
      
      if(strlen($src) && file_exists($src)) {
      
      	// open the existing image
      	$image = open_image($mime_type, $src);
      	if($image === false) {
      		displayError('Unable to open image : ' . $src);
      	}
      
      	// Get original width and height
      	$width = imagesx($image);
      	$height = imagesy($image);
      
      	// don't allow new width or height to be greater than the original
      	if( $new_width > $width ) {
      		$new_width = $width;
      	}
      	if( $new_height > $height ) {
      		$new_height = $height;
      	}
      
      	// generate new w/h if not provided
      	if( $new_width && !$new_height ) {
      
      		$new_height = $height * ( $new_width / $width );
      
      	} elseif($new_height && !$new_width) {
      
      		$new_width = $width * ( $new_height / $height );
      
      	} elseif(!$new_width && !$new_height) {
      
      		$new_width = $width;
      		$new_height = $height;
      
      	}
      
      	// create a new true color image
      	$canvas = imagecreatetruecolor( $new_width, $new_height );
      	imagealphablending($canvas, false);
      	// Create a new transparent color for image
      	$color = imagecolorallocatealpha($canvas, 0, 0, 0, 127);
      	// Completely fill the background of the new image with allocated color.
      	imagefill($canvas, 0, 0, $color);
      	// Restore transparency blending
      	imagesavealpha($canvas, true);
      
      	if( $zoom_crop ) {
      
      		$src_x = $src_y = 0;
      		$src_w = $width;
      		$src_h = $height;
      
      		$cmp_x = $width  / $new_width;
      		$cmp_y = $height / $new_height;
      
      		// calculate x or y coordinate and width or height of source
      
      		if ( $cmp_x > $cmp_y ) {
      
      			$src_w = round( ( $width / $cmp_x * $cmp_y ) );
      			$src_x = round( ( $width - ( $width / $cmp_x * $cmp_y ) ) / 2 );
      
      		} elseif ( $cmp_y > $cmp_x ) {
      
      			$src_h = round( ( $height / $cmp_y * $cmp_x ) );
      			$src_y = round( ( $height - ( $height / $cmp_y * $cmp_x ) ) / 2 );
      
      		}
      
      		imagecopyresampled( $canvas, $image, 0, 0, $src_x, $src_y, $new_width, $new_height, $src_w, $src_h );
      
      	} else {
      
      		// copy and resize part of an image with resampling
      		imagecopyresampled( $canvas, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height );
      
      	}
      
      	if ($filters != "") {
      		// apply filters to image
      		$filterList = explode("|", $filters);
      		foreach($filterList as $fl) {
      			$filterSettings = explode(",", $fl);
      			if(isset($imageFilters[$filterSettings[0]])) {
      
      				for($i = 0; $i < 4; $i ++) {
      					if(!isset($filterSettings[$i])) {
      						$filterSettings[$i] = null;
      					}
      				}
      
      				switch($imageFilters[$filterSettings[0]][1]) {
      
      					case 1:
      
      						imagefilter($canvas, $imageFilters[$filterSettings[0]][0], $filterSettings[1]);
      						break;
      
      					case 2:
      
      						imagefilter($canvas, $imageFilters[$filterSettings[0]][0], $filterSettings[1], $filterSettings[2]);
      						break;
      
      					case 3:
      
      						imagefilter($canvas, $imageFilters[$filterSettings[0]][0], $filterSettings[1], $filterSettings[2], $filterSettings[3]);
      						break;
      
      					default:
      
      						imagefilter($canvas, $imageFilters[$filterSettings[0]][0]);
      						break;
      
      				}
      			}
      		}
      	}
      
      	// output image to browser based on mime type
      	show_image($mime_type, $canvas, $cache_dir);
      
      	// remove image from memory
      	imagedestroy($canvas);
      
      } else {
      
      	if(strlen($src)) {
      		displayError("image " . $src . " not found");
      	} else {
      		displayError("no source specified");
      	}
      
      }
      
      /**
       *
       */
      function show_image($mime_type, $image_resized, $cache_dir) {
      
      	global $quality;
      
      	// check to see if we can write to the cache directory
      	$is_writable = 0;
      	$cache_file_name = $cache_dir . '/' . get_cache_file();
      
      	if(touch($cache_file_name)) {
      
      		// give 666 permissions so that the developer
      		// can overwrite web server user
      		chmod($cache_file_name, 0666);
      		$is_writable = 1;
      
      	} else {
      
      		$cache_file_name = NULL;
      		header('Content-type: ' . $mime_type);
      
      	}
      
      	$quality = floor($quality * 0.09);
      
      	imagepng($image_resized, $cache_file_name, $quality);
      
      	if($is_writable) {
      		show_cache_file($cache_dir, $mime_type);
      	}
      
      	imagedestroy($image_resized);
      
      	displayError("error showing image");
      
      }
      
      /**
       *
       */
      function get_request( $property, $default = 0 ) {
      
      	if( isset($_REQUEST[$property]) ) {
      
      		return $_REQUEST[$property];
      
      	} else {
      
      		return $default;
      
      	}
      
      }
      
      /**
       *
       */
      function open_image($mime_type, $src) {
      
      	if(stristr($mime_type, 'gif')) {
      
      		$image = imagecreatefromgif($src);
      
      	} elseif(stristr($mime_type, 'jpeg')) {
      
      		@ini_set('gd.jpeg_ignore_warning', 1);
      		$image = imagecreatefromjpeg($src);
      
      	} elseif( stristr($mime_type, 'png')) {
      
      		$image = imagecreatefrompng($src);
      
      	}
      
      	return $image;
      
      }
      
      /**
       * clean out old files from the cache
       * you can change the number of files to store and to delete per loop in the defines at the top of the code
       */
      function cleanCache() {
      
      	$files = glob("cache/*", GLOB_BRACE);
      
      	$yesterday = time() - (24 * 60 * 60);
      
      	if (count($files) > 0) {
      
      		usort($files, "filemtime_compare");
      		$i = 0;
      
      		if (count($files) > CACHE_SIZE) {
      
      			foreach ($files as $file) {
      
      				$i ++;
      
      				if ($i >= CACHE_CLEAR) {
      					return;
      				}
      
      				if (filemtime($file) > $yesterday) {
      					return;
      				}
      
      				unlink($file);
      
      			}
      
      		}
      
      	}
      
      }
      
      /**
       * compare the file time of two files
       */
      function filemtime_compare($a, $b) {
      
      	return filemtime($a) - filemtime($b);
      
      }
      
      /**
       * determine the file mime type
       */
      function mime_type($file) {
      
      	if (stristr(PHP_OS, 'WIN')) {
      		$os = 'WIN';
      	} else {
      		$os = PHP_OS;
      	}
      
      	$mime_type = '';
      
      	if (function_exists('mime_content_type')) {
      		$mime_type = mime_content_type($file);
      	}
      
      	// use PECL fileinfo to determine mime type
      	if (!valid_src_mime_type($mime_type)) {
      		if (function_exists('finfo_open')) {
      			$finfo = finfo_open(FILEINFO_MIME);
      			$mime_type = finfo_file($finfo, $file);
      			finfo_close($finfo);
      		}
      	}
      
      	// try to determine mime type by using unix file command
      	// this should not be executed on windows
          if (!valid_src_mime_type($mime_type) && $os != "WIN") {
      		if (preg_match("/FREEBSD|LINUX/", $os)) {
      			$mime_type = trim(@shell_exec('file -bi "' . $file . '"'));
      		}
      	}
      
      	// use file's extension to determine mime type
      	if (!valid_src_mime_type($mime_type)) {
      
      		// set defaults
      		$mime_type = 'image/png';
      		// file details
      		$fileDetails = pathinfo($file);
      		$ext = strtolower($fileDetails["extension"]);
      		// mime types
      		$types = array(
       			'jpg'  => 'image/jpeg',
       			'jpeg' => 'image/jpeg',
       			'png'  => 'image/png',
       			'gif'  => 'image/gif'
       		);
      
      		if (strlen($ext) && strlen($types[$ext])) {
      			$mime_type = $types[$ext];
      		}
      
      	}
      
      	return $mime_type;
      
      }
      
      /**
       *
       */
      function valid_src_mime_type($mime_type) {
      
      	if (preg_match("/jpg|jpeg|gif|png/i", $mime_type)) {
      		return true;
      	}
      
      	return false;
      
      }
      
      /**
       *
       */
      function check_cache($cache_dir, $mime_type) {
      
      	// make sure cache dir exists
      	if (!file_exists($cache_dir)) {
      		// give 777 permissions so that developer can overwrite
      		// files created by web server user
      		mkdir($cache_dir);
      		chmod($cache_dir, 0777);
      	}
      
      	show_cache_file($cache_dir, $mime_type);
      
      }
      
      /**
       *
       */
      function show_cache_file($cache_dir) {
      
      	$cache_file = $cache_dir . '/' . get_cache_file();
      
      	if (file_exists($cache_file)) {
      
      		$gmdate_mod = gmdate("D, d M Y H:i:s", filemtime($cache_file));
      
      		if(! strstr($gmdate_mod, "GMT")) {
      			$gmdate_mod .= " GMT";
      		}
      
      		if (isset($_SERVER["HTTP_IF_MODIFIED_SINCE"])) {
      
      			// check for updates
      			$if_modified_since = preg_replace("/;.*$/", "", $_SERVER["HTTP_IF_MODIFIED_SINCE"]);
      
      			if ($if_modified_since == $gmdate_mod) {
      				header("HTTP/1.1 304 Not Modified");
      				exit;
      			}
      
      		}
      
      		$fileSize = filesize($cache_file);
      
      		// send headers then display image
      		header("Content-Type: image/png");
      		header("Accept-Ranges: bytes");
      		header("Last-Modified: " . $gmdate_mod);
      		header("Content-Length: " . $fileSize);
      		header("Cache-Control: max-age=9999, must-revalidate");
      		header("Expires: " . $gmdate_mod);
      
      		readfile($cache_file);
      
      		exit;
      
      	}
      
      }
      
      /**
       *
       */
      function get_cache_file() {
      
      	global $lastModified;
      	static $cache_file;
      
      	if(!$cache_file) {
      		$cachename = $_SERVER['QUERY_STRING'] . VERSION . $lastModified;
      		$cache_file = md5($cachename) . '.png';
      	}
      
      	return $cache_file;
      
      }
      
      /**
       * check to if the url is valid or not
       */
      function valid_extension ($ext) {
      
      	if (preg_match("/jpg|jpeg|png|gif/i", $ext)) {
      		return TRUE;
      	} else {
      		return FALSE;
      	}
      
      }
      
      /**
       * tidy up the image source url
       */
      function cleanSource($src) {
      
      	// remove slash from start of string
      	if(strpos($src, "/") == 0) {
      		$src = substr($src, -(strlen($src) - 1));
      	}
      
      	// remove http/ https/ ftp
      	$src = preg_replace("/^((ht|f)tp(s|):\/\/)/i", "", $src);
      	// remove domain name from the source url
      	$host = $_SERVER["HTTP_HOST"];
      	$src = str_replace($host, "", $src);
      	$host = str_replace("www.", "", $host);
      	$src = str_replace($host, "", $src);
      
      	// don't allow users the ability to use '../'
      	// in order to gain access to files below document root
      
      	// src should be specified relative to document root like:
      	// src=images/img.jpg or src=/images/img.jpg
      	// not like:
      	// src=../images/img.jpg
      	$src = preg_replace("/\.\.+\//", "", $src);
      
      	// get path to image on file system
      	$src = get_document_root($src) . '/' . $src;	
      
      	return $src;
      
      }
      
      /**
       *
       */
      
      function get_document_root ($src) {
      
      	// check for unix servers
      	if(@file_exists($_SERVER['DOCUMENT_ROOT'] . '/' . $src)) {
      		return $_SERVER['DOCUMENT_ROOT'];
      	}
      
      	// check from script filename (to get all directories to timthumb location)
      	$parts = array_diff(explode('/', $_SERVER['SCRIPT_FILENAME']), explode('/', $_SERVER['DOCUMENT_ROOT']));
      	$path = $_SERVER['DOCUMENT_ROOT'] . '/';
      	foreach ($parts as $part) {
      		$path .= $part . '/';
      		if (file_exists($path . $src)) {
      			return $path;
      		}
      	}	
      
      	// the relative paths below are useful if timthumb is moved outside of document root
      	// specifically if installed in wordpress themes like mimbo pro:
      	// /wp-content/themes/mimbopro/scripts/timthumb.php
      	$paths = array(
      		".",
      		"..",
      		"../..",
      		"../../..",
      		"../../../..",
      		"../../../../.."
      	);
      
      	foreach($paths as $path) {
      		if(@file_exists($path . '/' . $src)) {
      			return $path;
      		}
      	}
      
      	// special check for microsoft servers
      	if(!isset($_SERVER['DOCUMENT_ROOT'])) {
          	$path = str_replace("/", "\\", $_SERVER['ORIG_PATH_INFO']);
          	$path = str_replace($path, "", $_SERVER['SCRIPT_FILENAME']);
      
          	if( @file_exists( $path . '/' . $src ) ) {
          		return $path;
          	}
      	}	
      
      	displayError('file not found ' . $src);
      
      }
      
      /**
       * generic error message
       */
      function displayError($errorString = '') {
      
      	header('HTTP/1.1 400 Bad Request');
      	die($errorString);
      
      }
      ?></code>
    Iniciador del debate juanmiwordpress

    (@juanmiwordpress)

    Hola a todos, ya lo he resuelto. os cuento la forma.

    He ido metiendo en un array los IDs de las noticias que voy sacando en portada:

    Aquí añado el ID de la noticia en cabecera

    <?php while ($lead_query->have_posts()) : $lead_query->the_post();
          $post_en_portada[] = (get_the_ID());
    ...
    ...

    Aquí saco las noticias que tengo en destacadas menos la que esté en cabecera y además agrego al array las que saco en destacadas, total tendrá 6 noticias:

    $featured_query = new WP_Query(array ('showposts' => prinz_get_option('prinz_featurednumber'), 'cat' => get_cat_id(prinz_get_option('prinz_featured')), 'post__not_in' => $post_en_portada ) );?>
        while ($featured_query->have_posts()) : $featured_query->the_post();
        $post_en_portada[] = (get_the_ID());

    Y ya por último saco las primeras noticias que no estén en portada de cada una de las categorias que quiero sacar, nacionales, internacionales, ….

    <?php $homecats_query = new WP_Query(array ('showposts' => prinz_get_option('prinz_homecatsnumber'), 'cat' => current($display_categories), 'post__not_in' => $post_en_portada ) ); ?>

    Saludos y muchas gracias 😉

    • webmasterobservatoriobioetica

      (@webmasterobservatoriobioetica)


      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-110728

      CATEGORY__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

    Iniciador del debate drac022

    (@drac022)

    Resuelto a medias: El crear $editorial era para poder cambiar la categoría del loop siempre que quisiera desde las opciones del tema. Lo he cambiado por la manera normal para cargar loop de una categoría

    <?php $my_query = new WP_Query(‘category_name=editorial&showposts=2’); ?>

    y cambiando como dijiste WP_Query en vez de query_posts.

    Aún no entiendo muy bien donde estaba el problema pero he salido del paso, que también me sirve así.

    Muchas gracias por la ayuda igmoweb

    • hola, me llamo Daniel P Z, quisiera agredecer a cualquier persona que se tome el tiempo de leer mi post y poder ayudarme en él;

      Tengo un problema, declarando un Class, en el Div del comienzo de un post, dentro del loop, (wuau si lee este último enunciado alguien que no sepa wordpress se pierde al instante)
      Bueno sigue, les explico,

      En mi archivo index.php, mi loop para generar los post es el siguiente;

      <?php $recent = new WP_Query("cat=58&showposts=4"); while($recent->have_posts()) : $recent->the_post();?>
      <div class="wrapper p1">
      <figure class="img-indent4"><?php the_post_thumbnail('medium'); ?></figure>
      <div class="extra-wrap">
      <div class="date">
      <?php the_time(get_option('date_format')); ?>
      </div>
      " href="<?php the_permalink() ?>"><?php the_title(); ?>.
      </div>
      </div>
      <?php endwhile;?>

      El problema es el siguiente,, ; quisiera cambiarle el class cuando me muestre el post numero 4, y como mis conocimientos limitados de wordpress aun no me permiten, me descargue un pack de más de 400 plantillas de wordpress y en los ejemplos que pude sacar pude sacar un code para transformarlo de esta forma;

      <?php $recent = new WP_Query("cat=58&showposts=4"); while($recent->have_posts()) : $recent->the_post();?>
      <?php $count = 0; ?>
      <div class="wrapper p1">
      <figure class="img-indent4"><?php the_post_thumbnail('medium'); ?></figure>
      <div class="extra-wrap">
      <div class="date">
      <?php the_time(get_option('date_format')); ?>
      </div>
      " href="<?php the_permalink() ?>"><?php the_title(); ?>.
      </div>
      </div>
      <?php if (++$counter % 3 == 0) { echo "<div class='wrapper prev-indent-bot'><figure class='img-indent4'>the_post_thumbnail('medium');</figure><div class='extra-wrap'><div class='date'>October 28th, 2010</div>Set dolor ser adipiscing elit sed diam nonummy.</div></div>"; }?>
      <?php endwhile;?>

      Lo que se tendria que cambiar en el cuarto post es de;

      <div class="wrapper p1">

      a

      <div class='wrapper prev-indent-bot'>

      Como podria lograr eso?

    Hola Daninah!

    Este tema no tiene soporte para cabezote de imagen, sin embargo, te ayudare a poner uno usando código:
    En el panel de admin de wordpress ve a: apariencia > editor, verifica que tienes Runo Lite activado y elije en la parte derecha: Cabecera (header.php) y reemplaza el código por este:

    <?php
    /**
     * The Header for our theme.
     *
     * Displays all of the <head> section and everything up till <div id="primary">
     *
     */
    ?><!DOCTYPE html>
    
    <!--[if IE 6]>
    <html id="ie6" class="ie-oldie" <?php language_attributes(); ?>>
    <![endif]-->
    <!--[if IE 7]>
    <html id="ie7" class="ie-oldie" <?php language_attributes(); ?>>
    <![endif]-->
    <!--[if IE 8]>
    <html id="ie8" class="ie-oldie" <?php language_attributes(); ?>>
    <![endif]-->
    <!--[if !(IE 6) | !(IE 7) | !(IE 8)  ]><!-->
    <html <?php language_attributes(); ?>>
    <!--<![endif]-->
    
    <head>
    <meta charset="<?php bloginfo( 'charset' ); ?>" />
    <meta name="viewport" content="width=device-width" />
    
    <title><?php
    	/*
    	 * Print the <title> tag based on what is being viewed.
    	 */
    	global $page, $paged;
    
    	wp_title( '|', true, 'right' );
    
    	// Add the blog name.
    	bloginfo( 'name' );
    
    	// Add the blog description for the home/front page.
    	$site_description = get_bloginfo( 'description', 'display' );
    	if ( $site_description && ( is_home() || is_front_page() ) )
    		echo " | $site_description";
    
    	// Add a page number if necessary:
    	if ( $paged >= 2 || $page >= 2 )
    		echo ' | ' . sprintf( __( 'Page %s', 'runo' ), max( $paged, $page ) );
    
    	?></title>
    <link rel="profile" href="http://gmpg.org/xfn/11" />
    <link rel="stylesheet" type="text/css" media="all" href="<?php echo get_stylesheet_uri(); ?>" />
    <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
    <!--[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="container" class="runo-background">
    	 <header id="main-header" class="runo-background">
    
    	 	<div id="header-wrapper">
    
    		<hgroup>
    
    <a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home">
    					<img src="<?php echo get_template_directory_uri(); ?>/img/cabezote.gif" width="709" height="236" alt="">
    				</a>
    
    				<h2 id="site-description"><?php bloginfo( 'description' ); ?></h2>
    		</hgroup>
    
    		<nav id="main-nav" role="navigation">
    
    				<h3 class="assistive-text"><?php _e( 'Main menu', 'runo' ); ?></h3>
    				<?php /* Allow screen readers / text browsers to skip the navigation menu and get right to the good stuff. */ ?>
    				<div class="skip-link"><a class="assistive-text" href="#content" title="<?php esc_attr_e( 'Skip to primary content', 'runo' ); ?>"><?php _e( 'Skip to primary content', 'runo' ); ?></a></div>
    				<div class="skip-link"><a class="assistive-text" href="#sidebar" title="<?php esc_attr_e( 'Skip to secondary content', 'runo' ); ?>"><?php _e( 'Skip to secondary content', 'runo' ); ?></a></div>
    				<?php /* Our navigation menu. If one isn't filled out, wp_nav_menu falls back to wp_page_menu. The menu assigned to the primary location is the one used. If one isn't assigned, the menu with the lowest ID is used. */ ?>
    				<?php wp_nav_menu( array( 'items_wrap' => '<div class="menu"><ul>  %3$s </ul></div>', 'theme_location' => 'primary', 'container' => false) ); ?>
    
    		</nav><!-- #main-nav -->
    
    		</div>
    
    	</header>
    
    	<div id="primary">

    Recuerda Guardar dando clic en Actualizar Archivo.

    Luego sube tu cabezote o logo formato gif a la carpeta: /wp-content/themes/runo-lite/img/ con el nombre cebezote.gif

    Si todo sale bien aparecerá tu cabezote en la pagina.

    Saludos!

    Iniciador del debate Steeep

    (@steeep)

    Les dejo también los códigos de los archivos index.php , home.php, page.php que al parecer son estos donde se mostrarían las entradas.

    index.php

    <?php get_header(); ?>
    
    <?php if (is_archive()) $post_number = get_option('elegantestate_archivenum_posts');
    if (is_search()) $post_number = get_option('elegantestate_searchnum_posts');
    if (is_tag()) $post_number = get_option('elegantestate_tagnum_posts');
    if (is_category()) $post_number = get_option('elegantestate_catnum_posts'); ?>
    
    <div id="content-top">
    	<div id="menu-bg"></div>
    	<div id="top-index-overlay"></div>
    
    	<div id="content" class="clearfix">
    		<div id="main-area">
    			<?php $i = 1; ?>
    			<?php global $query_string;
    			if (is_category()) query_posts($query_string . "&showposts=$post_number&paged=$paged&cat=$cat");
    			else query_posts($query_string . "&showposts=$post_number&paged=$paged"); ?>
    			<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    				<?php include(TEMPLATEPATH . '/includes/entry.php'); ?>
    				<?php $i++; ?>
    			<?php endwhile; ?>
    				<div class="clear"></div>
    				<?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); }
    				else { ?>
    					 <?php include(TEMPLATEPATH . '/includes/navigation.php'); ?>
    				<?php } ?>
    
    			<?php else : ?>
    				<?php include(TEMPLATEPATH . '/includes/no-results.php'); ?>
    			<?php endif; wp_reset_query(); ?>
    
    		</div> <!-- end #main-area-->	
    
    		<?php get_sidebar(); ?>
    
    	<?php get_footer(); ?>

    home.php

    <?php get_header(); ?>
    
    	<?php include(TEMPLATEPATH . '/includes/featured.php'); ?>
    	<div id="content-top">
    		<div id="content" class="clearfix">
    			<div id="main-area">
    				<?php $i = 1; ?>
    				<?php
    				$args=array(
    				   'showposts'=>get_option('elegantestate_homepage_posts'),
    				   'paged'=>$paged,
    				   'category__not_in' => get_option('elegantestate_exlcats_recent'),
    				);
    				if (get_option('elegantestate_duplicate') == 'false')
    					$args['post__not_in']= $ids;
    				query_posts($args); ?>
    				<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    					<?php include(TEMPLATEPATH . '/includes/entry.php'); ?>
    					<?php $i++; ?>
    				<?php endwhile; ?>
    					<div class="clear"></div>
    					<?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); }
    					else { ?>
    						 <?php include(TEMPLATEPATH . '/includes/navigation.php'); ?>
    					<?php } ?>
    
    				<?php else : ?>
    					<?php include(TEMPLATEPATH . '/includes/no-results.php'); ?>
    				<?php endif; wp_reset_query(); ?>
    
    			</div> <!-- end #main-area-->	
    
    			<?php get_sidebar(); ?>
    
    		<?php get_footer(); ?>

    page.php

    <?php the_post(); ?>
    <?php get_header(); ?>
    
    	<div id="content-top">
    		<div id="menu-bg"></div>
    		<div id="top-index-overlay"></div>
    
    		<div id="content" class="clearfix">
    			<div id="main-area">
    				<?php include(TEMPLATEPATH . '/includes/breadcrumbs.php'); ?>
    
    				<div class="full_entry clearfix">
    					<?php if (get_option('elegantestate_integration_single_top') <> '' && get_option('elegantestate_integrate_singletop_enable') == 'on') echo(get_option('elegantestate_integration_single_top')); ?>	
    
    					<div class="entry_content<?php if ($thumb <> '' && get_option('elegantestate_thumbnails_index') == 'on') echo(' setwidth') ?>">
    						<?php $width = 159;
    							  $height = 159;
    							  $classtext = '';
    							  $titletext = get_the_title();
    
    							  $thumbnail = get_thumbnail($width,$height,$classtext,$titletext,$titletext);
    							  $thumb = $thumbnail["thumb"]; ?>
    
    						<?php if($thumb <> '' && get_option('elegantestate_page_thumbnails') == 'on') { ?>
    							<div class="small-thumb">
    								<?php print_thumbnail($thumb, $thumbnail["use_timthumb"], $titletext , $width, $height, $classtext); ?>
    								<span class="overlay"></span>
    							</div> 	<!-- end .small-thumb -->
    						<?php }; ?>
    
    						<h1 class="single-title"><?php the_title(); ?></h1>
    						<?php the_content(); ?>
    						<?php wp_link_pages(array('before' => '<p><strong>'.__('Pages','ElegantEstate').':</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
    						<?php edit_post_link(__('Edit this page','ElegantEstate')); ?>
    					</div> <!-- end .entry_content -->
    
    				</div> <!-- .full_entry -->
    
    				<?php if (get_option('elegantestate_show_pagescomments') == 'on') comments_template('', true); ?>
    
    			</div> <!-- end #main-area -->
    
    			<?php get_sidebar(); ?>
    
    <?php get_footer(); ?>

Viendo 15 resultados - del 196 al 210 (de un total de 226)