How to get unmodified post content?
It seems that the original content is unmodified if I access it like this: echo $post->post_content; And I do not save the post in the editor and do not use the visual editor. This is using WordPress 5.4.2.
It seems that the original content is unmodified if I access it like this: echo $post->post_content; And I do not save the post in the editor and do not use the visual editor. This is using WordPress 5.4.2.
Add a HTML Widget to your footer and place the content in there. WordPress Admin > Appearance > Widgets. I’ve just tested with the following JavaScript snippet and this works as expected. <script type=”text/javascript”> console.log(‘Hello World’) </script>
How to use multiple (or array) values in $content of shortcode?
Well, if you don’t want to use two pages, then you have two options – load content via AJAX, or use javascript to hide some of the content (for example imperial units related content). Second option is much more easier in my opinion, but it may slow down your page, so it’s not recommended when … Read more
Related post not showing table of content
My website is showing today’s date instead of published date since db migration to a new wordpress
WordPress Guternberg Content For React Native
Upgrading to WP 5+ with block content – Export & Import Page Content
Multisite – Cloning CPT pages + content (including ACF Flexible Content) from site to site
If someone stumbles upon same issue I found a way to achieve what I wanted (I hope someone is helped by this). This is my solution: getEditedPostContent() contains the temporary post (modified) content: let old_content=””; if ($(‘textarea#content’).length >0) { old_content = $(‘textarea#content’).html(); } else { //”Gutenburg” style (>=WP 5.8) old_content = wp.data.select( ‘core/editor’ ).getCurrentPost().content; if … Read more