I'm using get_post(post_id)
to get post_title
and post_content
. I would like to concatenate them, that post_title
will become first paragraph in new string.
Eg.
$post_title = 'Hi all, welcome here'
$post_content = 'lorem ipsum bla bla la
new paragraph bla bla bla
new paragrapg lorem ipsum'
And I expect result like this:
Hi all, welcome here
lorem ipsum bla bla la
new paragraph bla bla bla
new paragrapg lorem ipsum
But I don't know how to pass new paragraph character after post_title
. In db view (mysql) there are no tags only spaces or hidden charecters. I was trying:
$new_string = $post_title.'/r/n'.$post_content
$new_string = '<p>'.$post_title.'</p>'.$post_content
But it won't work.
After this operation I would like to use apply_filters('the_content', $new_content)
to get right view of this new string and send it to facebook fanpage using facebook SDK.