• 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

    <div>
    <?php
    $posts = get_posts(‘category=5’);
    foreach($posts as $post) :
    setup_postdata($post);

    echo ‘<div id=”wallpapers”>’;
    the_content();
    echo ‘<div id=”wallassin”><div class=”alignleft”>por <a href=”https://www.chrismise.com/blog/?author=&#8217;;
    the_author_ID();
    echo ‘”>’;
    the_author();
    echo ‘</div><div class=”alignright”>info <a href=”‘;
    the_permalink();
    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>
    </div>

Viewing 1 replies (of 1 total)
  • Thread Starter chrismise

    (@chrismise)

    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.