At the moment my nav menu's category list only links to normal post_type archives. I'd like to dynamically append a custom post type, specifically ?post_type=portfolio, to the end of each url that particular drop down list. But I really don't know anything about php regex at the moment, except that I think that's what I need for it to work.
This is the code I've got in my functions.php file so far, specifically for the drop down list in question. As you can see, my theme appends the categories post count after the end of the link, and I'd like to keep it there please.
$folio = wp_list_categories('show_count=1&echo=0&child_of=86&title_li=<a href="http://pixelsandtea.com/category/portfolio/?post_type=portfolio" title="View all Portfolio items">Portfolio</a>'); $folio = preg_replace('/\<\/a\> \((.*)\)/',' <span>$1</span></a>',$folio); echo $folio;