Virtual Pages plugins

I’m the author of that plugin and I can confirm there was an issue. It was in the GM\VirtualPages\TemplateLoader::init(); method. Issue was caused by an untested switch from array_merge to wp_parse_args. They are similar, but I would have to inverse order of arguments moving from one to the other. Shame on me. I fixed that … Read more

Populating a page with content from post custom fields

I suggest using shortcode, as this’ll easily allow you embed the song list anywhere in your content, in any page or post. UPDATE: I got a little carried away, and ended up with this! function song_list_shortcode( $attrs ) { $r = ( object )wp_parse_args( $attrs, array( ‘format’ => ‘%post_title – %link’, ‘link’ => ‘%song_key_name’, ‘key’ … Read more

Enqueuing Script in functions.php vs on the page

Go with functions.php. Use the wp_enqueue_scripts action to call this function, or admin_enqueue_scripts to call it on the admin side. Calling it outside of an action can lead to problems. See #11526 for details. Source: http://codex.wordpress.org/Function_Reference/wp_enqueue_script function themename_load_js() { if ( is_admin() ) { return; } if is_page( 123) { // Replace 123 with your … Read more