Dynamic links template
-
Hello, I’ve just started to rebuild my webzine using WordPress. I have a question regarding the Link Manager. I’d like to have a separate page for each link category.
For that purpose I created a Links template with the following code, for instance for category 1:
<?php get_links('1', '<li>', '</li>', '<br />', FALSE, 'name', TRUE); ?>
Then I created a Page with the link category as title, no content in the Post field and Links as template.
This method works. But if I’d like to have 20 link categories, I would have to create both 20 pages and 20 templates. Would there be a method to achieve this with only one template, which uses a variable for the category? Perhaps I could distract the category name from the page title, or the category_id from a custom field?
- The topic ‘Dynamic links template’ is closed to new replies.