• I am just starting out here. I had my blog post embedded on my home page so it displayed in both places. Then I added a permalink to the blog post and I got an error 404 on the home page. I then changed the link on the home page to the new permalink name. Now the home page just shows the link and not the content. 🙁 Any ideas because I’m lost.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Have you tried this link
    Creating a static front page

    I have embedded blog posts using custom queries in front-page.php.

    <div class="blog-post">
    				<h4>From the Blog</h4>
    				<?php query_posts('posts_per_page=1'); ?>
    				<?php while ( have_posts() ) : the_post(); ?>
    					<h2><?php the_title(); ?></h2>
    					<?php the_excerpt(); ?>
    					<a href="<?php the_permalink(); ?>" class="read-more-link">Read More <span>&rsaquo;</span></a>
    				<?php endwhile; // end of the loop. ?>
    				<?php wp_reset_query(); // resets the altered query back to the original ?>
    			</div>
    Thread Starter rcroughwell

    (@rcroughwell)

    Thanks Hema,

    I went back this morning and removed the permalink and I got the embedded post back on the front page, although it didn’t display the image I had with the text.

    I will look at the link you suggest when I get back from work, hopefully if can explain how to get embedded posts when assigning permalinks.

    I’m not a programmer so I’m not sure how to use the code you suggest.

    Rosa

    Do post here if you got it fixed. I am curious on how you solved it. Are you working live on your site? If so, do post your website url.

    Thread Starter rcroughwell

    (@rcroughwell)

    Hello Hema,

    Thanks so much for getting back to me.

    I am not working live on my site. Nt is still not doing what I want. What I am trying to do is to have the latest post from a dynamic page show up on my static home page. It sounds like it should be a simple thing but I can’t see how to do it.

    You should be able to do this using custom query. That’s the third line in the example code I posted way above. You need to change the parameters to display the newest blog post. This is an old post but it might help you https://wordpress.org/support/topic/display-5-most-recent-posts-on-top-of-indexphp?replies=21

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Homepage broken after I added permalink’ is closed to new replies.