Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Gecka

    (@gecka)

    Can you explain your setup a bit more?

    Do have defined a custom menu ? What shortcode do you use with witch parmeters?

    Thread Starter goodcall

    (@goodcall)

    I just need to render af bullit list in the current page, og the current page child pages.
    Do you have an explanation on how to get that right?

    /Brian

    Plugin Author Gecka

    (@gecka)

    You should first understand that gecka submenu, can render a list of child items of menu items defined in a custom menu (under appearance > menu)

    If you want to render the child pages of current page just use the wp_list_pages function.

    Something like this could do the trick:

    function gecka_subpages( $atts ) {
    
        $defaults = array('title_li'=> '', 'child_of' => $GLOBALS['post']->ID);
    	$atts = shortcode_atts( $defaults, $atts );
    
        $atts['echo'] = 0;
    
    	return wp_list_pages($atts);
    }
    add_shortcode( 'subpages', 'gecka_subpages' );

    Then use the subpages shortcode using any argument from wp_list_pages documentation page


    Gecka
    We helped you? Say thanks

    Thread Starter goodcall

    (@goodcall)

    Cool thanks.

    Plugin Author Gecka

    (@gecka)

    Did that work for you?


    Gecka
    We helped you? Say thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: Gecka Submenu] Shortcodes wont work’ is closed to new replies.