• Hello,

    Have a look at this bit of code;

    function getImage($num) {
    global $more;
    $more = 1;
    $link = get_permalink();
    $content = get_the_content();
    $count = substr_count($content, ‘<img’);
    $start = 0;

    How do I change this $link = get_permalink(); so that it doesnt link the image to the permalink, but instead links to the URL that I type when the picture is uploaded in a new post.

    This isnt all the code; what it does is it gets the first image in a post.

  • The topic ‘Get image URL not permalink’ is closed to new replies.