How to stop subdirectory wordpress install adding head elemets to entire site?
I am working on a static website, www.example.com
and have installed wordpress in a subdirectory: www.example.com/blog.
I have created a custom elemnt on the home page which pulls in the latest blog. To do this I have included the following code:
?php
require('blog/wp-blog-header.php');
get_header();
?
The problem I am having is that this is pulling in the meta description as well as some other meta tags which are not needed, what is the best way to fix this?
FYI, this is the custom code which pulls in the latest blog:
section class="homeBlog"
h2Read Our Latest Blog/h2
div class="homeBlogContainer"
?php if (has_post_thumbnail()) : ?
?php
$image = wp_get_attachment_url( get_post_thumbnail_id($post-ID) );
?
div class="tm-featured-image" style="background: url('?php echo $image; ?') #FFF no-repeat; background-size: cover;"
a href="?php the_permalink() ?" title="?php the_title_attribute(); ?"
img class="uk-invisible" src="?php echo $image; ?" alt="?php echo $image_alt; ?"
/a
/div
?php endif; ?
div class="home-blog-text"
?php $the_query = new WP_Query( 'posts_per_page=1' ); ?
?php while ($the_query - have_posts()) : $the_query - the_post(); ?
div class="articleMeta"
div class="profileImage"
?php echo get_avatar( get_the_author_meta( 'ID' ), 100 ); ?
/div
div class="profileAuthor"
h3a href="?php the_permalink() ?"?php the_title(); ?/a/h3
p class="profileMeta"
?php
$date = 'time datetime="'.get_the_date('Y-m-d').'"'.get_the_date().'/time';
printf(__('%s br %s', 'warp'), 'a href="'.get_author_posts_url(get_the_author_meta('ID')).'" title="'.get_the_author().'"'.get_the_author().'/a', $date);
?
?php edit_post_link(__('Edit', 'warp'), ' / i class="uk-icon-pencil"/i ',''); ?
/p
/div
/div
?php the_excerpt(__('(more…)')); ?
p class="btn"
stronga href="?php the_permalink() ?" title="?php the_title_attribute(); ?"read more/a/strong
/p
?php
endwhile;
wp_reset_postdata();
?
/div
/div
/section
Topic blog static-website custom-post-types Wordpress
Category Web