With the child post forms this will be different. If you add a link to the child post form then the child post form will be generated in its own content template.
Is there a way I could create a content template, which isn't assigned to a post type (to keep my elementor template intact) and attach my dashboard header to the content template page, allowing a user to edit the information within their dashboard instead of directly from the elementor page?
What was the dashboard header created in Elementor ? If so then this won't be possible to do. You either create your Page templates with Elementor or Toolset.
Or does a content template need to be assigned to a post type for it to work correctly?
Unless it is a template that is holding an edit for or part of a view then yes it will need to be assign to a post for it to show up on the frontend.
Using the partner ID and then having a $_GET function, inserting the link into a view and then using a shortcode to output the form onto a dashboard.
This allows me to edit a customer in a seperate page.
However, the link shows on every page, apart from the page the author actually owns.
So, If I own 1 post, I can go onto any post and click the edit post link and it'll edit the post I own.
Navigating to the post I actually own and the link is not showing.
Please take a look at the screenshots;
Screenshot 1 + 2 shows the view.
Screenshot 3 shows 'any' player page, other than 'my' page, that I am the author.
Screenshot 4 shows what happens when I click on the Edit profile link on 'any' player page, other than 'my' page, that I am the author.
(which is correct)
Screenshot 5 shows 'my' page, that I am the author.
Now, I want this exact scenario to happen, but I would rather it be flipped around, so that the link shows for the author on the pages he/she owns, but not on every page I don't own.
What I will do if you make the next reply private is give you access to the website and attach a player profile to you.
By doing this, you will see that you can't view your own edit link, but clicking on anybody else's edit link allows you to edit your own player profile.
I made a few changes to your view as well as your Elementor template so your edit link should now be appearing on the respective user's page.
The reason why it didn't appear was because this setting was enabled "Don't include current page in query result". I went ahead and disabled this on your view.
I also moved the conditional statement outside of the view itself and wrapped the view shortcode with the conditional statement.
Please check on the site and let me know if the results are ok now.
Thank you Shane, it seems I didn't look closely at the options in the view!
It now works perfectly.
I have 1 last question, if a person owns 2 pages (player profiles)
I've given myself (stephen blood) the 'Hazo' player profile, as well as my 'steblood' player profile.
If I click on the edit link for Hazo now, it will allow me to edit, Hazo. However, if I navigate to steblood and click the edit link, it still links to Hazo.
I assume it only recognises the 'last' profile I became an author for?
Is this intended?
Is there a way I am able to allow users multiple user profiles whilst being able to edit them or am I limited to just the 1?
So with the view set as it is now you will only see one edit profile link. However this is because in the Limit and Offset settings for your view you've set it to only 1. So the latest profile will be displayed.
If you remove the limit it will produce an edit profile link for any number of profile the user has.
So my next question is, if I want to allow 1 single link on each profile to edit just 'that' 1 profile, but for the time being show only the edit link on the profiles that the logged in user owns, how would I do that?
As you can see in the screenshot, I now have 2 edit links, each one shows to a different profile, however, I want 1 link per page, linking to 'that' page.
If I have 2 user profiles, I want to link to the profile where the view shows, rather than a different link showing on every profile for each profile I own.
Yes this is possible. What you will need to do is to add a query filter for the Post ID to your view and then set it to get the ID from the shortcode attribute.
In your Elementor template you will see that i've added the shortcode itself to the view.
So you will modify it now by adding the attribute that you've set in the Post ID filter on your view.
You final result example would look like this.
[wpv-view name='my-view' ids='[wpv-post-id]']
The [wpv-post-id] shortcode will pass the ID of the current profile page into the view so it will display the edit link for that respective profile.