Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
<?
// [insertar slug="contacto"]
function insertPage($atts) {
$output = NULL;
extract(shortcode_atts(array(
"slug" => ''
), $atts));
if (!empty($slug)) {
$page = get_page_by_path( $slug );
$output = apply_filters('the_content',$page->post_content);
}
return $output;
}
add_shortcode('insertar', 'insertPage');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment