WordPress.org

Ready to get started?Download WordPress

Forums

Page-list
Add level classes to UL's (3 posts)

  1. urkekg
    Member
    Posted 1 year ago #

    Thanks for great plugin.

    I'm wondering is there simple way to add level class to ul tags. For example:

    <ul class="page-list subpages-page-list level-1">
    	<li class="page_item">list 1</li>
    	<li class="page_item">list 1
    		<ul class="children level-2">
    			<li class="page_item">list 2</li>
    			<li class="page_item">list 2</li>
    				<ul class="children level-3">
    					<li class="page_item">list 3</li>
    					<li class="page_item">list 3</li>
    					<li class="page_item">list 3</li>
    						<ul class="children level-4">
    							<li class="page_item">list 3</li>
    							<li class="page_item">list 3</li>
    							<li class="page_item">list 3</li>
    						</ul>
    					<li class="page_item">list 3</li>
    					<li class="page_item">list 3</li>
    				</ul>
    			<li class="page_item">list 2</li>
    		</ul>
    	</li>
    </ul>

    http://wordpress.org/extend/plugins/page-list/

  2. webvitaly
    Member
    Plugin Author

    Posted 1 year ago #

    There is no simple way to change the default classes in html.
    [pagelist] shortcode is based on wp_list_pages() function and you may search more about Walker class, maybe this will help you.

  3. urkekg
    Member
    Posted 1 year ago #

    Thanks webvitaly, I got this after I looked at P-L code. :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.