Question

This might be a beginner question, for disclaimer I'm just getting used to the WordPress templating system:

I have a purchased theme installed on my working WordPress site, looking great sofar, was relatively easy to setup.

I installed a plugin for members functionality (Ultimate Member), then I wanted to list a group of members I created in the design with the following shortcode:

[ultimatemember form_id="xxxx"]

It displays a list of my members, fine, but in some kind of default design (header/footer, other contents are ok, like the template, I can put stuff before or after the generated list, but the member's thumb and info are not exactly as it needs to be as per client's requests)

On the other hand, my template's "Meet the Team" page which I intend to use is only a combination of "Mikado Team" elements in the page editor, where I can input team member informations right away, in text format.

How do I implement Ultimate Member's listing to a template like that? In my imagination that would be like setting the specific datas assigned to design parts, like I have on the "Meet the Team" template page:

[mkdf_team team_name="Jane Doe" ... etc data settings]

How do I set the datas to be as the member list of Ultimate Member?

The only thing I could think of is modifying the "members-grid.php" file as it controls how Ultimate Member displays those lists, but I'm sure there's an easier solution for this. :)

Was it helpful?

Solution 2

I was able to solve this by installing a plugin called Custom Content Shortcode then using a code snippet like this right from the page editor:

[raw]
   [users role=um_custom_role_1]
      [pass user_fields=fullname]
         [mkdf_team team_name="{FULLNAME}" ... etc data settings]
      [/pass]
   [/users]
[/raw]

Where:

  • [raw] is just a code wrapper for formatting issues (did not work properly without it)
  • [users role=um_custom_role_1] is the loop of members of my custom role (which I created with Ultimate Member plugin)
  • [pass user_fields=fullname] is a wrapper for the member's data pull (several options for these are available in Custom Content Shortcode's plugin settings panel/documentation, it's quite neat and handy)
  • [mkdf_team team_name="{FULLNAME}" ... etc data settings] is the theme's shortcode for the team members list, and for this example snippet the user's full name is displayed in the field accordingly (from here, anything you pass can be displayed as individual data in the markup, parameters are listed in the documentary, but it's basically like handy variables for the loop, therefore easier to implement in the design as you wish to do)

Voilá! :)

And I didn't even use a single line of php.

(No offense, but I think we have better things to do than hard coding templates into plugin php files xD by the way it's easier to manage future theme changes, you just modify this snippet without going trhough the trouble of modifying php files)

I hope this made sense and someone with similar issues might find this useful in their cases. Cheers. ;)

OTHER TIPS

I am guessing your are talking about customizing the look of the output from the shortcode to match the design of the page better is that correct? If so then I would style it using Firebug and CSS.

Licensed under: CC-BY-SA with attribution
Not affiliated with wordpress.stackexchange
scroll top