Risposte nei forum create
-
AutorePost
-
ewpPartecipante
ok. quindi come faccio?
modifico il mio codice css
ul .category, dl .category, ul.category li {
background-image: url(../images/icon_category.gif);
}
aggiungendo le voci
.Categ
.Categ h3
.Categ ul
.Categ li
oppure
lascio il css cosଠe modifico il php? in questo caso: qual è il codice corretto?
che file php modifico? index.php?
il risultato che voglio ottenere è come il tema WP di default.
GRAZIE
ewpPartecipanteall’interno del css l’unica cosa che riguarda le categorie è:
ul .category, dl .category, ul.category li {
background-image: url(../images/icon_category.gif);
}
come procedo? creo le voci:
.Categ
.Categ h3
.Categ ul
.Categ li
e poi le edito con le caratteristiche che voglio?
pensavo che la gestione a comparsa delle sottocategorie fosse gestita attraverso una funzione php. o sbaglio?
grazie!
ewpPartecipanteforse questo può esserti comodo:
http://drivebyshooter.net/2007/03/05/scheduling-posts-in-wordpress/
e.
ewpPartecipantea questo punto la mia sidebar.php diventa cosà¬:
</div><!– End of #content –>
<div id=”sidebar”>
<div id=”sidebar1″>
<div class=”sb1″>
<?php if ( !function_exists(‘dynamic_sidebar’)
|| !dynamic_sidebar() ) : ?>
</div>
</div><!– End of #sidebar1 –>
<div id=”sidebar2″>
<div class=”sb2″>
</div>
</div><!– End of #sidebar2 –>
</div><!– End of #sidebar –>
giusto?? solo che nel pannello widget è presente solo una sidebar (quando invece dovrebbero essercene 2) e ancora non si visualizza il contenuto della sidebar stessa…
ewpPartecipantenel file functions.php ho cancellato il codice relativo ai get recent comments (il plugin lo conoscevo già , cmq grazie per il consiglio) e l’ho sostituito con :
<?php
if ( function_exists(‘register_sidebar’) )
register_sidebar();
?>
si è attivato il pannello delle widget. ora però devo inserire il codice nella sidebar per richiamarne la funzione:
<?php if ( !function_exists(‘dynamic_sidebar’)
|| !dynamic_sidebar() ) : ?>
non ho idea di dove incollarlo all’interno del file sidebar.php
[il codice della sidebar l’ho già inserito un paio di post sopra]
GRAZIE MILLE!!
ewpPartecipanteil file funciotnS.php esiste già … e come ho detto sopra gestisce i commenti recenti con gravatar… se inserisco il codice in questo file si sballa tutto!!
il file functions.php si presenta cosà¬:
<?php
// Recent Comments with Gravatars
function recent_cmts($num) {
global $wpdb;
$query = (“SELECT ID, post_title, comment_author, comment_id, comment_author_email, comment_date, comment_post_ID FROM $wpdb->posts, $wpdb->comments WHERE $wpdb->posts.ID=$wpdb->comments.comment_post_ID AND $wpdb->comments.comment_approved = ‘1’ AND $wpdb->comments.comment_type = ” AND comment_author != ” ORDER BY $wpdb->comments.comment_date DESC LIMIT $num”);
$result = mysql_query($query);
while ($data = mysql_fetch_row($result)) {
echo ‘<li class=”recent-cmts”>’;
echo ‘<img style=”float: left; margin-right: 10px; padding: 3px; background: #0b245b; border: 1px solid #051236;” src=”http://www.gravatar.com/avatar.php?gravatar_id=’;
echo md5($data[4]);
echo ‘&size=24&default=’;
echo bloginfo(‘template_url’);
echo ‘/images/default_24.gif’;
echo ‘” alt=”‘;
echo $data[2];
echo ‘'s Gravatar” height=”24″ width=”24″ class=”recent_gravatars” />’;
echo ‘<div style=”margin-left: 42px;”><a href=”‘;
echo get_permalink($data[0]);
echo “#comment-$data[3]”;
echo ‘” title=”‘;
echo ‘commented on » ‘;
echo $data[1];
echo ‘”>‘;
echo $data[2];
echo ‘<br/>’;
echo $data[5];
echo ‘</div>’;
echo ”;
}
}
?>
qualche consiglio su come gestirlo? grazie!!
ewpPartecipantepenso di aver fatto tutto correttamente. al tema non rinuncio… lo gestirò senza widget!
grazie lo stesso, sei sempre molto gentile!
ewpPartecipanteecco il link: http://www.etlab.it
ho provato ad aggiungere il codice alla fine ma ancora nulla… la sidebar scompare…. e nel pannello widget mi dice:
“No Sidebars Defined
You are seeing this message because the theme you are currently using isn’t widget-aware, meaning that it has no sidebars that you are able to change. For information on making your theme widget-aware, please follow these instructions.”
(rimandandomi a http://automattic.com/code/widgets/themes/)
… da notare la frase di errore in fondo pagina:
“Parse error: syntax error, unexpected $end in /home/mhd-01/www.etlab.it/htdocs/wp-content/themes/dark/sidebar.php on line 56”
però la linea 56 è: “</div><!– End of #sidebar –><!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN” “http://www.w3.org/TR/html4/loose.dtd”>”
ewpPartecipanteesiste già un file “functions.php” che gestisce i commenti recenti con gravatar.
ho creato un altro file “function.php” contenente solo il codice da te scritto (se cercavo di inserirlo nel file “functions.php” già esistente mi si sballava tutto).
ora dovrei inserire
<?php if ( !function_exists(‘dynamic_sidebar’)
|| !dynamic_sidebar() ) : ?>
nella sidebar.
il file “sidebar.php” contiene 2 sidebar e si presenta cosà¬:
</div><!– End of #content –>
<div id=”sidebar”>
<div id=”sidebar1″>
<div class=”sb1″>
<?php if ( !function_exists(‘dynamic_sidebar’)
|| !dynamic_sidebar() ) : ?>
<h2><?php _e(‘RSS Feeds’); ?></h2>
<div class=”rssfeeds”>
/images/rss_badge.gif” alt=”RSS” />
<p class=”rss-entries”>” title=”Entries RSS 2.0″><?php _e(“Entries”); ?><br/><?php _e(‘RSS 2.0’); ?></p>
<p class=”rss-comments”>” title=”Comments RSS 2.0″><?php _e(“Comments”); ?><br/><?php _e(‘RSS 2.0’); ?></p>
</div>
<h2>Recent Comments</h2>
<div class=”recent-cmts”>
<ul id=”recent-cmts”><?php recent_cmts(’10’); ?>
</div>
</div>
</div><!– End of #sidebar1 –>
<div id=”sidebar2″>
<div class=”sb2″>
<!– Archives –>
<li id=”sb-archives”>
<h2><?php _e(‘Archives’); ?></h2>
-
<?php wp_get_archives(‘limit=’); ?>
<!– Categories –>
<li id=”sb-cates”>
<h2><?php _e(‘Categories’); ?></h2>
-
<?php wp_list_cats(‘hide_empty=1&hierarchical=1’); //wp_dropdown_categories(); ?>
<!– Misc –>
<li id=”sb-misc”>
<h2><?php _e(‘Misc’); ?></h2>
-
<?php wp_register(); ?>
- <?php wp_loginout(); ?>
<?php wp_meta(); ?>
</div>
</div><!– End of #sidebar2 –>
</div><!– End of #sidebar –>
ho provato a inserirlo ovunque ma ogni volta mi sparisce la sidebar…
aiuto e grazie
ewpPartecipanteci sono riuscita! grazie comunque!
-
AutorePost