• Jonny MacEachern

    (@jonnymaceachern)


    For example, if this were my page structure:

    Food
    		Vegetables
    		Dairy
    		Fruits
    			Apples
    			Bananas
    			Kiwis
    			Oranges
    	Sports
    		Hockey
    		Baseball
    		Football
    	Entertainment
    		Movies
    		TV
    		Podcasts

    … and I was on the *Oranges* page, it would display this:

    Food
    		Vegetables
    		Dairy
    		Fruits
    			Apples
    			Bananas
    			Kiwis
    			> Oranges
    	Sports
    	Entertainment

    I’m attempting to use wp_list_pages() and its child_of parameter, but it appears to only accept an integer rather than array so I can’t just pass what is returned of get_ancestors($post->ID, 'page').

  • The topic ‘How can I list the current pages siblings and any ancestor page siblings?’ is closed to new replies.