- Statut : non résolu
- Ce sujet contient 6 réponses, 3 participants et a été mis à jour pour la dernière fois par
baudry, le il y a 17 années et 3 mois.
-
AuteurMessages
-
26 mars 2008 à 16 h 28 min #458129
Bonjour,
Ma configuration WP actuelle WordPress 2.33
– Version de WordPress :
– Thème utilisé :
– Plugins en place :
– Nom de l’hebergeur : free.fr
– Adresse du site :http://olivierbaudrydesign.frProblème(s) rencontré(s) : Problème de catégories
partant de mon vieux site en html
je souhaiterais transposer dans certaines pages notamment workingprogress mes catégories
alors avant j’avais ceci :<li id="categories">
<h2>Keywords</h2>
<ul>
<li><a href="category/exhibition/exhibition.html" title="View all posts filed under exhibition">exhibition</a></li>
<li><a href="category/machine/index.html" title="View all posts filed under machine">machine</a></li>
<li><a href="category/workshop/index.html" title="View all posts filed under workshop">workshop</a></li>
<li><a href="category/atelier-hypermedia/atelierhypermedia.html" title="View all posts filed under atelier hypermedia">atelier hypermedia</a></li>
<li><a href="category/thesis/index.html" title="View all posts filed under thesis">thesis</a></li>
<li><a href="category/live/index.html" title="View all posts filed under live">live</a></li>
<li><a href="category/rant/index.html" title="View all posts filed under rant">rant</a></li>
<li><a href="category/abstractmachine/index.html" title="View all posts filed under abstractmachine">oupocreanum</a></li>
<li><a href="category/narcsissus/index.html" title="View all posts filed under narcissus">narcissus</a></li>
<li><a href="category/code/code.html" title="View all posts filed under code">code</a></li>
<li><a href="category/hypertable/index.html" title="View all posts filed under hypertable">hypertable</a></li>
<li><a href="category/algorithmic-cinema/index.html" title="View all posts filed under algorithmic cinema">algorithmic cinema</a></li>
<li><a href="category/publication/index.html" title="View all posts filed under publication">publication</a></li>
<li><a href="category/instrument/index.html" title="View all posts filed under instrument">instrument</a></li>
<li><a href="category/play/index.html" title="View all posts filed under play">play</a></li>
<li><a href="category/circuit/index.html" title="View all posts filed under circuit">circuit</a></li>
<li><a href="category/curatorial/index.html" title="View all posts filed under curatorial">curatorial</a></li>
<li><a href="category/design/design.html" title="Design work by Olivier Baudry">design</a></li>
<li><a href="category/residency/residency.html" title="View all posts filed under residency">residency</a></li>
<li><a href="category/internet/internet.html" title="View all posts filed under internet">internet</a></li>
<li><a href="category/flickr/index.html" title="View all posts filed under flickr">flickr</a></li>
<li><a href="category/interview/index.html" title="View all posts filed under interview">interview</a></li>
<li><a href="category/concept/index.html" title="View all posts filed under concept">concept</a></li>
<li><a href="category/award/award.html" title="View all posts filed under award">award</a></li>
<li><a href="category/student/index.html" title="View all posts filed under student">student</a></li>
<li><a href="category/plot/plot.html" title="View all posts filed under plot">plot</a></li>
<li><a href="category/interface/index.html" title="View all posts filed under interface">interface</a></li>
<li><a href="category/transatlab/transatlab.html" title="View all posts filed under transatlab">transatlab</a></li>
<li><a href="category/podcast/index.html" title="View all posts filed under podcast">podcast</a></li>
<li><a href="category/physicalization/index.html" title="View all posts filed under physicalization">physicalization</a></li>
<li><a href="category/i-like/index.html" title="View all posts filed under i like">i like</a></li>
<li><a href="category/random/index.html" title="View all posts filed under random">random</a></li>si maintenant j’utilise ceci comment faire pour mettre en oeuvre toutes les possibilités :
<li id="categories">
<h2>Keywords</h2>
<?php
$categories = get_the_categories ();
$cat = $categories[0]->cat_ID;
$post = get_posts(‘numberposts=10&category=’.$cat);
<ul>ensuite question bête puis je faire des catogories sous chaque page?
26 mars 2008 à 16 h 55 min #625118Les menus à base de catégories se font, en général, en utilisant la fonction wp_list_categories.
Cordialement
26 mars 2008 à 17 h 11 min #625119mais suis je sur la bonne voie? et comment vu que j’ai un modele de template par page puis je faire un module de catégories différent dans chacun des templates?
26 mars 2008 à 17 h 17 min #625120La fonction wp_list_categories() utilisée telle quelle dans le fichier sidebar.php (par exemple) va générer une liste des différentes catégories présentes sur le blog. C’est à dire que cette simple instruction va générer tout le code html que tu montres en exemple.
Comment faire plus simple ? 😉Cordialement
26 mars 2008 à 17 h 23 min #625121Mais alors comment nommer différentes catégories? pour l’instant dans ma sidebar j’ai cela :
<div id="sidebar">
<ul>
<li>
</li>
<!– Author information is disabled per default. Uncomment and fill in your details if you want to use it.
<li><h2>Author</h2>
<p>A little something about you, the author. Nothing lengthy, just an overview.</p>
</li>
–>
<li>
<p>You are currently browsing the archives for the category.</p>
<p>You are currently browsing the <a href="/ »></a> blog archives
for the day .</p>
<p>You are currently browsing the <a href="/ »></a> blog archives
for .</p>
<p>You are currently browsing the <a href="/ »></a> blog archives
for the year .</p>
<p>You have searched the <a href="/ »></a> blog archives
for <strong> »</strong>. If you are unable to find anything in these search results, you can try one of these links.</p>
<p>You are currently browsing the <a href="/ »></a> blog archives.</p>
</li>
<?php wp_list_pages('title_li=<h2>Pages</h2>‘ ); ?>
<li><h2>Archives</h2>
<ul>
</ul>
</li>
<?php wp_list_categories('show_count=1&title_li=<h2>Categories</h2>‘); ?>
<li><h2>Meta</h2>
<ul>
<li></li>
<li><a href="http://validator.w3.org/check/referer" title="This page validates as XHTML 1.0 Transitional">Valid <abbr title="eXtensible HyperText Markup Language">XHTML</abbr></a></li>
<li><a href="http://gmpg.org/xfn/"><abbr title="XHTML Friends Network">XFN</abbr></a></li>
<li><a href="http://wordpress.org/" title="Powered by WordPress, state-of-the-art semantic personal publishing platform.">WordPress</a></li>
</ul>
</li>
</ul>
</div>je ne sais pas si ça peut servir dans mon cas?
26 mars 2008 à 17 h 42 min #625122Je pense que tu peux regarder les options de la fonction en question, et notamment before et after, et tu peux regarder comment tu peux utiliser la description et le « slug » de la catégorie.
26 mars 2008 à 18 h 00 min #625123bon j’aimerais bien voir un truc on a le détail de tout et des arguments possibles sur le site wordpress.org c’est pas très pratique. moi j’aime bien les trucs comme mon bouquin sur les css, css press pocket tout est définit, bref pratique. ou la before after slug ! ouieaille mais bon on va regarder
-
AuteurMessages
- Le forum ‘Utilisation spécifique de WordPress’ est fermé à de nouveaux sujets et réponses.