WordPress.org

Plugin Directory

page-tools

Opened 12 years ago

Closed 11 years ago

Last modified 18 months ago

#81 closed enhancement (fixed)

page peers

Reported by: indi@… Owned by: mcnicks
Priority: normal Severity: normal
Plugin: page-tools Keywords: page peers
Cc:

Description

I'd like to display the Page Peers as well as the internal anchors. That is, it would be cool to display everything that is on the same level as the post you're reading.

For example for,

About
-Interests
--Monkeys
--Goats
--Pigs

It would be ideal if someone reading 'Monkeys' would also see links to 'Goats' and 'Pigs'.

Plugin is great, I think your tags should be part of the source.

Attachments (1)

page-tools.php (8.3 KB) - added by skreak 12 years ago.
Update to page-tools.php, including sibling functions at bottom of file

Download all attachments as: .zip

Change History (9)

comment:1 @skreak12 years ago

I have written a function which will display the previous or next siblings of a given page. I'll attach the updated code.

To display it you use code similar to the following:

<table width="100%"><tr><td width="50%" align="left">
     <?php echo page_get_sibling('prev', 'Previous: '); ?>
   </td><td align="right">
     <?php echo page_get_sibling('next', 'Next: '); ?>
</td></tr></table>

...I tried to email this to David, but couldn't find a valid email address for him. David, if you're there mail me back at NOtimSpam@….

The code is pretty straightforward; I've added it to the bottom of page-tools.php (attached). You can see it in action at my nascent blog, ex at the bottom of this page:

http://skreak.com/wp/?page_id=5

The functions are pretty rudimentary right now, but I have plans to improve them in various ways.

@skreak12 years ago

Update to page-tools.php, including sibling functions at bottom of file

comment:2 @mcnicks11 years ago

  • Resolution set to fixed
  • Status changed from new to closed

I have added a simple page_get_siblings() function to version 0.2b. I don't want to make the plugin too complicated but I will have a go at integrating your next / previous stuff if I get time during the holidays.

Cheers,
David

comment:3 @boonebgorges6 years ago

In [382918]:

Error: Failed to load processor CommitTicketReference
No macro or processor named 'CommitTicketReference' found

comment:4 @qurl4 years ago

In [591091]:

Error: Failed to load processor CommitTicketReference
No macro or processor named 'CommitTicketReference' found

comment:5 @sushkov4 years ago

In [610116]:

Error: Failed to load processor CommitTicketReference
No macro or processor named 'CommitTicketReference' found

comment:6 @jewlofthelotus2 years ago

In 1013929:

Error: Failed to load processor CommitTicketReference
No macro or processor named 'CommitTicketReference' found

comment:7 @githubsync18 months ago

In 1175989:

Error: Failed to load processor CommitTicketReference
No macro or processor named 'CommitTicketReference' found

comment:8 @githubsync18 months ago

In 1180701:

Error: Failed to load processor CommitTicketReference
No macro or processor named 'CommitTicketReference' found
Note: See TracTickets for help on using tickets.