Pass ID with pretty permalink
-
I am trying to figure out a way to pass an ID from one page to another.
My current permalink structure is https://site/sample-post/
echo '<td class = "column1"> <a href = "update.php?id=' . $obj->ID . '">' . $obj->ID . $obj->firstName . '</a></td>';
I am trying to pass the $obj->ID to the next page so that it can load the correct information pertaining to that entry. The code above is the old way I did it before moving it to wordpress.
I’ve tried loading all the ID’s to an array. It worked, but I could not figure out how to call the correct item from the array on the next page. I’m trying to figure out mod rewrite, but am unsure how to use it or make it work for this kind of situation. I also tried url_to_postid, but that did not work like I thought it would.
- The topic ‘Pass ID with pretty permalink’ is closed to new replies.