ncdk
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: create a profile page for users?So, i’ll create ex: page-company.php and then create a page in the backend using this template – Lets cal this “company” ?
I my list, then I would create a link like: Link to company profile page – However, this still leaves me with a rather “ugly” link ?
When a visitor click the link, then they would be redrected to https://mydomain.com/companies/company?userid=XXX – And then you would use the RewriteAPI for getting a pretty URL like: https://mydomain.com?companies/company/companyname ?? But how will you replace ?userid=XXX with the companyname?
So when linking to the profilepage from the list would I then create a link like so: Link to profilepage
Then how would I fetch the ID of the company on the page template, as I cant get the id from the querystring? ARGH, im confused ?? ??
Im pretty new to the WordPress API, and never touched rewrited rules before, so im completely lost on how my setup should/would be for achieving what I want…
Could you provide a small example perhaps? That would make me a really happy camper ??
Forum: Fixing WordPress
In reply to: create a profile page for users?Hmm, not quite. The users is actually companies, and therefore should not be custom post types…
As mentioned, i need to list all users (Already haves this) – And then each company needs to have a link to their own profile page (frontend, NOT backend), which should contain information about the “user/company”…
I thought about using the “author.php”, however it’s not authors I need, but actual registered users(companies) in the system…
I guess, from the listview i would have a link like: https://mydomain.com/companies?id=XXXX and then create a custom page that gets the id and make a query to the database after this user…. However, then I dont get the “pretty” URL structure like so: https://mydomain.com/companies/companyname
Really hope someone can help…
- This reply was modified 8 years, 1 month ago by ncdk.