I think this is fine. But better do it like-
jQuery('div.entry-content').append('<div class="my-div"></div>');
Cause the $ sign doesn’t work some time with WordPress. Better if you wrap your jQuery code with this below code-
(function( $ ) {
'use strict';
// Write your jQuery code here.
// And here you can use $ or jQuery as your wish.
})( jQuery );
Now about jQuery method, you can also use after() or insertAfter() to add something after the article tag.
Related Posts:
- Pass PHP variable to javascript
- Handling jQuery Component Collision
- Is dynamic forms/entries possible in Widget?
- Custom plugin giving: wp-admin/admin-ajax.php 400 (Bad Request)
- Editor not displaying dynamically after clicking on the button
- How to fetch serialized data from wordpress options
- Why is my ajax call refreshing the page?
- How do I use WordPress PHP functions in my Javascript code?
- Admin-ajax.php is dying “0” without processing function
- Get image URL from media library in input
- How to create popup same as wordpress popup feature
- Only execute jQuery function(on document ready) on the page has shortcode from plugin [duplicate]
- jQuery function didn’t work in my plugin
- Handling jQuery Component Collision
- Check if email address exists front end with AJAX in a plugin
- Best approach to fetch data from wp options to js file or php file
- Ajax contact form widget plugin data not insert in database
- jQuery for custom plugin not working with Divi theme
- How to prevent plugins from loading jQuery
- Create shortcode to echo javascript
- How to add a dvi tag to a shortcode then change a generated text using jQuery
- Save user total active time after login in wordpress [closed]
- How do I make sure that my plugin only runs on article detail pages?
- jQuery code didn’t run on my plugin
- The Events Calendar Plugin – List View Background Colour Issue [closed]
- Ajax request sends url rather than data
- Adding a jQuery modal dialog to the admin area
- Pass PHP variable to javascript
- wc_get_template_part doesnt display the content [duplicate]
- How to properly enqueue jQuery knob on WordPress without conflict?
- update_post_meta is not working for me when I use e.preventDefault for update button
- WordPress Ajax request “Failed to load resource: the server responded with a status of 400 ()”
- WordPress Thickbox Navigation Issue in Gallery
- Dynamic input fields in WordPress Plugin
- Overwrite js code using WP_Footer
- Not displaying Woocommerce product page in lightbox
- Custom plugin giving: wp-admin/admin-ajax.php 400 (Bad Request)
- Overwriting Plugin’s Ajax callback function from theme
- Storing Array of values into wordpress options
- Can’t find variable is_single in my jQuery plugin
- Javascript in plugin not working
- How to Add Jquery FullCalendar in wp plugin in admin
- WordPress ajax not working in registration
- How to add jquery to my custom post type wp plugin
- Ajax, jQuery and WordPress
- How to get site homepage from plugin?
- get_option include in my adsense
- Ajax in Plugins: returns the whole page
- Load css classes after using ajax calls
- Integrating WordPress Content into a jQuery Slider
- Jquery post responses 500 error after some time and lastly an 503 error
- Woocommerce attatch files and custom input meta to cart items and then to order
- Ajax response from Media Selection does not update ALL information more than once
- How to get the permanent link in a plugin?
- Duplicate results are displayed in a custom plugin [closed]
- Disable Individual Plugins (specifically in Custom Post Types) on a per-post basis?
- How to get all posts belongs to a user between a certain date
- wp-load.php redeclares classes
- Plugin main file is constantly been fired on every website visit
- Where should custom post types be registered in a plugin?
- output html on post or page from custom plugin [closed]
- Change the number of plugins counted on wp-admin/plugins.php
- plugin uninstall function drop the tables, but shows errors on admin
- How to use template inside plugin shortcode with variables for big HTML code
- WordPress Object Oriented plugin development [closed]
- Way to send multiple values for column to MySQL?
- What’s the right way to implement functions in footer.php
- Do rewrites added with add_rewrite_rule() persist after plugin deletion?
- How can i list random author?
- Our plugin tags not appearing in WordPress Plugin Repository
- Make get_permalink() work outside the Loop using filters
- How to get values from network settings panel?
- Pluging with content for a specific page or post
- Does WordPress do any internal caching if no plugin installed?
- WordPress Plugin- How to Insert Html&JS code in specific Page and specific Div
- Conditional delete metadata does not works
- Upload Image with a file URL and show dynamically on Frontend
- How can i solve php upgrade problem
- The function called on the wp head hook becomes null
- custom post type get_posts() function not work
- Create multiple posts when a custom post is created
- Hide button after form submit and save state to localstorage
- how override a define
- myStickymenu hide on scroll up to certain Y values
- submit form data to wordpress existing database table using my plugin
- Prefix of $wpdb does not worked and does not displayed
- Get content and send to 3rd party
- Theme Load Error
- WordPress plugin ajax post parameter
- WordPress plugin not eching popular posts
- My first plugin doesn’t save the data in options
- Breadcrumb is not generating the correct post page url
- SOLVED – $wp_admin_bar and AJAX calls
- Animate like Stack exchange frequently asked questions [closed]
- Outputting custom field query from a plugin to the website header
- How to load plugin static data from cloudfront
- The Best Multilanguage Plugin supporting the FSE [closed]
- warning wp session
- Google Books Lookup & Auto FIll
- WP_Query does not return the result even if the data is present in the database