Support » Fixing WordPress » Post on Page – Permalink don’t work

  • I add this code to have the archive of post on category 5 on a static page(using mini loop).

    Almost everything worked, but when a click on a permalink of a post that don’t redirect to the post, but to the top static page.

    How can i make to permalinks inside posts go to the respective posts, not to top page

    $posts = get_posts(‘category=5’);
    foreach($posts as $post) :

    echo ‘<div id=”wallpapers”>’;
    echo ‘<div id=”wallassin”><div class=”alignleft”>por <a href=”’;
    echo ‘”>’;
    echo ‘</div><div class=”alignright”>info <a href=”‘;
    echo ‘” rel=”bookmark” title=”mais detalhes”>+’;
    edit_post_link(‘Edit’, ‘ <span class=”barra”>|</span> ‘, ‘ <span class=”barra”>|</span> ‘);
    echo ‘</div><div class=”spacer”></div></div></div>’;
    endforeach; ?>
    <div class=”spacer”></div>

Viewing 1 replies (of 1 total)
  • when i place the code inside de php code of the page the permalink works, but when i place the code on the page content the permalinks goes to the top of the page

Viewing 1 replies (of 1 total)
  • The topic ‘Post on Page – Permalink don’t work’ is closed to new replies.