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

Add default content to post (for specific category)

default_content runs when a post is loaded into the editor, actually. You can check for categories when the post is saved, but you’d want the save_post hook, probably. You want to check the $_REQUEST global. add_filter( ‘default_content’, ‘my_editor_content’ ); function my_editor_content( $content ) { global $_REQUEST; if (isset($_REQUEST[‘post_category’]) && in_array($some_category_id,$_REQUEST[‘post_category’])) { $content = “My html … Read more

Built-in Method to Extract Embedded Video from Content

It looks like the closest you get is in the WP-Embed class: autoembed( $content ); It says it extracts urls which are on distinct lines (like you’d put a url in for embedding it), but it then passes it to WP_Embed::shortcode(). Not quite what you want. You could dig into WP_Embed::shortcode() to see if you … Read more

Retrieve page content and pass to PHP?

the_content does echo the content. That is stated in the Codex– “Displays the contents of the current post”, emphasis mine. Use get_the_content instead, to return a string that you can manipulate. Be aware that get_the_content does not run all of the same filter as the_content. Again from the Codex: If you use plugins that filter … Read more