Skip to:
Content
Pages
Categories
Search
Top
Bottom

Autocreate forum in Hub Page

  • @svend-rugaard

    Participant

    i am using “Gauge” for my site, and i want to make my forum more visible. And therefor i want to make sure every game i create is getting it forum.

    Its like when i create a “Game Info” site, it automatic create News, Review, Images, Trailers.

    But i want to it also create a forum there would be shown in the game, so i dont have to manually add shortcode and forum for that particular game every time, it will save time also.

    I have use this guide from Ghostpool ( Theme Author ) https://ghostpool.ticksy.com/article/3379/

    And in stead of using preview i use debat.

    And im not sure bur i think the problem could be “solve” here ..

    if ( $_POST['debat_page'] == '1' ) {
        $new_page_title = $hub_title_prefix . __( 'debat', 'gp_lang' ); // Page title
        $new_page_content = '';
        $new_page = array(
            'post_type'      => 'forum',
            'post_title'     => esc_attr( $new_page_title ),
            'post_name'      => sanitize_title( $hub_url_prefix . '-' . __( 'debat', 'gp_lang' ) ), // Page slug
            'post_content'   => $new_page_content,
            'post_status'    => 'publish',
            'comment_status' => 'publish', // change to closed to disable the comment form
            'post_parent'    => $hub_page_id
        );

    In the “post_parent” its the parent it belongs to so i figure maybe there is someway to add autocreated forum.

    Because its actually create the forum, just not put it in the hub-page

  • You must be logged in to reply to this topic.
Skip to toolbar