Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter fr0gger03

    (@fr0gger03)

    OK, I think I have it narrowed down to functions.php…
    1) I am using the plugin Custom Post Type UI to allow the business to create Newsletters.
    2) To get these to show up on the home page, I had to create a custom functions.php.
    3) If I remove or comment out the functions in my custom functions.php, the Calendar shows correctly – hooray! but then, of course, my customer’s custom posts don’t display as posts on the news page.

    This is the content of my functions.php. I would love some help.

    ‘<?php

    add_action( ‘after_setup_theme’, ‘mlgma_theme_setup’,9);

    function mlgma_theme_setup(){

    /* Add custom filters.

    /* add_filter( ‘pre_get_posts’, ‘include_events_on_home’ );
    /* function include_events_on_home( $query ) {
    /* if ( is_home() && false == $query->query_vars[‘suppress_filters’] )
    /* $query->set( ‘post_type’, array( ‘post’, ‘tribe_events’, ‘attachment’ ) );
    /* return $query;
    /* }
    */

    add_filter( ‘pre_get_posts’, ‘mlgma_my_get_posts’ );
    function mlgma_my_get_posts( $query ) {
    if ( is_home() && false == $query->query_vars[‘suppress_filters’] )
    $query->set( ‘post_type’, array( ‘post’, ‘Newsletter’, ‘attachment’ ) );
    return $query;
    }
    }
    ?>’

    Thread Starter fr0gger03

    (@fr0gger03)

    Thanks Rob. I can confirm the default slug is still ‘events’, and changing the template and resting permalinks has no effect.

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