• I am really strugling with this but need to say that I am also a novice with regard to templates etc!

    I am using the Theme Graphene AND have a child theme which seems to be working.

    I am also using the plugin No Future Posts which allows the display of Posts published in the future.

    On one of my pages I wish to display:
    Heading Future Posts
    catlist etc
    Heading Past Posts
    catlist etc

    I have found some code that appears to allow this.
    Future
    get_header();

    // gets all posts in the future
    function kurse_where($where = ”)
    {
    $where .= ” AND post_date >= ‘”.date(‘Y-m-d’, strtotime(‘+0 days’)).”‘ “;
    return $where;
    }
    add_filter(‘posts_where’, ‘kurse_where’);

    // parameter: only catagorie “Concerts” and normal order: past top, future down
    query_posts(“category_name=Concerts&order=asc”);

    // here the normal code like index.php to list the posts

    Past
    get_header();

    // gets all posts in the past
    function kurse_where($where = ”)
    {
    $where .= ” AND post_date <= ‘”.date(‘Y-m-d’, strtotime(‘+0 days’)).”‘ “;
    return $where;
    }
    add_filter(‘posts_where’, ‘kurse_where’);

    // parameter: only catagorie “Concerts” and normal order: past top, future down
    query_posts(“category_name=Concerts&order=desc”);

    // here the normal code like index.php to list the posts
    <?php

    I think I understand these 2 sets of code and where to save the resultant template file. BUT I have no idea where or within which of the several php files that I can find:
    list_cat_posts.php
    default.php
    child_theme.php

    Please can anyone help a struggling beginner?

    https://www.ads-software.com/extend/plugins/list-category-posts/

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

    (@puffinld)

    Sorted – in a round-about way!!

    Please can you include another option so that we could add
    status=future
    or
    status=publish

    That would be so much simpler

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: List category posts] Displaying posts for specific date range’ is closed to new replies.