Ik heb onlangs een testproject gestart dat waarschijnlijk binnen enkele weken mijn nieuwe site moet gaan voorstellen. Hiervoor had ik een optie nodig waardoor ik een pagina kon aanmaken waar ik meerdere posts in kon samenrapen, door middel van een centrale ‘tag’ zeg maar.
Spontaan dacht ik aan categorieën, maar dan krijg je meteen die vervelende ‘/category/’ in je URL. Dat vond ik niet bepaald aantrekkelijk. Verder wou ik zelf ook nog wat tekst als inleiding op de inhoud erbij hebben. Dat kan je niet doen via de WP-Admin (wat voor mij juist belangrijk is om redenen als useability).
Ik ging dus op zoek naar een plugin voor Wordpress (waar ik mijn project op baseer). Ik wist al van Aral Balkan’s plugin voor inline posts af, maar ik wist niet echt of dit mijn probleem uit de wereld kon helpen. Je raadt het al. Dat lukte niet hoe ik wou. Ik heb dan Aral’s plugin maar bijgewerkt zodat hij deed wat ik wou.
Het leuke is dat de plugin nog altijd zoals ervoor werkt, en hij nu ook categorieën kan includen in één en dezelfde post of pagina!
Alle gekheid op een stokje kan deze plugin nu de meest zeldzame combinaties in 1 post of pagina aan:
- Meerdere posts in 1 post of pagina
- Een categorie van posts in een post of pagina
- Een post en een categorie van posts in een post of pagina
- Meerdere categorieën in een posts of pagina
- Zo kan ik wel nog even doorgaan
Thanks to Aral for providing me with the initial step I needed to make this work!
Download:
Installatie:
- Upload het bestand InlinePostsAndCategories.php naar je wordpress/wp-content/plugins/ map
- Ga naar je plugin manager in je Wordpress administratie en activeer de plugin.
- Klaar!
Gebruik:
- Include een post als volgt:
Hier volgt een included post [[ 40 ]] - Include een categorie als volgt:
Hier volgt een included categorie [[ cat:14 ]]
In English for the non-Dutch people
:
Download:
Installation:
- Upload the InlinePostsAndCategories.php file to your wordpress/wp-content/plugins/ folder.
- Go to the plugin manager in your Wordpress administration and activate the plugin.
- You’re good to go!
Usage:
- Include a post:
Here follows an included post! [[ 40 ]] - Include a category:
Here follows an included category! [[ cat:14 ]]
Veel plezier / Have fun!!



The posting all of category works good. However the page I am using it with will only display’s the last 5 of the category can I change that to unlimited? As my intended use is to display all.
Sure you can. I haven’t tried with more than 3 posts so I can’t tell if it would work or not with more than 5 posts. Feel free to alter it, and let me know how it turned out. I will list it here as well!
Where is the limit defined? I can’t seem to trace it. If you haven’t defined a limit I guess this is a perk I would have to live with and then post the rest of the Id’s Manually using the post functions. I tried other plug ins to increase the limits to no avail.
I am not really familiar with Wordpress functions, but my best guess is that the getPostFromCategory() function is set to a max of 5 posts. I’ll look into it, and let you know what pops up.
Well I am sort of on my way to getting this. Basically I have edited one line but it returns posts from every category. It does however return all posts.
Well it turns out I did solve my problem it was a simple edit of
(Previously)
line 168 $allCatPosts=get_posts(’category=’.$matches[0][$i]);
(Edit to show all content in category)
$allCatPosts=get_posts(’numberposts=-1&category=’.$matches[0][$i]);
Thank you for editing the intial inline posts plug-in as I doubt I would have been able to edit it myself.
Good job!
I’ll post the update later on right here!
Thanks for letting me know how you solved this.
Hey,
Is het ook mogelijk om het automatisch de laatste 2 post te laten weergeven in een pagina?
Voorbeeld:
Ik heb een home en een subpagina. Op de home staat alleen een paar post. Maar op de subpagina (beheerd door author x) word alleen de laatste 2 post die door author x gepost zijn weergeven.
Want ik heb verschillende subpagina’s en al deze pagina’s worden door verschillende authors beheerd. Vandaar dat ik dit vraag. Thnx
zou perfect mogelijk moeten zijn.
Aarzel niet om zelf het PHP bestand te wijzigen naar je eigen wensen. Zolang je er de vermeldingen van Aral Balkan (de originele auteur van de plugin) en mij in laat zie ik alle wijzigingen tegemoet. Laat zeker even zien wat je ervan gemaakt hebt, ik zal er met veel plezier naar linken!