WordPress.org

Ready to get started?Download WordPress

Forums

WORDPRESS VIDEO GALLERY
[resolved] how to show category name on browser title (7 posts)

  1. hoa.buiduy
    Member
    Posted 7 months ago #

    Hi,
    How can I show the category name on browser title instead "Video Categories" title.

    Thanks

    http://wordpress.org/plugins/contus-video-gallery/

  2. karthikeyani
    Member
    Posted 7 months ago #

    Hi,

    I have checked your site and found that the category name is displaying as a page title in your site. Please refer http://screencast.com/t/WctrmfSp and check and let us know if you are still facing any difficulties.

  3. hoa.buiduy
    Member
    Posted 7 months ago #

    Hi,
    Could you guide me where in your code do that?

    Thanks.

  4. karthikeyani
    Member
    Posted 6 months ago #

    Hi,

    Please open \wp-content\plugins\contus-video-gallery\hdflvvideoshare.php and add the below code after the code add_action('wp_enqueue_scripts', 'videogallery_cssJs'); and check.

    add_filter( 'wp_title', 'add_category_title', 20 );
    function add_category_title() {
        global $wpdb,$wp_query;
        $playid = filter_input(INPUT_GET, 'playid');
        $videoID = url_to_custompostid(get_permalink());
        if (isset($_GET['p'])) {
            $videoID = intval($_GET['p']);
        }
        $playlist_name = &$wp_query->query_vars["playlist_name"];
        if (!empty($playlist_name)) {
            $playid = get_playlist_id($playlist_name);
        }
        if (!empty($videoID)) {
           return $videoname = $wpdb->get_var("SELECT name FROM " . $wpdb->prefix . "hdflvvideoshare WHERE slug='" . intval($videoID) . "'");
        } else if(!empty($playid)){
            $playlist_name = $wpdb->get_var("SELECT playlist_name FROM " . $wpdb->prefix . "hdflvvideoshare_playlist WHERE pid='" . intval($playid) . "'");
            return $playlist_name;
        }
    }

    If you are still facing any difficulties in this, feel free to contact us.

  5. hoa.buiduy
    Member
    Posted 4 months ago #

    Hi,
    I changed the code above. But, when i click on a category. My website show category page with many other categories.
    Please help me fix the bug.

    Thanks

  6. karthikeyani
    Member
    Posted 4 months ago #

    Hi,

    I have checked your site and the categories are working fine. Please refer http://screencast.com/t/d5zC3UhcOB. Please note that when you click "Video Categories" link, then it will display all the categories with the corresponding videos. But when you click particular category link, then only it will display the exact category videos.

  7. hoa.buiduy
    Member
    Posted 4 months ago #

    Hi,
    I fixed it.

    Remove the "&" character before $wp_query->query_vars["playlist_name"]

    Thanks

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.