• Hi!

    I’m trying to use wp_list_pages like this:

    <?php wp_list_pages(‘depth=0’); ?>

    But the result I am given is a ul list of all pages in my site but the level 0 pages don’t have a title in the list. I can see it’s getting the right classes and even the link but the title is not there. What could I be doing wrong?

    It looks like this:
    https://prnt.sc/lwisug

Viewing 1 replies (of 1 total)
  • @joelalexandersson – The parameter depth=0 is the default and could be left out of the line of code. You might want to look at swapping it out for title_li="" instead to ensure/force the list to be correctly coded with a wrapping ul element.

    What I would suggest looking at is the page source to see if the actual page titles exist and/or if they are being hidden by some unexpected CSS on the site.

    A link to the site where this is happening can also be useful in helping you troubleshoot this issue.

    ~Cais.

Viewing 1 replies (of 1 total)
  • The topic ‘Problem with wp_list_pages not not displaying titles’ is closed to new replies.