How to add a shortcode function that returns the taxonomy slug of the actual post within the loop

get_the_terms() will always return an array; but because you have only one ‘project_category’, you can simply use its first element: add_shortcode( ‘return_taxonomy_slug’, ‘my_shortcode_return_taxonomy_slug’ ); function my_shortcode_return_taxonomy_slug() { $terms = get_the_terms( get_the_ID(), ‘project_category’); return $terms[0]->slug; }

Pagination not working – FrontPage

I use this on archive pages. If you are trying to use it elsewhere then that might be a cause of the issue. if ( ! function_exists( ‘_s_pagination_links’ ) ) : /** * Numbered pagination */ function _s_pagination_links() { global $wp_query; $total_pages = $wp_query->max_num_pages; if ($total_pages > 1){ $current_page = max(1, get_query_var(‘paged’)); echo paginate_links(array( ‘base’ … Read more