WordPress.org

Ready to get started?Download WordPress

Forums

Page Attachment Permalink Structure based on Menu Order? (1 post)

  1. Travis Tubbs
    Member
    Posted 1 year ago #

    I've been on a quest for the past couple of days reading up on Rewrite in WordPress but still can't seem to figure out how to accomplish this.

    When using pretty links in WordPress, media attached to a page forms a URL like:

    http://www.domain.com/page_name/attachment_name/
    http://www.domain.com/page_name/page_name/attachment_name/
    http://www.domain.com/page_name/page_name/.../attachment_name/

    What I would like to do is create a permalink structure based on the order in which the images are attached to the page. For example:

    http://www.domain.com/page_name/menu_order/
    http://www.domain.com/page_name/page_name/menu_order/
    http://www.domain.com/page_name/page_name/.../menu_order/

    where menu_order is the number in which the image is ordered.

    From what I understand, the way permalinks work in WordPress is that it reads the URL and then translates that to its original query (in this case, index.php?attachment_id=ID). And then from there, it pulls whatever information needs to display.

    Any suggestions as to how I could accomplish this? Links to posts that might guide me in what I need to do? Thanks in advance.

Topic Closed

This topic has been closed to new replies.

About this Topic