Wordpress Taxonomy Menu

admin2025-06-03  4

I have got the following simple code.

<ul id="filter"><?php       
echo '<li class="active"><a href="#" class="all">All</a></li>';             
if ( $count > 0 ) {             
    foreach ( $mylinks as $mylink ) {
        echo '<li>'.'<a href="#" class="'. $mylink->slug .'" >';
        echo $mylink->name;
        echo "</a>";
        echo "</li>";
        }
    }   
?>

The above basically returns the following:

<ul class="filter">
<li class="active">
    <a class="all" href="#">All</a>
</li>
<li>
    <a class="education" href="#">Education</a>
</li>
<!-- Etc. --></ul>

What I want is to have the taxonomy terms, (i.e. say taxonomy Education to link to an independent page: and on that page have all the custom post types with the taxonomy 'education' displayed on the page.

PS: Displaying the taxonomy terms is not a problem, the problem is linking the displayed taxonomy terms (in the code above) to an independent page (). This must happen all dynamically.

Is it possible? Please share your suggestions or links to tutorials.

One more question. What is the exact custom taxonomy URL? Is it ?

I have got the following simple code.

<ul id="filter"><?php       
echo '<li class="active"><a href="#" class="all">All</a></li>';             
if ( $count > 0 ) {             
    foreach ( $mylinks as $mylink ) {
        echo '<li>'.'<a href="#" class="'. $mylink->slug .'" >';
        echo $mylink->name;
        echo "</a>";
        echo "</li>";
        }
    }   
?>

The above basically returns the following:

<ul class="filter">
<li class="active">
    <a class="all" href="#">All</a>
</li>
<li>
    <a class="education" href="#">Education</a>
</li>
<!-- Etc. --></ul>

What I want is to have the taxonomy terms, (i.e. say taxonomy Education to link to an independent page: http://website/education and on that page have all the custom post types with the taxonomy 'education' displayed on the page.

PS: Displaying the taxonomy terms is not a problem, the problem is linking the displayed taxonomy terms (in the code above) to an independent page (http://website/independent_page). This must happen all dynamically.

Is it possible? Please share your suggestions or links to tutorials.

One more question. What is the exact custom taxonomy URL? Is it http://website/taxonomy/education ?

Share Improve this question edited Feb 9, 2019 at 0:02 fuxia 107k39 gold badges255 silver badges461 bronze badges asked Nov 22, 2012 at 13:03 user23355user23355
Add a comment  | 

1 Answer 1

Reset to default 0

If I understood this correct, then you need a taxonomy.php file.

LINK

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1748927368a314888.html

最新回复(0)