Viewing 5 replies - 1 through 5 (of 5 total)
  • this happens not because of this plugin.

    this happens because this plugin uses custom post type.

    to see your videos in feed you need to access it like this:

    https://www.ads-software.com/feed/?post_type=videos

    (replace www.ads-software.com with your domain).

    Thread Starter mdix

    (@mdix)

    Hi CodeJack,

    thanks for your reply.

    Sadly you got me wrong, I assume because my description was somewhat unclear. I’m not talking about a rss-feed, I’m talking about the main page of my blog where all blog posts are shown. When I add a video post, it doesn’t show up there (just like any other post).

    Thanks for your help and kind regards
    Marc

    Plugin Author AlexRayan

    (@alexrayan)

    Hi Marc,

    CodeJack was right regarding the custom post types. It is the reason why the posts don’t show on the front page when the blog page set to “Latest Posts”.

    Please, add this to your functions.php:

    add_filter( 'pre_get_posts', 'custom_post_types_get_posts' );
    function custom_post_types_get_posts( $query ) {
            if ( is_home() && $query->is_main_query()||is_feed() ){
            $query->set( 'post_type', array( 'post', 'videos' ) );
            }
    	return $query;
    }

    This filter will add custom post types to the default WordPress query on the front home page.
    You can add as many custom post types this way as you want. Just specify them in the same array with ‘post’, ‘page’ and ‘videos’ in case you have more custom post types in your theme or with other plugins.

    Best regards,
    Alex

    mediakliq

    (@mediakliq)

    I’m having the same problem post are not showing up in the post section or on the author.php page I added

    add_filter( 'pre_get_posts', 'custom_post_types_get_posts' );
    function custom_post_types_get_posts( $query ) {
            if ( is_home() && $query->is_main_query()||is_feed() ){
            $query->set( 'post_type', array( 'post', 'videos' ) );
            }
    	return $query;
    }

    To themes function.php Pressgrid theme as suggested I can see on single post but not on all post

    This theme uses post formats video, image, quote, status and post_types ‘post’ ‘slider’ ‘any’ don’t know if this helps but theme loops like:

    <div class="mansonry-container">
                            <!-- Start Featured Article --><?php
                                            $isBlog = true;
                                            $query = 'post_type=post';
                            if (have_posts ()) the_post();
    
                            rewind_posts();
                            get_template_part('loop'); ?>
                            <!-- End Featured Article -->
                        </div>

    [Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]

    Thanks

    Plugin Author AlexRayan

    (@alexrayan)

    Hi Mediakliq,

    Sorry for delay with response.

    This condition checks for the home page with the main query or the feed page ( if ( is_home() && $query->is_main_query()||is_feed() ) ).
    What page are you having issues with?

    Also, based on the query condition that you pasted from your theme, it is filtered by “post” post_type ($query = ‘post_type=post’;).
    You can fix this particular query by adding the “videos” post type in the query params as well:

    $query = array(
            'post_type=>array(
                 'post',
                 'videos'
            )
    );

    or possibly:
    $query = 'post_type=post,videos';
    (gotta double check that one, don’t remember by heart)

    Please let me know if it helps.

    Best regards,
    Alex

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Videos not showing up in feed’ is closed to new replies.