* **/ function wittyplex_list_child_pages() { global $post; if ( is_page() && $post->post_parent ) $childpages = wp_list_pages( 'sort_column=menu_order&title_li=&child_of=' . $post->post_parent . '&echo=0' ); else $childpages = wp_list_pages( 'sort_column=menu_order&title_li=&child_of=' . $post->ID . '&echo=0' ); if ( $childpages ) { $string = '
'; } return $string; } add_shortcode('list_childpages', 'wittyplex_list_child_pages'); /** * Shortcode: Display Buttons * * Code: [button style="large yellow" icon="fa-file-text-o" width="200px" link="http://www.google.com" title="Link Title"] * * or * **/ function wittyplex_adding_custom_button($atts, $content = null) { extract(shortcode_atts(array( 'title' => 'Button Title', 'link' => '#', 'style' => 'normal yallow', 'width' => 'inherit', 'icon' => ' ', ), $atts)); return ' '; } add_shortcode('button', 'wittyplex_adding_custom_button'); /** * Shortcode: Display Texts * * Code: [content style="normal gray" size="12px" font="Raleway" text="Text here"] * * or * **/ function wittyplex_adding_custom_text_style($atts, $content = null) { extract(shortcode_atts(array( 'text' => 'Button Title', 'style' => 'gray', 'size' => 'inherit', 'font' => 'inherit', ), $atts)); return '