problema con template
-
Salve chiedo a qualcuno se può aiutarmi a risolvere questo problema.ho creato una tassonomia denominata pornostar.in seguito ho creato il template apposisto denominato template pornostar.Ora accade questo quando apro la pagina pornostar mi appare la lista in verticale non incolonnata,e quando clicco su una pornostar va bene si apre la pagina contenente tutti i video da essa pubblicata. il codice usato è questo:
<?php
/*
Template Name: Pornstars List
*/
?>
<?php get_header(); ?><?php
$categories = array();
$list = ”;
$terms = get_terms(‘pornostar’, $args);
$tags = get_terms( ‘pornostar’ );
$count = count($terms);
$groups = array();if( $tags && is_array( $tags ) ) {
foreach( $tags as $tag ) {
$first_letter = strtoupper( $tag->name[0] );
$groups[ $first_letter ][] = $tag;
}
if( !empty( $groups ) ) {
foreach( $groups as $letter => $tags ) {$tagsCount = $tags;
$i=0; $postCount = 0;
$list .= ‘<h2>’ . apply_filters( ‘the_title’, $letter ) . ‘</h2>’;
foreach( $tags as $tag ) {$i++;
$postCount++;if($i==1){$list .=’ <!–start row–><div class=’row’>’;}
$url = esc_attr( get_term_link( $tag ) );
$name = apply_filters( ‘the_title’, $tag->name );
$list .= ‘<div class=’wrap-grid’>’ . $name . ‘</div>’;
if($i==4 || $postCount == count($tagsCount)){$i=0;$list .='</div><!–/ row–>’;}}
}
}
} else $list .= ‘<p>Sorry, but no tags were found</p>’;echo $list;
?>
<?php get_sidebar(); ?>
<?php get_footer(); ?>Ora ho provato a far apparire anzichè il testo la prima immagine della pornostar con all’interno i video pubblicati ed appare solo che cliccandoci sopra non si apre nessuna pagina il codice è questo:
<?php
/**
* Template Name: Pornstars
*
* @package WordPress
* @subpackage Novavideo
* @since Novavideo 1.0
*/get_header(); ?>
<?php if(have_posts()) : ?><?php while(have_posts()) : the_post(); ?>
<h1 class=’border-radius-5′><?php the_title(); ?></h1>
<div id=’page’ class=’post-content’>
<?php the_content(); ?>
<?php
$terms = get_terms(‘pornostar’, $args);
$count = count($terms);
$categories = array();
$groups = array();
$tags = get_terms( ‘pornostar’, $args);if ($count > 0) {
echo ‘<ul class=’listing-cat’>’;
foreach ($terms as $term) {
$args = array(
‘post_type’ => ‘post’,
‘posts_per_page’ => 1,
‘show_count’ => 1,
‘orderby’ => ‘rand’,
‘post_status’ => ‘publish’,
‘topic_count_text_callback’ => ‘default_topic_count_text’,
‘link’ => ‘view’,
‘taxonomy’ => ‘pornostar’,
‘echo’ => true,
‘tax_query’ => array(
array(
‘taxonomy’ => ‘pornostar’,
‘field’ => ‘slug’,
‘terms’ => $term->slug
)
)
);$video_from_categorie = new WP_Query( $args );
if( $video_from_categorie->have_posts() ){
$video_from_categorie->the_post();
}else{}
$term->slug;
$term->name;?>
<li class=’border-radius-5 box-shadow’>
<?php echo novavideo_get_post_image();?>name) ); ?>’ title='<?php echo $term->name; ?>’><span><?php echo $term->name; ?></span>
<span class=’nb_cat border-radius-5′><?php echo $term->count; ?> <?php if ( $term->count > 1 ){
_e( ‘videos’, novavideo_get_theme_name() );
}else{
_e( ‘video’, novavideo_get_theme_name() );
} ?></span><?php
}
echo ”;
echo ‘<div class=’clear’></div>’;
}
?><?php endwhile; ?>
<?php endif; ?>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
il tema usato è novavideo dove sta l’errore?Ho bisogno d'aiuto per il blog (visibile solo agli utenti che hanno effettuato l'accesso).
-
Il blog che hai specificato come http://www.gelateriajohnny.com non sembra essere presente su WordPress.com.
Questo forum di aiuto è per blog ospitati su WordPress.com. Se la tua domanda riguarda un blog WordPress autonomo allora puoi trovare aiuto su WordPress.org forums.
Se non conosci la differenza tra WordPress.com e WordPress.org, potrai trovare questa informazione utile.
Se hai dimenticato di includere un collegamento al tuo blog, puoi fare una replica e includerlo sotto. Aiuterà le persone a rispondere alla tua domanda.
Questo è un messaggio automatico.
- L'argomento ‘problema con template’ è chiuso a nuove risposte.