WordPress.org

Ready to get started?Download WordPress

Forums

Confused with Permalinks (3 posts)

  1. hgfischer
    Member
    Posted 8 years ago #

    Hello,

    I'm developing an picture/image/photo professional gallery for WordPress and need some help to better understand the permalinks mechanism.

    I want to make the following permalinks for my plugin, but I'm getting no success:

    /images/ -> index.php?chpage=images
    /image/image_file.jpg -> /index.php?image=image_file.jpg

    /albums/ -> index.php?chpage=albums
    /album/album_name/ -> /index.php?album=album_name

    /subjects/ -> index.php?chpage=subjects
    /subject/subject_name/ -> /index.php?subject=subject_name/

    I tryed to understand the Codex docs and tryed some tests without success. The online docs is a little confusing.

    Can you give me some example on how to do a complete rewrite support in a plugin? What actions or filters I need to define?

  2. Check out the mod_rewrite_rules filter:

    http://codex.wordpress.org/Plugin_API#Current_hooks_for_filters

    add_filter('mod_rewrite_rules', 'your_function');

  3. galbeed
    Member
    Posted 8 years ago #

    add_filter('mod_rewrite_rules', 'your_function');

Topic Closed

This topic has been closed to new replies.

About this Topic