• hello guys, iam trying to create a videos section in my site for that iam using youtube url to get title and other attributes from the data api.
    All works fine but my permalink link shows up like this.

    http://localhost/wordpress/videos/httpwww-youtube-comwatchvcqsydhql5s0/

    iam using the title field for entering url.
    i know this sounds silly!..but what i need is that i did like to use the youtube title which can be generated using a php code below.

    <?php
        $vidID = the_title();
        $url = "http://gdata.youtube.com/feeds/api/videos/". $vidID;
        $doc = new DOMDocument;
        $doc->load($url);
        $title = $doc->getElementsByTagName("title")->item(0)->nodeValue;
    ?>

    how pass the ‘$title’ value to the permalink. on clicking the publish button.
    or
    is their any other way to implement my idea..

    As my videos are unlisted iam using this technique or is their any other solution to achieve this…?

  • The topic ‘youtube video title in the_permalink’ is closed to new replies.