Blog posts issues on wordpress site homepage
-
Does anyone have a solution to the below? I have tried a bunch of different tags, but nothing seems to work.
Site is: https://key2sportstraining.com/
1) Below articles there are 7 blog posts. What is the best way to show more than just those paragraphs on the homepage?
2) One of the posts has a video. Video shows up great on the posts page, but not on the homepage. How can I get it to appear on the homepage?
I have posted the code I am currently using below. I have tested the limit words being higher than 500 & it does not show anymore. In fact the posts are not even showing 500 currently.
<h1 class=”title”>Articles</h1>
<?php
$temp = $wp_query;
$wp_query= null;
$wp_query = new WP_Query();
$wp_query->query(‘showposts=7′.’&paged=’.$paged);
?>
<?php while ($wp_query->have_posts()) : $wp_query->the_post(); ?>
<article id=”post-<?php the_ID(); ?>” <?php post_class(); ?>>
<header>
<h2 class=”title”>” title=”<?php the_title(); ?>” rel=”bookmark”><?php the_title(); ?></h2>
<div class=”post-meta”>
<div class=”fleft”>Posted in: <?php the_category(‘, ‘) ?> | <time datetime=”<?php the_time(‘Y-m-d\TH:i’); ?>”><?php the_time(‘F j, Y’); ?> at <?php the_time() ?></time> , by <?php the_author_posts_link() ?></div>
<div class=”fright”><?php comments_popup_link(‘No comments’, ‘One comment’, ‘% comments’, ‘comments-link’, ‘Comments are closed’); ?></div>
</div><!–.post-meta–>
</header>
<?php echo ‘<div class=”featured-thumbnail”>’; the_post_thumbnail(); echo ‘</div>’; ?>
<div class=”post-content”>
<div class=”excerpt”><?php $excerpt = get_the_excerpt(); echo my_string_limit_words($excerpt,500);?></div>
” class=”link”>Read more
</div>
<footer>
<?php the_tags(‘Tags: ‘, ‘, ‘, ”); ?>
</footer>
</article>
- The topic ‘Blog posts issues on wordpress site homepage’ is closed to new replies.