Custom post ID as post tag value

[ad_1]

I acquired a custom post sort named tasks and a taxonomy phrases discipline known as venture tag with as tag recommend. Is it doable to make the custom post ID the value of the tag?

I figured I’ve to get the post ID first before it could be used as a value.

For that I attempted out this code:

perform get_the_ID() {
    $args = array( 'post_type' => 'tasks');

    $loop = new WP_Query( $args );
        whereas ( $loop->have_posts() ) : $loop->the_post();
            the_ID();
        endwhile;
}

I nevertheless do not know learn how to make the post ID the value of a post tag.

[ad_2]
Source link

Leave a Reply