WordPress.org

Ready to get started?Download WordPress

Forums

External Videos
external-videos plugin breaks navigation (4 posts)

  1. godsdead
    Member
    Posted 3 years ago #

    Hey there, i have a working theme that i created from scratch that's valid and works cross browser, as soon as i activate this plugin and visit a page from one of the imported youtube videos, my menu dissapears, its there in the source code.
    This is so frustrating as im past a deadline and thought i found a decent plugin to import youtube videos and tags.

    If i deactivate the plugin the navigation comes back..

    This is a static version of the website (Nothing wordpress on this version)
    http://mediasmoke.com/clients/packtv_static/

    So you can see the structure of a working version.

    Thanks in advance.

  2. silviapfeiffer1
    Member
    Plugin Author

    Posted 3 years ago #

    Hi godsdead,

    I don't really know where that may come from. My plugin only creates the content to the page. Maybe there is something in the bowels of WordPress that says that for new post types the layout is different and it ignores menu themes. I'd have to really dig into this to find it.

  3. ncpolicywatch
    Member
    Posted 3 years ago #

    Are the pages without menus the ones with the loop in it? Do the static pages have menus? if that's the case, then...

    Add 'nav_menu_item' like below to the external-videos.php file at around line 130. Should get your menu back. Worked for me...

    // FIX for getting the custom post type posts when querying for posts with a certain tag
    add_filter('pre_get_posts', 'query_post_type');
    function query_post_type($query) {
        if(is_category() || is_tag()) {
            $post_type = get_query_var('post_type');
            if($post_type)
                $post_type = $post_type;
            else
                $post_type = array('nav_menu_item','post','videos');
            $query->set('post_type',$post_type);
            return $query;
        }
    }
  4. silviapfeiffer1
    Member
    Plugin Author

    Posted 2 years ago #

    I added bug fix to query_post_type contributed by Chris Jean, which should fix this problem.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic