Volete inserire i post come sono scritti in questo sito?
Basta seguire 4 semplici passi
1. Effettuare il backup del codice
2. Inserire il codice1
3. Inserire il codice2
4. Scegliere il tipo di formattazione
1.Andate su Layout-->Modifica HTML , "scarica modello completo", operazione fondamentale per effettuare il back-up nel caso la modifica del modello non andasse a buon fine. Quindi mettete il segno di spunta in Espandi modelli widget
Inserisci prima di questo tag \head il seguente codice
<b:if cond='data:blog.pageType != "item"'>
<script type="text/javascript">
var fade = false;
function showFull(id) {
var post = document.getElementById(id);
var spans = post.getElementsByTagName('span');
for (var i = 0; i < spans.length; i++) {
if (spans[i].id == "fullpost") {
if (fade) {
spans[i].style.background = peekaboo_bgcolor;
Effect.Appear(spans[i]);
} else spans[i].style.display = 'inline';
}
if (spans[i].id == "showlink")
spans[i].style.display = 'none';
if (spans[i].id == "hidelink")
spans[i].style.display = 'inline';
}
}
function hideFull(id) {
var post = document.getElementById(id);
var spans = post.getElementsByTagName('span');
for (var i = 0; i < spans.length; i++) {
if (spans[i].id == "fullpost") {
if (fade) {
spans[i].style.background = peekaboo_bgcolor;
Effect.Fade(spans[i]);
} else spans[i].style.display = 'none';
}
if (spans[i].id == "showlink")
spans[i].style.display = 'inline';
if (spans[i].id == "hidelink")
spans[i].style.display = 'none';
}
post.scrollIntoView(true);
}
function checkFull(id) {
var post = document.getElementById(id);
var spans = post.getElementsByTagName('span');
var found = 0;
for (var i = 0; i < spans.length; i++) {
if (spans[i].id == "fullpost") {
spans[i].style.display = 'none';
found = 1;
}
if ((spans[i].id == "showlink") && (found == 0))
spans[i].style.display = 'none';
}
}
</script>
</b:if>
Successivamente sostituite questo codice
<div class='post-body entry-content'>
<data:post.body/>
<div style='clear: both;'/> <!-- clear for photos floats -->
</div>
con quest'altro
<div class='post-body entry-content' expr:id='"post-" + data:post.id' >
<b:if cond='data:blog.pageType == "item"'>
<style>#fullpost{display:inline;}</style>
<p><data:post.body/></p>
<b:else/>
<style>#fullpost{display:none;}</style>
<p><data:post.body/></p>
<span id='showlink'>
<a expr:href='data:post.url'>Leggi tutto...</a>
</span>
<script type='text/javascript'>
checkFull("post-" + "<data:post.id/>");
</script>
</b:if>
<div style='clear: both;'/> <!-- clear for photos floats -->
</div>
Naturalmente potete modificare il Leggi tutto con una scritta a vostro piacimento!
Poi andate su Impostazioni-->Formattazione e inserire in Modello post il seguente codice e salvare le impostazioni
Sommario(piacere so Totti!)
<span id="fullpost">
Resto del post
</span>
Quando create un nuovo post, dovete inserire il riassunto al posto di "Sommario(piacere so Totti!)" e il resto del post al posto di "Resto del post"











0 commenti:
Posta un commento