I would like to make a list of my pages, but display them without indentation. I need them to look like there is no difference between child and parent pages.
I was looking all over and I can’t find anything…
Thank you
-Vlad
<ul class="topmenu">
<li><a href="<?php echo get_settings('home'); ?>"><?php _e('HEm'); ?></a></li>
<?php wp_list_pages('sort_column=id&depth=1&title_li='); ?>
<li><a href="<?php bloginfo('rss2_url'); ?>"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/rss.gif" alt="rssfeed" /></a></li>
</ul>
Can someone tell me what this line means? sort_column=id&depth=1&title_li=
I know its something about the order of the menus pages.
/ thanks
]]>I’ve read the codex and found this coding:
<?php wp_list_pages('exclude=7,13,26,35' ); ?>
If I’m understanding correctly, that will show just pages I want. However, I have no idea where to put this code. Please help.
— I did try using the “private” setting, but that hides the page itself from my readers.
]]><select>
menu) with a list of pages from the current hierarchy level. At present I’ve got it in an unordered list using list_pages (see https://is.quotebox.org/sports/football/villarreal/ ) but can’t seem to utilise that function to create a select dropdown menu instead.
The code I’m currently utilising can be found here:
https://pastebin.com/ZmRYRdgS
Is there any way for the code list_pages generates to be changed, to output option tags instead of the usual li tags, and to strip out any other unnecessary classes?
Thanks
]]>I’m trying to create a simple image based page navigation that consists out of
– the page title
– the image attached to the page
and that looped for all the children of a page.
But I just can’t figure it out.
What I have so far is:
<?php
echo '
<ul>';
// Get a list of pages
$children = get_children('post_type=page&post_parent=26');
// Loop over each page
foreach ($children as $child) {
// Get the attached image url
$thumbnail = wp_get_attachment_url($post->ID);
// Print to screen
echo '<li class="page_item page-item-'. $child->ID .'"><a>ID .'" href="?page_id='. $child->ID .'"><img src="'. $thumbnail .'">'. $child->post_title .'</a>';
}
echo '</ul>
';
?>
Anybody any thoughts?
]]>I would like to make a line break after each page in my navigation.
Now its like:
HOME PAGE 01 PAGE 02
would like to make it:
HOME
PAGE 01
PAGE 02
This is the default code:
<?php wp_list_pages(‘hide_empty=0&title_li=’); ?>
Oh… it really would be awesome if I could also type the vertical distance spacing..
]]>– Apples
– Red
– Green
– Blue
– Orange
– Bananas
On Apples, I want to show the first-level children as subnav (Red and Green).
On Red, I want to show its siblings (Green). It should not show its children (Blue and Orange).
Is there a way to specify this? Essentially, if it is top-level, show children. If it’s a child page, show siblings (do not show additional children).
]]>I need a different structure like another user asked yet on this forum in a different topic ( https://www.ads-software.com/support/topic/sidebar-menu-show-only-parent-pages-and-children-of-current-parent?replies=2 ) .
I need this structure with the list of all pages, the “mother page” that when is clicked shows her subpages like this site: https://www.nbr.eu/de/Lieferprogramm/Uebersicht (it isn’t a wp site).
All the function in wordpress codex about list_pages shows the list of subpages only when we are in parent page and not showing the other pages of the menu…
I hope to be clear…Please help me, if there is some hack! Is very important!
Thank you
]]>I would like to ask how I can get to make the wp_list_pages give the current page the “current_page_item” class when it’s requested twice.
I have a menu in the header section of the site but also in the Sidebar.
Now In the first wp_list_pages request it is actually highlighted because of the class current_page_item. But when I wp_list_pages it again it doesn’t give a current page class…
Any1?
Greeting,
Rick Lamers
I would like to hide some page links for guests visiting my page. The pages itself is alredy hidden thanks to the plugin “member acess”. But the links is still visible in the menu.
I belive the code below would work for me. But I’m looking for a plugin that can do the same thing. Would be a lot easier for me to maintain the site then.
<ul>
<?php if ( $user_ID ) : ?>
<?php wp_list_pages('depth=1&title_li=&exclude=' ); ?>
<?php else : ?>
<?php wp_list_pages('depth=1&title_li=&exclude=5' ); ?>
<?php endif; ?>
</ul>
Appreciate any help.
]]>