• Resolved jeponkz

    (@jeponkz)


    How can I display the page tags?

    I am able to display post tags using the following code

    function wp_get_all_tags( $args = ” ) {

    $tags = get_terms(‘post_tag’);
    foreach ( $tags as $key => $tag ) {
    if ( ‘edit’ == ‘view’ )
    $link = get_edit_tag_link( $tag->term_id, ‘post_tag’ );
    else
    $link = get_term_link( intval($tag->term_id), ‘post_tag’ );
    if ( is_wp_error( $link ) )
    return false;

    $tags[ $key ]->link = $link;
    $tags[ $key ]->id = $tag->term_id;
    $tags[ $key ]->name = $tag->name;
    echo ‘ ‘ . $tag->name . ‘‘;
    }
    return $tags;
    }

    function get_tag_slug($title) {
    global $wpdb;
    $slug = $wpdb->get_var(“SELECT slug FROM $wpdb->terms WHERE name=’$title'”);
    return $slug;
    }

    but I am not able to display page tags. any idea?

    https://www.ads-software.com/extend/plugins/post-tags-and-categories-for-pages/

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘display the page tags?’ is closed to new replies.