You shouldn’t inject postinfo()
in the <head>
section (that’s what happens when you use the wp_head
hook).
If you do not want to edit templates, I’d suggest you use the wp_footer
hook instead, and append the postinfo to your header div with jQuery, e.g.:
$('.post-info').appendTo('#header');
Related Posts:
- How do I save JS classes being applied to the WP dashboard via custom plugin?
- How to add an admin notice upon post save/update
- Keyboard shortcut for updating a page or post?
- Passing current cookies in wp_remote_get to get Draft Post Preview
- Ajax Load More Posts in Category Page
- Listen to Post action
- Get the current post ID as a variable in Javascript
- How to create WP Editor using javascript
- Manipulate post category after time
- Dynamically update post title in admin page
- WooCommerce – Create Products Programatically [closed]
- Add javascript when post is published
- Get post from custom REST endpoint in Gutenberg
- which action to hook to in order to perform post-publish action
- Cannot access current post’s ID in custom plugin
- Set number of article per number of page
- How to change post status from publish to draft using hook in wordpress?
- prevent showing posts of an specific category in admin posts section
- Add confirmation popup on “Move to Trash”
- Using radio button meta data from a custom meta box
- Create a separate JS application for an individual post?
- Convert a complex webpage into WP theme
- Add scripts on custom post add/edit pages Not Working
- How to store an extra (surrogate) ID when creating a post with wp_insert_post?
- Injecting JavaScript into a Post with WP3.x
- Global $post not working in OOP function WordPress
- How can I get a post field value using javascript?
- Define a wordpress constant through plugin functions?
- Custom post preview without saving
- How to get post bulk edit action trigger and get edited post ids?
- Block Editor: Reset Reusable Blocks to last saved record
- updating a post doesn’t trigger a function
- Hide a specific category in admin All Posts page (WordPress)
- Ajaxify This Code
- Prevent Delete Attachment by URL or When Submit
- What hook do you use to update a post?
- Updating post data on save (save_post vs wp_insert_post_data)
- Integrate OpenStreetMap on WordPress
- Redirect to another page using contact form 7? [closed]
- Only show a Post once in 10 visits
- What happens if I delete all the rows that represents a post revision from the posts table into WordPress database?
- In post.php how can I remove onbeforeunload?
- Navigate through the posts using keyboard arrows
- Filter Hook for post table (not columns)
- why str_replace targeting pages instead just targeting post?
- Call current post URL in ajax
- Get author posts count after excluding a category
- Stop post submission without losing data?
- Cant’ Grab WordPress Built-in Posts Through Loop
- Get content from WordPress posts in Boostrap modal window – Javascript side?
- How can my plugin display a populated new post window
- search content of pages and list in wp-admin
- Finding a post’s slug
- Open a wordpress single post in a lightbox without the header and footer
- WordPress as CMS: How to manage/handle images assigned to a post as full-sized background images in a slideshow?
- Using the loop to set locations for all posts on a single google map
- Insert JavaScript in a blog post or a new page?
- Why is it recommended to insert JS through the theme, plugin, etc rather than in the post directly?
- WordPress React re-rendering to many times
- Post form – AJAX won’t upload featured image – Plugin development
- WordPress: Develop multiple posts with different data
- Ajax post doesnt call succes after got the response
- Blog Post slider not working
- Colorbox not working on native WordPress gallery when gallery is loaded thru AJAX
- testing result of $.post with json_encode
- How do I change the post title’s link on the posts page?
- Loading posts outside wordpress
- Update user meta when post published no working
- Fixing the WP Post Object for Custom Route
- Front end post delete error confirmation and success message
- Export Posts with specific custom fields by sql
- Custom plugin to get related posts by category
- Hide the contents for specific post
- Error 404 blog/page/2/
- How to hide a script ( an ad) from a specific post? [closed]
- Onclick open posts displayed in slider in a popup [closed]
- WP Rest API feature image breaking react component
- How can I add a custom caclulation form in post?
- Implement AJAX ‘load more’ with offset posts
- Gutenberg block: add a multi-select for posts
- Setting up navigation links for posts (first, prev, next, last)
- Bulk unpublish posts between specific dates (e.g. from April 2017 and earlier)?
- Getting a 404 error when clicking edit page
- How can I remove posts of a certain category from homepage after a specified time period?
- Posts page only shows one post
- Diplay comment date on WP_Post_Comments_List_Table
- Count total number across post types
- Why is my javascript not invoked in my hooks except wp_head?
- Automatic value for custom fields for posts
- Enable post revisions for a specific post
- How do I find which articles are missing a featured image in The WordPress database?
- Related posts loop based on tags AND categories doesn’t work without at least one tag assigned
- WordPress’ visual editor messing up my (nested) lists (and other things as well)
- How to generate numbers indistinguishable for the IDs of the posts
- Is there any way to allow users to access content before it’s published?
- Select a random post from a specific category?
- Encrypt / Decrypt Post Title and Details
- Disabled wp-cron, set up system cron but still have missed schedule posts
- Get Posts via Taxonomy Term Name with Space
- Loop through all product posts?