Skip to:
Content
Pages
Categories
Search
Top
Bottom

sub-directory

  • Hello,

    I’m from Germany – so forgive me my mistakes in the English language 🙂

    I want to add a custom “animals” directory. (/animals) There should be a loop which shows all animals in my directory. When I click on one animal, there should be a specify info’s about this animal (/animals/mouse). It’s like the member directory.

    I’ve installed the buddypress-skeleton-component and modified it so in the navigation bar now there is a link to the animals directory. There is a loop which shows all animals, but I don’t know how to modify my php-code that buddypress knows there is a loop and a single page. Can you help me?

    If you don’t understand I will try to explain it another way.
    Greets from Germany

Viewing 4 replies - 1 through 4 (of 4 total)
  • It would probably help if you explain just exactly what these ‘Animals’ are in terms of WP or BP data, are they BP data  why are you coding this into the bp api structure and not simply creating a  ? CPT or category listing.

    I cant write an answer

    H’mm sorry, I have some problems with the forum Software 🙁
    If I write an text with php inside it says:

    `ERROR: Your reply cannot be created at this time.`

    I added it into buddypress because I added a few subpages and other bp-stuff into the buddypress-member directory
    Does this answers your question?

    ok,

    now I’ve got the following situation:
    `/animals => loop.php
    /animals?animal=ID => single.php`

    It works. I things is not the best way, but I didn’t found a better way.

    I just want to make

    `/animals => loop.php
    /animals/ID-NAME => single.php or /animals/ID => single.php`

    I’ve tried

    `add_rewrite_rule(
    ‘animals/([^/]+)-([0-9]{1-10})?$’,
    ‘index.php?animal=$matches[1]&animal_id=$matches[2]’,
    ‘top’
    );
    flush_rewrite_rules();`
    But this doesen’t work.

    I’ve search for hours but I didn’t found an answer. So how should I do this ?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘sub-directory’ is closed to new replies.
Skip to toolbar