Risposte nei forum create
-
AutorePost
-
Alt Design Web AgencyPartecipante
Prova a leggere qua:
Alt Design Web AgencyPartecipante$tipo_post = get_post_meta($post->ID, ‘tipopost’, true);
Leggi il valore di $tipo_post e fai qualcosa di conseguenza.
Tipo:
if ($tipo_post == ‘valoreA’ ) {
get_template_part(‘single’, ‘a’); // Carica single-a.php
} else if ($tipo_post == ‘valoreB’){
get_template_part(‘single’, ‘b’); // Carica single-b.php
} else{
get_template_part(‘single’, ‘c’); // Carica single-c.php
}
Alt Design Web AgencyPartecipanteE’ un problema noto. Non si riescono a mettere “box” sopra i Flash (se non con tecniche avanzate “da programmatori”).
Cerca un’alternativa al menù a tendina oppure sposta il Flash più sotto.
Tra l’altro, con Firefox vedo correttamente le tendine sopra ai Flash di pubblicità che hai… quindi potrebbe essere un problema che si presenta solo nei browser più vecchi (es. Internet Explorer).
Alt Design Web AgencyPartecipanteVedo che usi parecchi plugin che inseriscono codice javascript. E supppongo quindi tu non abbia le competenze tecniche per “smanettare” nel codice.
In caso mi sbagliassi, prova a minificare (tramite questo tool http://refresh-sf.com/yui/ ad esempio) i vari javascript (e i css volendo) e ad inserirli in coda alle pagine (prima di </body>) e non nella sezione head.
Poi controlla di aver veramente bisogno dei vari javascript che carichi e in caso rimuovi la loro inclusione direttamente dal codice php.
9 Marzo 2012 alle 15:41 in risposta a: Come evidenziare uno dei link di un menu quando ci si trova in quella det. pag? #94252Alt Design Web AgencyPartecipanteUsi i menù di WordPress (Aspetto -> Menù) o scrivi a mano il menù nei template del tema?
Se usi quelli di WordPress… viene sempre aggiunta una classe css che identifica il menù corrente.
Possibili valori per la pagina corrente sono:
current-menu-item current_page_item
quindi puoi aggiungere nel css qualcosa del genere:
.classe-del-tuo-menu .current-menu-item a{ color: #000: text-decoration:none }
per, a titolo di esempio, fare il link nero e non sottolineato se è la pagina corrente.
Alt Design Web AgencyPartecipanteCiao,
se non dà l’opzione (succede quasi sempre) scrivi a mano nel tuo wp-config.php, sostituendo
define( ‘SUBDOMAIN_INSTALL’, true );
con
define( ‘SUBDOMAIN_INSTALL’, false );
che di fatto attiva l’installazione di blog “a cartelle”.
Ricordati a questo punto di ricaricare la pagina Configurazioni Network e di aggiornare il tuo .htaccess
Alt Design Web AgencyPartecipanteWordPress può essere installato in una directory a se stante, tipo la tua wordpress… ma essere visualizzato comunque nella root del sito.
Ecco come procedere:
– (tramite FTP) copia il file index.php che si trova dentro la cartella wordpress nella root del dominio (di solito la cartella htdocs o una cartella con il nome del dominio, in base all’hosting)
– modifica il file sostituendo require(‘./wp-blog-header.php’); con require(‘./wordpress/wp-blog-header.php’);
– ora dall’admin di WordPress->su Impostazioni->Generale modifica la proprietà con l’indirizzo del sito in miosito.it, mentre lasci miosito.it/wordpress in quella che indica il path di installazione di WordPress
Alt Design Web AgencyPartecipanteNon inserisce correttamente il codice HTML, la parte corretta di codice (in arancione) qui sopra è questa:
< li >< a >” title=”<?php the_title_attribute(); ?>”><?php the_title(); ?></ a ></ li >
togliete gli spazi nei tag: a, li
Alt Design Web AgencyPartecipante1) Crea un template apposito per quella pagina oppure copia il file page.php e rinomina il nuovo file in page-SLUGDELLATUAPAGINA.php
2) Inserisci il seguente codice nella zona che ti interessa. Dopo la chiamata a the_content() dovrebbe andare bene. Questo crea una lista degli articoli (titolo cliccabile).
<h3>News</h3>
<?php $my_query = new WP_Query(array(‘category_name’=>’news’,’showposts’=>5)); ?>
<?php if ($my_query->have_posts()){ ?>
-
<?php while ($my_query->have_posts()) : $my_query->the_post(); ?>
- ‘ title='<?php the_title_attribute(); ?>’><?php the_title(); ?>
<?php endwhile; ?>
<?php } ?>
3) Modifica l’attributo category_name con lo slug della tua categoria (qui ho ipotizzato “news”), mentre showpost indica quanti articoli vengono visualizzati.
4) Se vuoi aggiungere anche il testo del riassunto o l’intero articolo devi chiamare anche the_excerpt o the_content e modificare leggermente l’html
Ciao!
Alt Design Web AgencyPartecipantePuoi usare la stessa procedura indicata qui:
http://www.wpitaly.it/forum/topic.php?id=26223
Invece di sostituire http://localhost andrai a sostituire l’indirizzo del vecchio dominio con quello nuovo.
-
AutorePost