Risposte nei forum create
-
AutorePost
-
essezetaPartecipante
scusate, non voglio ingolfare il forum…
solo se qualcuno capita su questa discussioncina gli lascio un’utilissima risorsa da cui partire:
http://ottopress.com/2010/wordpress-3-0-theme-tip-the-comment-form/
ciauz
essezetaPartecipantee già …
siamo tornati al via… c’è da sudarci un pochino… non si finisce mai di studiare…
un saluto a tutti…
gnl
essezetaPartecipanteciao Steve…
in genere è lଅ
ma nei nuovi temi (e Coraline è un nuovo tema) non c’è…
come non c’è nemmeno in twentyten…
essezetaPartecipantein realtà prima intendevo scrivere cosଠ(ma il CODE di questo forum si mangia alcuni tag):
href="[?php the_permalink() ?]#pippo"
ho cercato in luno e in largo.... nisba...
comunque mi arrendo...
faccio prima a fare upgrade a WP3 e ad usare i menu personalizzbaili...
come non detto...
:p
essezetaPartecipanteho risolto…
scusate il falso allarme…
in pratica linkavo le librerie .js in modo da andare a riprenderle da una cartella nella root in cui erano condivise con altre pagine extra WP, cosà¬:
<script type="text/javascript" src="../stuff/js/prototype.js"></script>
<script type="text/javascript" src=".../stuff/js/effects.js"></script>
ecc.
invece che cosଠ(con le chiamate corrette di WP):
<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/stuff/js/prototype.js"></script>
<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/stuff/js/effects.js"></script>
ecc.
ora è tutto a posto, anche in mod_rewrite
essezetaPartecipantein risposta a elo-art:
vedo che sei un po’ a secco di nozioni… non te la prendere… lo sono stato anche io… studia un po’ e ti rifarai…
colonnacentro era solo un esempio…
il file .php che hai linkato non può aprirlo nessuno…
ad ogni modo per darti un consiglio operativo e semplice:
per il punto 5: io in precedenza ho già impostato una pagina statica come “homepage” nel mio sito. in questo caso questo punto dovrei non considerarlo?
dal momento che hai già impostato una home page puoi usare lo stesso metodo indicato a willywonka (proprio quello con la condizione is_home(), ma devi personalizzare path_del_tema con il percorso al tuo tema…
mmmh… forse è meglio se ti posto tutto…
apri header.php, cerca una riga più o meno cosà¬:
<link rel=”stylesheet” type=”text/css” href=”<?php bloginfo(‘stylesheet_url’); ?>” media=”screen,print” />
e sostituiscila con queste righe copiandole integralmente:
<?php
if (is_home()) {
echo"<link rel="stylesheet" type="text/css" href="http://www.eloelo.it/wp-content/themes/coronado/style_due.css" />";
} else {
echo"<link rel="stylesheet" type="text/css" href="http://www.eloelo.it/wp-content/themes/coronado/style.css" />";
}
?>
in questo modo in style_due.css puoi impostare l'aspetto della tua homepage...
ciao...
essezetaPartecipantein risposta a willywonka
se conosci già la pagina per cui vuoi impostare un css diverso fai cosଠ(che è poi il primo dei consigli dato da SteveAgl che parlava di condizionare…)
nel file header.php alla riga in cui viene incluso il css metti
<?php
if (is_home()) {
echo"<link rel="stylesheet" type="text/css" href="path_del_tema/special_style.css" />";
} else {
echo"<link rel="stylesheet" type="text/css" href="path_del_tema/normal_style.css" />";
}
?>
In partica cosଠtu imposti una condizione -che si tratti dell'home page- e allora in tal caso otterrai il css special_style.css in cui imposti le regole che ti pare... in tutti gli altri casi otterrai normal_style.css con gli styli normali...
Naturalmente se non ti trovi nell'home page ma in un'altra pagina devi cambiare la condizione (puoi anche im,postare l'ID di una singola pagina o di tutta una categoria, ecc.) e trovi tutti i rierimenti qui:
essezetaPartecipanteciao…
mi riallaccio a quanto ti avevo scritto in privato e lo rendo pubblico qui sul forum in modo che altri possa contribuire…
d’ora in poi continuiamo qui… e facciamo riferimento ai vari punti:
Dunque, per quello che chiedi io farei cosଠ(eviti i commenti condizionali e mantinei un unico file css):
1.
nella cartella del tema apri il file page.php e in cima a tutto il codice ci metti queste 5 righe
<?php
/*
Template Name: PAGINAPERSONALIZZATA
*/
?>
2.
Poi lo salvi con nome, ad es. paginapersonalizzata.php
3.
Da questo momento se crei una pagina statica (che intitolerai ad esempio “homepage”) tra gli attributi puoi scegliere il template e nel menu a discesa trovi TEMPLATE STANDARD e anche PAGINAPERSONALIZZATA…
4.
Tu scegli PAGINAPERSONALIZZATA…
5.
Poi setterai come pagina di apertura del tuo sito (ovvero in IMPOSTAZIONI / LETTURA / PAGINA INIZIALE ) la pagina “homepage” e scrivendo http://www.tuosito.com andrai a visitare automaticamente la pagina intitolata “homepage”…
6.
Quindi nel file “paginapersonalizzata.php” tu puoi reimpostare una struttura e delle classi ai vari elementi del markup e nel css ti personalizzi le immagini di sfondo…
Cerco di spiegarti come (perché mi sembra di aver capito che era qui che non sapevi come continuare):
6.1.
Il tuo file paginapersonalizzata.php apparirà più o meno cosଅ(in MAIUSCOLO qualche nota):
<?php
/*
Template Name: PAGINAPERSONALIZZATA
*/
?>
<?php get_header(); ?> QUAESTO INCLUDERA’ LA SEZIONE <HEAD> DOVE VIENE LINKATO IL TUO CSS
<div id=”container”> APRE IL CONTENITORE GENERALE
<div id=”colonnacentro”> APRE LA COLONNA CENTRALE
<div class=”posts”> APRE IL BOX DEI POST
<?php if (have_posts()) : while (have_posts()) : the_post(); ?> PARTE IL CICLO
<h3><?php the_time(‘F jS, Y’) ?><!– by <?php the_author() ?> –></h3> INSERISCE DATA E AUTORE DEL POST O PAGINA
<h2><?php the_title(); ?></h2> INSERISCE TITOLO DEL POST O PAGINA
Reimposti i contenitori che mostrano immagini… e poi modifichi il tuo css…
Ho visto che tu hai immagini solo nell’header, nel container e nel footer… non è difficile…
Rileggendomi mi rendo conto che se uno non è troppo pratico di html+css+funzioni-di-wp rischia di sballare tutto…
se non capisci cosa fare posta il codice del tuo file page.php (il css l’hai già postato) e si fa prima…
ciao
essezetaPartecipante…riapro giusto per postare la soluzione che sono riuscito a trovare…
sul forum ufficiale mi hanno postato questo link da dove è stato facile trovare il modo di “condizionare” in base all’utente la visualizzazione del SottoPannello di quando Scrivi un post…
Non so quanto questa faccenda da UCAS possa interessare qualcuno (sono giunto alla conclusione che ha ragione Steve quando sopra dice che è meglio usare la via ortodossa dei livelli di utenti e al limite RoleManager), ma credo sia giusto a questo punto postare la mia soluzione:
dalla riga 34 all’ultima di post-new.php ho cambiato il codice originale condizionandolo come segue… in pratica se non sei l’Admin (ovvero utente di livello 10) viene visualizzata una versione modificata del SottoPannello generato dall’inclusione di mod_of_edit-form-advanced.php:
<?php
// Show post form.
global $userdata;
get_currentuserinfo();
$post = get_default_post_to_edit();
if ('10' == $user_level) {
include('edit-form-advanced.php');
} else {
include('mod_of_edit-form-advanced.php');
}
include('admin-footer.php');
?>
Un saluto a tutti...
essezetaPartecipanteSteve caro, te lo spiego…
:p
se non l’ho fatto prima è perché quando chiedo una cosa nel forum SIMULO una situazione, semplificandola, ma i motivi specifici ci sono…
eccoli:
abbiamo un magazine, i collaboratori devono poter inserire le news, ma non posso fargli attendere l’approvazione (con eventuale correzione)…
nello stesso tempo non posso permettermi di avere categorie nuove o comunque inesatte (e se non gli cancello i tasti questi spesso li vedono e li usano facendo casino…), perché tramite categorie gestisco alcuni argomenti specifici di cui si occupa un collaboratore dedicato…
Allora l’ideale è avere i collaboratori di grado zero che possano inserire solo titolo e contenuto (+ riassunto, niente altro!! nemmeno i tags… che hanno un addetto specifico anche loro… in modo da non incasinare la cloud con tag ridondanti o non coerenti)
A parte tutto ciò… il mio UCAS è in tal caso utile per imparare a mettere le mani dentro WP… all’inizio usavo i temi cosଠcom’erano, ora me li creo… se riesco a maneggiare (un minimo) anche l’admin panel… mi diverto ancora di più…
Tornando alla mia ipotesi… posso condizionare in base all’utente in sessione? m’interessa il tuo parere… e naturalmente il tuo consiglio…
:p
-
AutorePost