Support Forum

Possible to add custom tabs to profile?

NA Nate
Nate
Member

I’m installing a shopping cart plugin that comes with an order history page and a page for the customer to re-download their purchases. I would really like to add these two pages to SimplePress’ profile page. Is this possible?

If not it would be an awesome feature so you could add custom tabs to the profile and use shortcodes from other plugins or custom pages to display inside the profile.

3 Answers

New Answer

YS Yellow Swordfish
Yellow Swordfish
Member

Well… it IS possible to add panels and menus to the profile. But, of course, there is coding involved in doing so. But the hooks are there if you are feeling like giving it a go… We can point them out to you.

NA Nate
Nate
Member

Yea that’d be great to be pointed in the right direction, thanks.

YS Yellow Swordfish
Yellow Swordfish
Member

Well – I always think the best way to learn is by example so let’s start with an easy one. The ‘Watches’ Simple:Press plugin adds a single panel to the profile form so might be good place to start.

Look at the Watches plugin and find the file /library/sp-watches-components.php

The first two functions in this file are (1) for updating the panel – which may not be appropriate in your requirement… and (2) for adding the tab and menu to the panel.

In the file /forms/sp-watches-manage-form.php

You will find the code for the actual panel display. Of course – again – yours may be easier. I know you mentioned shortcodes but I they coild not be used here – at least I do not think so. it would almost certainly need to be template tags/function calls.

If you trace the above functions back you will find the hooks that they are assigned to… These will be defined in the sp-watches-plugin.php file in the root folder of the plugin.