How to parse any content which was added after the working out filter 'the_content'
How to parse any content which was added after the working out filter 'the_content'?
For example I have html structure of the simple page that i was created via Worpdress Admin Dashboard -> Pages -> Add New Page:
div id="content" class="site-content"
div class="wrap"
div id="primary" class="content-area"
main id="main" class="site-main" role="main"
article id="post-20" class="post-20 page type-page status-publish hentry"
header class="entry-header"
h1 class="entry-title"Some page/h1
span class="edit-link"
a class="post-edit-link" href="http://wp.loc/wp-admin/post.php?post=20amp;action=edit"Edit
span class="screen-reader-text" "Some page"/span
/a
/span
/header!-- .entry-header --
div class="entry-content"
/div!-- .entry-content --
/article!-- #post-## --
/main!-- #main --
/div!-- #primary --
/div!-- .wrap --
/div
After that with some code i add anything to the page.php of my theme. For example:
ul
liSome content after working out "the_content" filter/li
liSome text/li
liSome text/li
liSome text/li
liSome text/li
/ul
After that i get this page:
div id="content" class="site-content"
div class="wrap"
div id="primary" class="content-area"
main id="main" class="site-main" role="main"
article id="post-20" class="post-20 page type-page status-publish hentry"
header class="entry-header"
h1 class="entry-title"Some page/h1
span class="edit-link"
a class="post-edit-link" href="http://wp.loc/wp-admin/post.php?post=20amp;action=edit"Edit
span class="screen-reader-text" "Some page"/span
/a
/span
/header!-- .entry-header --
div class="entry-content"
/div!-- .entry-content --
/article!-- #post-## --
/main!-- #main --
/div!-- #primary --
/div!-- .wrap --
ul
liSome content after working out "the_content" filter/li
liSome text/li
liSome text/li
liSome text/li
liSome text/li
/ul
/div
So, when i call filter 'the_content' i get just this:
div id="content" class="site-content"
div class="wrap"
div id="primary" class="content-area"
main id="main" class="site-main" role="main"
article id="post-20" class="post-20 page type-page status-publish hentry"
header class="entry-header"
h1 class="entry-title"Some page/h1
span class="edit-link"
a class="post-edit-link" href="http://wp.loc/wp-admin/post.php?post=20amp;action=edit"Edit
span class="screen-reader-text" "Some page"/span
/a
/span
/header!-- .entry-header --
div class="entry-content"
/div!-- .entry-content --
/article!-- #post-## --
/main!-- #main --
/div!-- #primary --
/div!-- .wrap --
I need to concatenate $content and the content that was added after working out "the_content" filter. I think that i need to use Dom Parser for this. Any suggestions?
Topic parse the-content content Wordpress
Category Web