Beste webmasters,
Een vraagje voor de wordpress experts onder ons:
ik ben Wordpress een beetje aan het ontdekken en wil graag een kleine hoeveelheid statische tekst boven de post lus van mijn categorie pagina's toevoegen. Hier kan ik dan bijvoorbeeld een omschrijving geven van de desbetreffende pagina's met daaronder mijn dagelijkse posts.
Heeft iemand enig idee hoe ik dit het beste aan kan pakken?
Alvast bedankt voor de hulp!
- Statische content plaatsen categorie pagina WP
-
656 × bekeken sinds 16-10-2010, 19:09 #1
Statische content plaatsen categorie pagina WP
-
-
16-10-2010, 19:46 #2
- Berichten
- 1.735
- Lid sinds
- 17 Jaar
Re: Statische content plaatsen categorie pagina WP
alsje http://codex.wordpress.org/Category_Templates
Different Text on Some Category Pages
A slightly more complex possibility is that you want different text to display depending on which category page the visitor is viewing. Then you would add the "default" text to the main category.php file, and create special category-#.php files (with their own version of the text, as described in the Introduction) for each category that needs special text at the top.
This does however create a lot of files in your theme directory, and can be avoided using the following code OUTSIDE the loop:
<?php if (is_category('Category A')) { ?>
<p>This is the text to describe category A</p>
<?php } elseif (is_category('Category B')) { ?>
<p>This is the text to describe category B</p>
<?php } else { ?>
<p>This is some generic text to describe all other category pages,
I could be left blank</p>
<?php } ?>
hecks to see if we are looking at Category A, if we are then show the first bit of text, but if we're not then check if we are looking at Category B. If we are then show that bit of text, and finally, if it is neither Category A or B, then show this default text.
Plaats een
- + Advertentie
- + Onderwerp
Marktplaats
Webmasterforum
- Websites algemeen
- Sitechecks
- Marketing
- Domeinen algemeen
- Waardebepaling
- CMS
- Wordpress
- Joomla
- Magento
- Google algemeen
- SEO
- Analytics
- Adsense
- Adwords
- HTML / XHTML
- CSS
- Programmeren
- PHP
- Javascript
- JQuery
- MySQL
- Ondernemen algemeen
- Belastingen
- Juridisch
- Grafisch ontwerp
- Hosting Algemeen
- Hardware Info
- Offtopic