add source from original post to tumblr photo (2 posts)

  1. dionte247
    Posted 4 years ago #

    Hey guys,

    i know this is simple php but i just cant seem to figure it out. All i want to do is post a picture in wordpress with just the title of the post and an image. But when it goes to tumblr i want the image to link back to the original wordpress post. I think it has something to do with $postlink? i think its around this part of the code im just not sure what the simple solution is...

    // Gather valid data for Tumblr post types.
            if ('photo' === $post_type) {
                $pattern = '/<img.*?src="(.*?)".*?\/?>/';
                $matches = array();
                preg_match($pattern, $post_body, $matches);
                $photo_source = $matches[1];
                $post_body = strip_only($post_body, '<img>');


  2. dionte247
    Posted 4 years ago #

    can this not be fixed?

    when i make a post, i automatically want it to feed the post url to the "Set a click-through link" in tumblr.

    so if i go into tumblr to edit the tumblr post it would have the link to the wp post in the
    "Clicking this photo links to the URL:"

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic


No tags yet.