How to use wp_update_post with ajax on frontend

hmmm…. I don’t see a problem with your code. When I run into 500, it’s usually due to permissions or htaccess mis-routing the request. That said, some things to try: 1) in wp-config.php, set debug WP_DEBUG to true. This may offer a more descriptive error message. 2) WordPress has good integration for AJAX. You can … Read more

Dynamic WordPress editor in meta box

The problem is that the wp_editor() automatic load the scripts and this is not possible dynamic. You must enhance your plugin, code and add the scripts also dynamic or via ajax. WP include the scripts and styles via wp_enqueue_script() and this is not usable in a dynamic change of DOM, it was registered for better … Read more

JQuery Issues With WordPress Theme Interface

toscho…you were partly correct but helped immensely. Turns out the issue seems to lie within the theme’s attempt at calling up the scripts. My WP install is in a subfolder (/wp/) and it was looking for the wp-include scripts in the root folder. All other aspects of the site work fine, so I assume this … Read more

Insert a Featured Video

No, it is not possible as-written in core. the_post_thumbnail() uses the ID of the attachment post-type that has been selected as the featured image for the post, then outputs the image associated with that attachment post-type. You would have to filter the_post_thumbnail() in some manner, but your question specified “without a Plugin”.

Adding Widgets to Masonry Layouts Correctly – jQuery &&|| PHP

Figured it out! Here’s the get_posts method to add a widget (or any content into a masonry layout at the “$counts” number you define) <div class=”arrange”> <?php $args = array( ‘posts_per_page’ => 10000, ‘offset’ => 5, ‘orderby’ => ‘post_date’, ‘order’ => ‘DESC’, ‘exclude’ => ‘none’, // ‘post_type’ => array(‘post’, ‘page’, ‘video_type’, ‘review_type’ ), ‘post_status’ => … Read more

Is there some jQuery conflict here?

If I click on the large button on the bottom of your page (the one in your first screenshot), then your page is called with the parameter ?paged=2. If I call your page directly with this parameter, I got the following JS error TypeError: $ is not a function From the source of your page: … Read more

Problem adding MP3 attachments to a jPlayer playlist

Have a look at wp_localize_script for passing php data to javascript. A pseudo-code example: $tracks = array(); foreach( $mp3_attachments as $mp3_attachment ): $tracks[] = array( ‘mp3’ => $mp3_attachment[‘filename’], ‘title’ => $mp3_attachment[‘title’] ); endforeach; $wpa_track_data = array( ‘tracks’ => $tracks ); wp_enqueue_script( ‘wpa_script’, get_template_directory_uri() . ‘/js/yourscript.js’ ); wp_localize_script( ‘wpa_script’, ‘wpa_data’, $wpa_track_data ); Then in your js … Read more