WordPress - Comment Créer Plusieurs Pages Dans Un Post sans Plugin ?
Par RedMoze • Dimanche 16 mars 2008 •
Classé dans WordPress • URL Trackback
page 1 page 2
exemple en image avec l’éditeur HTML sous Wordpress 2.5
Popularity: 9% [?]
Pages : 1 2
Tags: article, comment, Créer, exemple, fichier, index php, link, navigation, PHP, plugin, theloop, thème, Trucs et Astuces, tuto, WordPress, WordPress 2.5
Code
Vous pouvez afficher : WordPress - Comment Créer Plusieurs Pages Dans Un Post sans Plugin ? sur votre Site, Blog ou Forum (Ctrl+C pour copier) ↓
11 Commentaires à ce jour pour “WordPress - Comment Créer Plusieurs Pages Dans Un Post sans Plugin ?”
posté avec
Bonjour
J ai essaye de faire fonctionner votre methode ,mais cela ne fonctionne pas !! J utilise le theme kubrick , un coup de pouce serait le bienvenue.
Cordialement,
Alex
posté avec
Je viens de tester avec le thème par défaut Kubrick et ça a fonctionné ! il suffit d’ajouter < ?php wp_link_pages(); ?> à la ligne 15 dans le fichier index.php et écrire comme l’image ci-dessous dans l’éditeur HTLM où tu veux que les liens des pages s’affichent et puis c’est tout.
posté avec
Bonjour Jeny et MERCI pour ton aide . ,
Voici un tuto qui pourrait interesser un grand nombre de tes lecteurs dont moi le premier !!!
How to organize posts into two side by side colums
.
There are two theme files to be edited: index.php and style.css. I have just edited the default Kubrick theme, so adjust this to suit your own theme.
The basic idea is to add a “switch” so Wordpress knows if you’re looking at a post which will appear in the first or second column.
In index.php I added code in four places:
Before the Wordpress loop starts:
I.e. we set up the switch to start off in the first column.
Just after the Wordpress loop starts:
<?php if ($col == 1) echo “”; ?>
Start a new row if we’re in the left hand column.
Inside the Wordpress loop:
Add in the switch:
<div class=”post col” id=”post-”>
I.e. I added in col to the post’s class. We’ll use CSS to decide how to display posts in each column.
Just before the end of the Wordpress loop:
Change the switch and the row:
<?php if ($col == 1) echo “”; (($col==1) ? $col=2 : $col=1); endwhile; ?>
The Wordpress loop ends with endwhile.
Just before this, I do two things: finish the row and I make $col switch between the first or second column. If you haven’t seen code like this before, this is what it’s doing:
Are we in the first column?
Yes: Move to the second column.
No: Move to the first column.
In style.css I added three lines of code at the very bottom:
.row { clear: both; }
.col1 { width: 200px; float: left; padding: 0 10px; }
.col2 { width: 200px; float: right; padding: 0 10px; }
If you’re using a different theme, you may need to adjust the column widths and the amount of padding.
Using a row div forces the two posts to always line up with each other, even if the excerpts are different lengths.
Cordialement,
Alex
posté avec
Bonjour Jeny ,
Est ce que le tuto que je t ai envoye te semble
interesssant pour nous tes lecteurs ?
Cordialement,
Alex
posté avec
Intéressant OUI pour ceux qui cherchent à personnaliser leurs blogs.
J’ai testé sous WordPress version 2.7-beta1 avec le thème Kubrick et voilà ce que ça donne :
Merci pour l’info et pour les curieux c’est par ici : How to organize posts into two side-by-side columns in Wordpress.
posté avec
Bonsoir ,
Meri pour la demo .Pourrais tu nous la traduire en Francais
pour que nous tes lecteurs puissions aussi en beneficier .
Cordialement,
Alex
posté avec
Dès que j’ai 5 minutes de libre je m’y colle…
J’ai fait un zip des fichier index.php & style.css du thème Kubrick, tu peux le télécharger et le tester (sauvegarde tes fichiers avant de tester - sinon tu peux retrouver les originaux dans toutes les dernières versions WordPress).
passe : rmz
Voilà la traduction en FR par Google : Comment organiser en deux postes côte à côte dans les colonnes WordPress.
posté avec
MERCI POUR TOUT .
Alex
posté avec
Bonsoir ,
Desole c est encore moi !! j espere pour la derniere
fois ( je suis nul !mais a ce point c est desesperant!!).
les changements ont bien ete faits ,tout s est bien
passe,mais comment, lorsque tu ecris les posts obtenir
le meme resultat que ta demo ?
Cordialement,
Alex
posté avec
J’ai rien fait de spécial ! j’ai juste publié 3 articles c’est tout.
posté avec
CA MARCHE HURRAH !!!