New answers tagged

2

Changing how WordPress loads files can be very difficult and potentially destroy logic other plugins rely on. Instead, I usually make use of get_template_part() in this case like so single.php <?php get_template_part('singles/single', get_post_type()); And your files like singles/single-foo.php (for CPT foo) singles/single-bar.php (for CPT bar) ...


0

This is very good code for get taxonomy title in detail page or single page in custom post type in WordPress, <?php $terms = get_the_terms($post->ID, 'projects_category');foreach($terms as $term){echo $term->name;} ?>


1

You should set the following in your virtualhost apache: <Directory /var/www/html/wordpress> AllowOverride All </Directory> Then, refresh your permalinks: wp-admin->settings->permalinks. That's worked for me.


Top 50 recent answers are included