Support

Home Forums Event Espresso Premium Ordering people with simple page ordering plugin

Ordering people with simple page ordering plugin

Posted: June 22, 2017 at 4:27 am

Viewing 12 reply threads


AlphaStar

June 22, 2017 at 4:27 am

Hello, I am trying to give an order to the people listing with “Simple Page Ordering” plugin. The plugin faq says “when you register the post type, set hierarchical to true – hierarchical post types natively order by menu order.” I could not find where to do this.
Also, I do not want to lose this change. Please let me know what to do with the child theme as well.
Thanks…


Josh

  • Support Staff

June 22, 2017 at 11:22 am

Hi there,

You can add the following to a site functions plugin:

https://github.com/eventespresso/ee-code-snippet-library/blob/master/addons/eea-people/jf_eea_people_archive_orderby_menu_order.php

More info about building a functions plugin here. When you add changes like these into their own plugin you will not lose your changes.


AlphaStar

June 22, 2017 at 7:50 pm

Thanks. I added this to the functions.php of the child theme, but it did not make any difference.

Should I really build a functions plugin or can it have been with the child theme’s functions.php file?

Thanks…


Tony

  • Support Staff

June 23, 2017 at 3:15 am

When you say makes no difference, to what? The front end?

The code enables the native WP route for the Espresso People post type, so you’ll see a ‘People’ section in the admin menu – http://take.ms/gurRv

From within there you can set the order for people to display on the /people/ archive list.


AlphaStar

June 23, 2017 at 3:18 am

I see it now.

I am sorry, I was looking at the Event Espresso’s People Admin page.

Thank you for your prompt help.


AlphaStar

June 23, 2017 at 3:19 am

But I don’t see any difference in the front end.


AlphaStar

June 23, 2017 at 3:22 am

And the add person page comes blank when I go through the new menu item.


Tony

  • Support Staff

June 23, 2017 at 3:26 am

But I don’t see any difference in the front end.

Can you link to the page you are viewing on the front end? I suspect your expecting something different from what the code allows for.

And the add person page comes blank when I go through the new menu item.

You add people through Event Espresso:

Event Espresso -> People Admin.

The ‘new’ People menu is the native WordPress route for the espresso_people type, you can not use that to add people, you can only use it to re-order them.


AlphaStar

June 23, 2017 at 3:29 am

I understand about the people adding issue. Thanks. Is there a way to forward this add person link to the event espresso’s people admin.

The link for the people listing is: https://alphastar.academy/people-type/instructor/

I see that the ordering is good for the https://alphastar.academy/people/ page but not for the people types.


Josh

  • Support Staff

June 23, 2017 at 1:33 pm

Is there a way to forward this add person link to the event espresso’s people admin.

No way that I’m aware of. I updated the snippet that removes the “Add new link from the native WP route.

I also updated the snippet so it includes the ordering for people type archives.

https://github.com/eventespresso/ee-code-snippet-library/blob/master/addons/eea-people/jf_eea_people_archive_orderby_menu_order.php


AlphaStar

June 24, 2017 at 5:41 am

Thanks, but when I put this snippet the site is not loading, it gives 500 error.


Tony

  • Support Staff

June 26, 2017 at 3:07 am

Line 25 needs an additional closing bracket:

https://github.com/eventespresso/ee-code-snippet-library/blob/master/addons/eea-people/jf_eea_people_archive_orderby_menu_order.php#L25

That should be:

is_tax( 'espresso_people_categories' ) ||

Edit – This has been fixed in the original code.

  • This reply was modified 7 years, 3 months ago by Tony.


AlphaStar

June 26, 2017 at 4:57 am

It worked now, thanks!

Viewing 12 reply threads

The support post ‘Ordering people with simple page ordering plugin’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso