• Resolved burgi.ch

    (@burgich)


    Hi Foogallery-Team.

    I really appreciate your work, thanks for this great and quite easys-to-use plugin! πŸ™‚

    I’ve got a question (or maybe a feature request…): I’d like to generate a post instead of a page by clicking on the Button in den “Gallery Usage” metabox. Can I change the behaviour of this button?

    Many Thanks in advance!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author bradvin

    (@bradvin)

    hi @burgich

    There is no way to override this at the moment, but it’s really easy to add a filter to allow you to change this. I will add the filter into the next update.

    Then you can add this code to create a draft post instead of a page:

    
    function custom_foogallery_create_gallery_page_arguments( $arguments ) {
        $arguments['post_type'] = 'post';
        return $arguments;
    }
    
    add_filter( 'foogallery_create_gallery_page_arguments', 'custom_foogallery_create_gallery_page_arguments' );
    
    Plugin Author bradvin

    (@bradvin)

    An update with this new filter has been released.

    I tested the above code by placing it in my functions.php file and a new post was created instead of a page.

    Thread Starter burgi.ch

    (@burgich)

    Wooow that was fast! Thanks.

    I will take a look at this by the end of the week. But it sounds great πŸ˜€πŸ˜€

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Gallery Usage: Create Post instead of Page’ is closed to new replies.