Ver Mensaje Individual
  #1 (permalink)  
Antiguo 20/08/2009, 15:19
creear
 
Fecha de Ingreso: julio-2009
Mensajes: 110
Antigüedad: 15 años, 9 meses
Puntos: 2
php mostrando thumbbails en categorías wordpress

Queridos foreros, tengo que hacerle una modificación a la web (un wordpress theme), pero esto ya supera ampliamente mis escasos conocimientos.

La web en cuestión es esta:

multisourcing.com.ar/?cat=5


Lo que quiero hacer es:
  1. Los links esos negros de abajo, quisiera que no fuesen texto, sino thumbnails linkeando, como se hace?

Aquí les dejo los códigos usados.

SINGLE.PHP (Porque es un post)
Código PHP:
<?php get_header(); ?>

<div id="info">
     
    <div id="previews">    
    <?php
    
if (isset($p)) {
        
$s_h 1;
        
$s_cat get_the_category($post->ID);
        while (
$s_h <= 8) {
            
$img_num "imagen" $s_h;
            
$img_name get_post_meta($post->ID$img_numtrue);
            
$img_url "<a href='#'><img onclick='getElementById(&quot;img_re&quot;).src = this.src; getElementById(&quot;img_re&quot;).alt = this.alt; ocultar(" '"' "over_fp" '"' ");' src='wp-content/files_flutter/";
            
$img $img_url $img_name;                
            if (
$img != $img_url) echo $img "' alt='imagen" $s_h "' /></a>";    
            
$s_h++;            
        }
    }    
    
?>
    </div>
    
    <div id="fullpic">    
   <?php
    
if (isset($p)) {                     
        
$s_h 1;
        while (
$s_h == 1) {
            
$img_num "imagen" $s_h;            
            
$img_name get_post_meta($post->ID$img_numtrue);
            
$img_url "<img id='img_re' src='wp-content/files_flutter/";
            
$img $img_url $img_name;                
            if (
$img != $img_url) echo $img "' alt='imagen" $s_h "' />";    
            
$s_h++;            
        }        
    }
    
?>    
    <a href="#" onclick='ocultar("over_fp");'>
    <div id="over_fp" style="display:none;">    
    
    </div>    
    </a>    
    <?php
        
if (isset($s_cat)) {
            foreach (
$s_cat as $category) {
                if (
$category->slug == 'la-empresa' || $category->slug == 'servicios' || $category->slug == 'trabajos')    echo '<p class="description"><a href="#" onclick="mostrar(' "'" 'over_fp' "'" '); mostrar_texto();">Descripci&oacute;n</a></p>';
            }
        }
    
?>
    
    </div>
    
</div>

<?php 
    

    
if (isset($s_cat)) {            
        foreach (
$s_cat as $category) { 
            if (
$category->slug == 'servicios') { require_once('carrusel.php'); require_once ('indice.php'); }
            elseif (
$category->slug == 'la-empresa') require_once('sidebar.php'); 
            elseif (
$category->slug == 'trabajos') require_once('carruselT.php');    
        }     
    }


?>
<div style="height:20px; float:left; clear:both; width:100%"></div>
</div>
<?php get_footer(); ?>

CARRUSEL.PHP
Código PHP:
<div>    
<?php

    
if (isset($p)) {

        
$postcat get_the_category($p);
        
$s_cat 'category_name=' $postcat[0]->slug;




        foreach (
$s_todo_posts as $post) {
        }

    }

else {
        foreach((
get_the_category()) as $category) { 
            if (
$category->slug == 'servicios'$tmp_cat 'servicios';
            else 
$s_cat 'category_name=' $category->slug;
        } 
        if (
$s_cat == 'category_name=servicios'$tmp_cat 'servicios';
    
        if (
$tmp_cat == 'servicios') {
        
$s_todo_posts query_posts($s_cat);
            foreach (
$s_todo_posts as $post) {
                
$s_title get_the_title($post->ID);    
                
$s_link get_permalink($post->ID);
                echo 
'<a href="' $s_link '">' $s_title '</a>    -    ';
            }    
        }
    }
?>
</div>
Espero que algun guru del php pueda darme una mano porque estoy totalmente desconcertado.

saludos

Última edición por creear; 20/08/2009 a las 15:49