Forums

how to call posts from a tag instead of category (1 post)

  1. cyrillsneer
    Member
    Posted 2 years ago #

    In my sidebar I currently have a command that pulls in posts from a certain category

    <ul class="topics" id="_tabtoggler1_tab1">
    <?php
    global $post;
    $cat_id = themename_category_id('editorspicks');
    if(!empty($cat_id))
    {
    $myposts = get_posts('numberposts=13&category='.$cat_id);
    foreach($myposts as $post) :
    ?>

  2. I'd like to replace this with a command that pulls in posts that have been tagged with a certain tag e.g tag = editorspick

    I tried replacing category_id with tag_id but it didn't work, any help would be appreciated.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.