* **/ 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 '
'.$title.'
'; } 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 '
'.$text.'
'; } add_shortcode('content', 'wittyplex_adding_custom_text_style'); /** * Shortcode: Display SVG Buttons * * Code: [svg_button text1="Click to" text2="Contact Us" text1_size="14px" text2_size="23px" text1_style="gray" text2_style="yellow" link="http://www.google.com" target="_blank"] * * or * **/ function wittyplex_adding_custom_svg_button($atts, $content = null) { extract(shortcode_atts(array( 'text1' => 'Click to', 'text2' => 'Contact Us', 'text1_size' => '16px', 'text2_size' => '23px', 'text1_style' => 'gray', 'text2_style' => 'yellow', 'link' => '#', 'target' => '_self', ), $atts)); return '

'.$text1.'

'.$text2.'

'; } add_shortcode('svg_button', 'wittyplex_adding_custom_svg_button');