WordPress.org

Ready to get started?Download WordPress

Forums

Custom Page Parameters (6 posts)

  1. Dazzer
    Member
    Posted 6 years ago #

    I have a page called 'artworks'

    http://domain.com/artworks/

    Now I want to pass it a parameter, with nice permalinks and it will change accordingly. So what I have done now is alter the .htaccess by putting in an extra IfModule above the wordpress rules.

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /test/wordpress/
    # RewriteRule artworks/([^/.]+)$ artworks/$1/ [R]
    # RewriteRule artworks/([^/.]+)/?$ artworks/?a=$1 [L]
    </IfModule>

    However, that doesn't work, as the result is

    http://domain.com/artworks/somestring/

    Which is what I want, but wordpress interprets that as a subpage and gives me a 404. Which surprises me because I thought it would interpret ?a=somestring.

    Also, if the result is

    http://domain.com/artworks/somenumber/

    I can actually get the data via $_GET['a'], which gives me a number. But again, I don't really want to have some random number in the URL.

    Does anyone have a workaround for this? Would be most helpful, thanks. I don't really want to do this

    http://domain.com/artworks/?a=somestring

    As it doesn't fit in with the rest of the permalinks in the site.

    Thanks again
    Daz

  2. Dazzer
    Member
    Posted 6 years ago #

    Bump: so no ideas then...

  3. lonewolfonline
    Member
    Posted 6 years ago #

    I am after exactly the same feature as you my friend.

    If anybody knows how to do this we would both be grateful. In the mean time I'm gonna continue working into the night...

    Regards

  4. van Weerd
    Member
    Posted 6 years ago #

    I am having the same issue, I put my money on this thread: http://wordpress.org/support/topic/149100?replies=4

    another thingy I found (but have not tried yet) here: http://beradrian.wordpress.com/2007/07/19/passing-post-parameters-with-ajax/

  5. pedro501
    Member
    Posted 6 years ago #

    I am also having this problem. I need to send data from one page to the next and using $_GET would be most helpful if it worked...

  6. Top Cat
    Member
    Posted 5 years ago #

    Looks like nobody needs that functionality.

    Here's a finding about posts, not pages:
    http://wordpress.org/support/topic/154294?replies=10

Topic Closed

This topic has been closed to new replies.

About this Topic