terms – How to fit category slug into page slug content

Question

How can I fit this category slug

<?php $term = get_queried_object(); echo $term->slug; ?>

into this page content
<?php $page = get_posts([ 'name' => 'slug-goes-here', 'post_type' => 'page' ]); if ( $page ){ echo $page[0]->post_content;} ?>

0
Pete 1 month 2021-12-08T10:53:31-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse