get_template_directory() returns wrong address on VPS

You can read data on your server with file_get_contents(). If you want to make sure the file exists and is readable then use is_readable(). You don’t really need to use trailingslashit() in this case because you’re constructing the URI yourself. // path to file under current theme $json_file = get_template_directory() . ‘/inc/includes/acf-fonticonpicker/icons/selection.json’; // make sure … Read more

get_template_part() Not Working in Loop

Thinking about my comment…wouldn’t it be simplier to say: <section id=”content” class=”site-content blog-page”> <div class=”container”> <?php if ( is_home() || ( is_front_page() && is_home() ) ) : ?> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <h2> There are posts but template parts aren’t found </h2> <?php get_template_part( ‘template-parts/post/content’, get_post_format() ); ?> <?php get_template_part( … Read more