Insert page content into another page with a changed variable
Question
I’m trying to use this simple code to insert page (1) content into another page (2):
<?php
$id = 216;
$p = get_page($id);
echo apply_filters('the_content', $p->post_content);
?>
So far so good. The inserted page (1), though, is some html code that at one point contains
value="<?php echo $url?>"
Is there any way I can edit the value of that variable in the code above, i.e. in page (2)?
Thank you!
0
pages, php, variables
4 years
2020-02-27T08:38:28-05:00
2020-02-27T08:38:28-05:00 0 Answers
67 views
0
Leave an answer