WordPress.org

Forums

Display Widgets
Show page parents in checkbox label (1 post)

  1. gabeshaughnessy
    Member
    Posted 2 years ago #

    Our site uses child (and grandchild) pages that have identical titles. The only way of distinguishing one child page from another when the titles match is by looking at their page parent.
    As a result, the page checkbox labels are difficult for us to use as is - there is no way of telling which child page we are selecting.
    To fix this, I modified display-widgets.php at line 140 and added this code:

    if($page->post_parent){
    	        $parent = get_page($page->post_parent);
            }
            if($parent->post_parent){
    	        $grandparent = get_page($parent->post_parent);
            }
            if($parent->post_parent){
    	        echo $grandparent->post_title. ' - ';
            }
            if($page->post_parent){
    	        echo $parent->post_title. ' - ';
            }

    This will be gone if we update the plugin. I wonder if there is a way to get this included in the next release?

    http://wordpress.org/extend/plugins/display-widgets/

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Display Widgets
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

  • RSS feed for this topic
  • Started 2 years ago by gabeshaughnessy
  • This topic is not resolved
  • WordPress version: 3.3.2

Tags

No tags yet.