WordPress.org

Making WordPress.org

Opened 4 years ago

Closed 3 years ago

#1548 closed enhancement (fixed)

New style docs pages don't have any in-page navigation

Reported by: theMikeD Owned by: DrewAPicture
Milestone: Priority: normal
Component: Developer Hub Keywords: has-patch
Cc:

Description

The current page for get_posts https://codex.wordpress.org/Template_Tags/get_posts has an in-page navigation to make finding what you want easier. I don't see this functionality in the new-style pages. Is this by design?

Attachments (3)

Screen Shot 2016-01-29 at 9.15.27 AM.png (47.6 KB) - added by theMikeD 4 years ago.
get_posts in-page navigation block
1548.diff (3.0 KB) - added by DrewAPicture 3 years ago.
1548.2.diff (3.8 KB) - added by DrewAPicture 3 years ago.
get_explanation_field() wrapper

Download all attachments as: .zip

Change History (10)

@theMikeD
4 years ago

get_posts in-page navigation block

#1 @samuelsidler
4 years ago

  • Component changed from General to developer.wordpress.org

This ticket was mentioned in Slack in #meta-devhub by sam. View the logs.


4 years ago

#3 @DrewAPicture
4 years ago

  • Owner set to DrewAPicture
  • Status changed from new to accepted
  • Type changed from defect to enhancement

Hi @theMikeD, thanks for the suggestion. I'm actually working on a proof of concept for this very thing right now! I was waiting until I had an MVP to create a ticket but you beat me to it :-)

Not all references are going to be as complete as some of the larger ones (like get_posts() or WP_Query, etc.), so my best suggestion and approach is going to make it possible to selectively enable a ToC for the explanations module (also known as the "More Information" section in a particular reference.

Over the holidays, I did a ton of work converting the WP_Query docs from the Codex to something we could use on DevHub, and with a Table of Contents, that reference page would look something like this: http://cl.ly/1D2V2Z2z392i

#4 @theMikeD
4 years ago

That looks great! I'd love to help if I can, even if it's just proofing. But if we could abstract that somehow that would be really good. How can I help?

@DrewAPicture
3 years ago

#5 @DrewAPicture
3 years ago

  • Keywords has-patch added

1548.diff implements the Handbooks table of contents functionality for the "More Information" sections on all four parsed post types.

Spoke with @coffee2code in person about it and we think this is the best first-step. It might later be worth looking at injecting the other sections (currently output as <section> tags) into the TOC logic to include them.

@DrewAPicture
3 years ago

get_explanation_field() wrapper

#6 @DrewAPicture
3 years ago

1548.2.diff Incorporates further feedback from @coffee2code to handle the post content filtering inside of get_explanation_field() instead of within the template.

#7 @coffee2code
3 years ago

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

In 3563:

developer.wordpress.org: Implement Handbooks table of contents functionality for the "More Information" sections of parsed post types.

Props DrewAPicture.
Fixes #1548.

Note: See TracTickets for help on using tickets.