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 ?