• Resolved TheSickle

    (@thesickle)


    Hello,

    Great plugin first of all. I have a question which I believe has been asked already, but was not able to find the final solution.

    I want some posts to be archived, but also to be able to call them on a separate page. Idea is to have an Archived Content page where I can call the posts that are not visible in the main content.

    How is this possible, if it even is?

    Thank you in advance.

    https://www.ads-software.com/plugins/archived-post-status/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter TheSickle

    (@thesickle)

    I saw that I need to add the following to the theme functions file :

    add_filter( 'aps_status_arg_public', '__return_true' );
    add_filter( 'aps_status_arg_private', '__return_false' );
    add_filter( 'aps_status_arg_exclude_from_search', '__return_false' );

    and I am finding that something like this should be used to call the posts:

    [insert_php]
    $args = array(
    	'posts_per_page'   => 5,
    	'offset'           => 0,
    	'orderby'          => 'date',
    	'order'            => 'DESC',
    	'post_type'        => 'post',
    	'post_status'      => 'archive',
    	'suppress_filters' => true
    );
    $posts_array = get_posts( $args ); [/insert_php]

    Am I on the right path ? ??

    Thread Starter TheSickle

    (@thesickle)

    when I test this the only thing I get is …Continue reading link and when I click on it, it reverts me back to the same page ??

    Thread Starter TheSickle

    (@thesickle)

    Resolved, went a totally other direction and modified the loop in the index file in order to exclude the category I want and then on a new page I can call the posts again when needed.

    Plugin Author Frankie Jarrett

    (@fjarrett)

    Sorry I was late to the party here, glad you figured something out.

    Thread Starter TheSickle

    (@thesickle)

    Well I thought it worked at least, in one of my test the posts were hidden and excluded from the loop, but suddenly they started appearing again. Not sure what went wrong still troubleshooting to understand if something is in the way and why it worked the first time.

    May I humbly ask for the snippet you added?

    I have everything setup as is. However I can not get it to show:

    'post_status'      => 'archive',

    does not display the post that I have archived.

    Yes, I did add this part into the functions as mentioned in the FAQ:

    add_filter( 'aps_status_arg_public', '__return_true' );
    add_filter( 'aps_status_arg_private', '__return_false' );
    add_filter( 'aps_status_arg_exclude_from_search', '__return_false' );

    is there any other way to display posts that are archived?

    Thread Starter TheSickle

    (@thesickle)

    Hi,

    I gave up on using this plugin to achieve my goal, until the author makes it possible to display archived posts I will use the following setup:

    – create a custom post type Archived, using Custom Post Type UI plugin;
    – then using Post Type Switcher plugin I change the type of the desired posts, changing the post type will automatically exclude the posts from the loop;
    – in my case using wp tiles shortcodes I am calling on an archived page all the posts currently assigned to the custom post type Archived;

    I hope this helps you out.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘How to display archived posts on a separate page’ is closed to new replies.