Viewing 5 replies - 1 through 5 (of 5 total)
  • You can enable folders for posts in the options menu.

    You can then do it one of 2 ways.

    1) Select the folder and click from the sidebar menu.
    2) Go to posts list and filter by your selected folder.

    Hope this helps.

    Thread Starter rrmia

    (@rrmia)

    Thank you so much for getting back to me!

    I’m sorry maybe I wasn’t clear. I meant display folder contents on the front-end.

    What would be the actual code to display on a page.

    Ah i see,

    yeah, folders actually just uses a custom taxonomy for this exact reason.
    The taxonomy name is:

    folders4[POST_TYPE]

    So for posts, the taxonomy would be:

    folders4posts

    Here is a snippet to pop into your theme:

    $taxonomies = array(
        'folders4posts',
        'folders4pages'
    );
    
    $args = array(
        'orderby'           => 'name',
        'order'             => 'ASC',
        'hide_empty'        => true,
        'exclude'           => array(),
        'exclude_tree'      => array(),
        'include'           => array(),
        'number'            => '',
        'fields'            => 'all',
        'slug'              => '',
        'parent'            => '',
        'hierarchical'      => true,
        'child_of'          => 0,
        'childless'         => false,
        'get'               => '',
        'name__like'        => '',
        'description__like' => '',
        'pad_counts'        => false,
        'offset'            => '',
        'search'            => '',
        'cache_domain'      => 'core'
    ); 
    
    $terms = get_terms($taxonomies, $args);
    
    foreach ($terms as $key => $term) {
    echo $term->name;
    }

    Some of that snippet is taken from the wordpress codex:

    get_terms()

    In a future version of folders, we will be adding shortcodes to do this.

    I hope that helps.

    Thread Starter rrmia

    (@rrmia)

    Thank you that’s perfect!

    No worries, i’m glad i could be of help.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Display all posts from folder’ is closed to new replies.