Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter a_ahmed

    (@a_ahmed)

    Well I couldn’t wait for slow support on here.

    I just implemented this myself

    // parse postlink and title
    		$cross_post_title = preg_replace('/!TITLE!/', $post->post_title, $cross_post_title);
    		$cross_post_content = preg_replace('/!IMAGE!/', '[img]' . wp_get_attachment_url(get_post_thumbnail_id($post->ID)) . '[/img]', $cross_post_content);
    		$cross_post_content = preg_replace('/!BEGINLINK!(.*)!ENDLINK!/', '[url=' . $post->guid . ']$1[/url]', $cross_post_content);
    		$cross_post_content = preg_replace('/!TITLE!/', $post->post_title, $cross_post_content);

    Notice my addition. !IMAGE! is now replaced with the post thumbnail

    You just have to fiddle with the settings

    So in my case when I post I now have:

    !BEGINLINK!!TITLE!!ENDLINK!
    !IMAGE!

    Discuss the above published news/article bellow:

    ??

    Plugin Author Markus Echterhoff

    (@mechter)

    This is how you do it.

    where you paste above coding let me know please

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘The default content of cross posts (have post feature image/thumbnail included)’ is closed to new replies.