Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter ncdk

    (@ncdk)

    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 http://mydomain.com/companies/company?userid=XXX – And then you would use the RewriteAPI for getting a pretty URL like: http://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 🙂

    • This reply was modified 9 years, 2 months ago by ncdk.
    • This reply was modified 9 years, 2 months ago by ncdk.
    Thread Starter ncdk

    (@ncdk)

    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: http://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: http://mydomain.com/companies/companyname

    Really hope someone can help…

    • This reply was modified 9 years, 2 months ago by ncdk.
Viewing 2 replies - 1 through 2 (of 2 total)