get_permalink to use secondary category
-
I’m using a category called “slider” to present articles in a slider at the top of my home page. This slider category is used for nothing more than determining which articles to display, and all articles are also part of “real” categories.
Is there any way I can craft the permalink inside the slider so that the permalink uses the “real” categories, instead of the slider category?
Current code example below:
query_posts('category_name='.$queryName.'&showposts='.$numposts); while(have_posts()) { the_post(); echo '<a href="'.get_permalink($post->ID).'">Foo</a>'; }Many thanks in advance!
The topic ‘get_permalink to use secondary category’ is closed to new replies.