Skip to content

Error retrieving term link in Taxonomy module: cherry-satellite-utilit.php  #179

Open
@doppioTS

Description

Modify code on cherry-satellite-utilit.php

Modify is necessary to use it in module Taxonomy of PowerBuider: in module is possible to select various type of taxonomy but his work only with post 'category': module display correctly image and name of taxonimy but link is broken.
This is actual code
public function get_term_permalink( $id = 0 ) {
return esc_url( get_category_link( $id ) );
}

And this is correction
public function get_term_permalink( $id = 0 ) {
//return esc_url( get_category_link( $id ) ); // this return link only on 'category' taxonomy
return esc_url( get_term_link( $id ) ); // this returrn link on all taxonomy
}

This work with all taxonomy

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions