WordPress.org

Ready to get started?Download WordPress

Forums

Electric Studio Auto Post Expire
Custom Post Types Not Listed on Settings (8 posts)

  1. bkimberly2000
    Member
    Posted 1 year ago #

    I love this plugin, but after upgrading to the latest version (can't remember which version I last had), the custom post types (such as features, boxes, banners, etc) no longer appear on the settings screen. That said, I can't enable or disable expirations for my custom post types anymore.

    Do you know why these items are not showing there anymore?

    http://wordpress.org/extend/plugins/electric-studio-auto-expire-post/

  2. Gabor Javorszky
    Member
    Posted 1 year ago #

    Not yet, but I'll look into it now, so bear with me. Testing...

  3. Gabor Javorszky
    Member
    Posted 1 year ago #

    Is the post type public, by any chance?

  4. bkimberly2000
    Member
    Posted 1 year ago #

    Gabor,

    Sorry for the delay. I don't regularly check the forums.

    I did a little bit of research and discovered that the custom post types are NOT public. That seems to be the standard when using the Pagelines Framework and child themes. In my case, Boxes, Banners, and Features should all be showing up under the Post Expiry options, but they don't. They USED to, but for some reason they disappeared several versions ago.

    Thanks for your help!
    Brad

  5. bkimberly2000
    Member
    Posted 1 year ago #

    I don't have older versions of the code, but I presume this is the part that's hanging me up since Pagelines predefines those custom post types 'public' as false.

    public function get_available_post_types() {
    		$pt_args = array(
    			'public' => true
    		);
    		$all_posttypes = get_post_types( $pt_args, 'names' );
    		return $all_posttypes;
  6. Gabor Javorszky
    Member
    Posted 1 year ago #

    Hi Brad,

    Yes, that's what's keeping you. The thinking behind adding that code was that if the custom post types aren't shown on the frontend, we might as well not bother with them, as the users won't be able to see them (because they are not shown on the frontend).

    On the other hand, that can be changed, and I can implement a checkbox to show non-public post types as well. If you need to use this as soon as possible, change this

    $all_posttypes = get_post_types( $pt_args, 'names' );

    to this:

    $all_posttypes = get_post_types( '', 'names' );

    it will work. I need some time to update the plugin, so if you want to use it asap, this will do it, otherwise you can wait for 1.6.7, which might take a week due to other things I need to do.

  7. bkimberly2000
    Member
    Posted 1 year ago #

    Ah, yeah. Thanks for looking into that! I'm not an excellent coder, but I managed to get it to work by changing "public" to "show_ui" in the array. Thank you for your hard work on this plugin!

    Take care,
    Brad

  8. bkimberly2000
    Member
    Posted 1 year ago #

    Gabor,

    Just wanted to poke my head up. This fix does not appear in 1.6.8.

    Thanks for your hard work!
    Brad

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.