'post_content' => $thepagecontent ends up insert after variable
-
Hi,
When i’m trying to indert content in a post, with a variable, the first one ends up inserting a return in the database for the reason, which make the code non-exploitable.$thepagecontent = '<img src="'.$affiche.'" /><img src="https://img.youtube.com/vi/'.$youtube.'/hqdefault.jpg" />'; $my_post = array( 'post_title' => $thetitle." ".$fulltitle, 'post_status' => 'publish', 'post_author' => 1, 'post_category' => array( $cat_id), 'post_content' => $thepagecontent ); $post_id = wp_insert_post( $my_post )
As a result, the youtube image shows up, not the affiche one
<img src="https://fr.web.img1.acsta.net/pictures/14/11/14/11/08/371396.jpg "/><img src="https://img.youtube.com/vi/S7jE27USh68/hqdefault.jpg" />
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘'post_content' => $thepagecontent ends up insert after variable’ is closed to new replies.