Opened 8 years ago

Closed 7 years ago

Last modified 8 months ago

#81 closed enhancement (fixed)

page peers

Reported by: indi@… Owned by: mcnicks
Priority: normal Component: page-tools
Severity: normal 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 8 years ago.
Update to page-tools.php, including sibling functions at bottom of file

Download all attachments as: .zip

Change History (6)

comment:1 Changed 8 years ago by skreak

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.

Changed 8 years ago by skreak

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

comment:2 Changed 7 years ago by mcnicks

  • 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 Changed 2 years ago by boonebgorges

In [382918]:

Adds group Doc count to group tab. Fixes #81

comment:4 Changed 9 months ago by qurl

In [591091]:


fixed #75: Add Custom Taxonomy to Posts
fixed #81: Re-introduce individual Custom Post Types support


comment:5 Changed 8 months ago by sushkov

In [610116]:

Leave 2 slashed for backwards compatibility. Fixes #81

Note: See TracTickets for help on using tickets.