What is the correct method for updating post content from a plugin?

This type of thing is most easily done from the TinyMCE editor through a plugin. Details of creating one using WordPress filters can be found here: http://codex.wordpress.org/TinyMCE_Custom_Buttons function myplugin_addbuttons() { // Don’t bother doing this stuff if the current user lacks permissions if ( ! current_user_can(‘edit_posts’) && ! current_user_can(‘edit_pages’) ) return; // Add only in … Read more

jquery: getting contents of #content field on post page

The div #editorcontainer contains a regular textarea #content and an iframe #content_ifr. The #content is filled with the saved contents of the post when the page loads. This means that any live edits of the content won’t be returned when calling jQuery(“#content”).html(). For the same reason, you get an empty string in the case of … Read more

WordPress br in content problem

Switch to the HTML editor and you’ll be able to see all of your page markup. You likely have an unclosed tag or extra line return somewhere in the content, so the visual editor adds additional markup to clean that up.

How can I define the RSS feed content length?

I usualy make a RSS feed in my template. Just copy the RSS feed you have in the wp-include/feed-rss2.php Step two is registering it instead of the original: // override feeds function own_rss( $for_comments ) { //it is in my theme/feed/rss2.php $rss_template = get_stylesheet_directory() . ‘/feed/rss2.php’; if( file_exists( $rss_template ) ) { load_template( $rss_template ); … Read more

How can I add more code to this?

To insert new code you need to break php code and past your new html+/-php code. But pay attention that after passing all will have correct syntax. Your question should be made like this: <?php $my_query = new WP_Query( “cat=11&posts_per_page=1” ); if ( $my_query->have_posts() ) { while ( $my_query->have_posts() ) { $my_query->the_post(); ?> <h2><a href=”https://wordpress.stackexchange.com/questions/53008/<?php … Read more

Content in footer file

There are a couple of ways this can be achieved. You can create a theme option for the area. I used this as a theme option starter when I built a theme recently: Sample theme options Or You can simply create a widget area for the footer http://codex.wordpress.org/Widgetizing_Themes