[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1218
  • Last Modified:

remove href from wp_list_pages

i am trying to remove a hyperlink from wp_list_pages, but only from the first ul in the heirachy. i want the sub pages to be displayed as links and the first level to be text. is it possible to do this with the wp_list_pages function? doesnt matter how this is achieved, it just needs to be dynamic. thanks for your help
<!-- generated list output-->
<ul id="nav2">
<li class="page_item page-item-74"><a href="http://www.ericksonblog.com/ericksonresident/anns-choice/community" title="Community">Community</a><!--make community plain text no link-->
<ul>
	<li class="page_item page-item-87"><a href="http://www.ericksonblog.com/ericksonresident/anns-choice/community/activities" title="Activities">Activities</a></li>
	<li class="page_item page-item-101"><a href="http://www.ericksonblog.com/ericksonresident/anns-choice/community/campus-map" title="Campus Map">Campus Map</a></li>
	<li class="page_item page-item-99"><a href="http://www.ericksonblog.com/ericksonresident/anns-choice/community/dining" title="Dining">Dining</a></li>
	<li class="page_item page-item-79"><a href="http://www.ericksonblog.com/ericksonresident/anns-choice/community/transportation" title="Transportation">Transportation</a></li>
</ul>
</li>
<li class="page_item page-item-108"><a href="http://www.ericksonblog.com/ericksonresident/anns-choice/information" title="Information">Information</a><!--make information plain text no link and so on...-->
<ul>
	<li class="page_item page-item-112"><a href="http://www.ericksonblog.com/ericksonresident/anns-choice/information/newsletters" title="Newsletters">Newsletters</a></li>
	<li class="page_item page-item-110"><a href="http://www.ericksonblog.com/ericksonresident/anns-choice/information/tv-listings" title="T.V. Listings">T.V. Listings</a></li>
</ul>
</li>
<li class="page_item page-item-104"><a href="http://www.ericksonblog.com/ericksonresident/anns-choice/services" title="Services">Services</a>
 
<ul>
      <li class="page_item page-item-106"><a href="http://www.ericksonblog.com/ericksonresident/anns-choice/services/resident-computer-services" title="Resident Computer Services">Resident Computer Services</a></li>
</ul>
</li>
</ul>

Open in new window

0
thtate
Asked:
thtate
  • 2
1 Solution
 
thtateAuthor Commented:
Great! Just what i was looking for, thanks!
0
 
dosthCommented:
thanks for the point
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now