WordPress – wyświetl wszystkie kategorie wpisu w loop

        while ( have_posts() ) {
            the_post();
                    $category_list = get_the_category( $id );
                    foreach ($category_list as $cat){
                        echo '<div class="cat_item_w">';
                            echo '<a href="'. esc_url( get_category_link( $cat->term_id ) ).'">';
                            echo $cat->name;
                            echo '</a>';
                        echo '</div>';
                    }
        } 
Ask ChatGPT
Set ChatGPT API key
Find your Secret API key in your ChatGPT User settings and paste it here to connect ChatGPT with your Tutor LMS website.
Scroll to Top