Skip Navigation

[Resolved] List not appearing in alphabetical order

This thread is resolved. Here is a description of the problem and solution.

Problem: I have set up a View in wp-admin to be ordered by a custom field value, but when I display the View on the front-end it's not sorted as expected.

Solution: Check the View shortcode to confirm there are no overriding settings. If any order or orderby settings are included in the View, remove them.

This support ticket is created 5 years, 10 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 2 replies, has 2 voices.

Last updated by CommMgr 5 years, 10 months ago.

Assisted by: Christian Cox.

Author
Posts
#1190582
LSW_exhibitor_list_alpha_order.JPG

Using Toolset and Views, I have created an Exhibitor List. Everything is working except the exhibitors are not listed alphabetically (see screenshot for reference). They are listed in the order that I input them.

On the View setup, in Ordering, I have the Order by as "Field - EXHIBITOR FULL NAME" and Ascending.

Thank you for your assistance,
CommMgr

For reference, here is my view code:

[wpv-post-body view_template="conference template"][wpv-layout-start]
	[wpv-items-found] 
<table style="margin-bottom: 0;" width="100%" cellspacing="0" cellpadding="0" border="0">
		<tbody class="wpv-loop js-wpv-loop">
          <tr>
          <td style="border-style: solid none solid; border-top: none; border-bottom: thin solid #bfbfbf; font-size: 16px; line-height: 1.3em; padding-left: 10px;" width="67%" valign="middle" align="left">EXHIBITORS (as of 01/24/19)</td>
<td style="border-style: none none solid; border-top: none; border-bottom: thin solid #bfbfbf; font-size: 16px; line-height: 1.3em" width="22%" valign="middle" align="center">AGENCY</td>
<td style="border-style: none none solid; border-top: none; border-bottom: thin solid #bfbfbf; font-size: 16px;" width="11%" valign="middle" align="center">BOOTH</td>
</tr>
          	<!-- wpv-loop-start -->
          		<wpv-loop>     
		<tr>
			<td style="padding: 5px 0; border-top: none; border-bottom: thin solid #bfbfbf; font-size: 16px; line-height: 1.3em; padding-left: 10px;" valign="middle" align="left"><a href="[types field="web-site-url" raw="true"][/types]" target="_blank">[types field="exhibitor-full-name"][/types]</a></td>
				<td style="padding: 5px 0; border-top: none; border-bottom: thin solid #bfbfbf; font-size: 16px; line-height: 1.3em; text-align: center;" valign="middle" align="center">[types field='california-lighting-sales' state="checked"]<a href="<em><u>hidden link</u></em>" target="blank"><img class="alignnone size-full" style="vertical-align: middle;" src="<em><u>hidden link</u></em>" alt="CLS" width="auto" height="30" /></a>[/types][types field='california-lighting-sales' state="unchecked"][/types][types field='dsa-lighting' state="checked"]<a href="<em><u>hidden link</u></em>" target="blank"><img class="alignnone size-full" style="vertical-align: middle;" src="<em><u>hidden link</u></em>" alt="DSA" width="auto" height="30" /></a>[/types][types field='dsa-lighting' state="unchecked"][/types][types field='forman-and-associates' state="checked"]<a href="<em><u>hidden link</u></em>" target="blank"><img class="alignnone size-full" style="vertical-align: middle;" src="<em><u>hidden link</u></em>" alt="FA" width="auto" height="30" /></a>[/types][types field='forman-and-associates' state="unchecked"][/types][types field='light' state="checked"]<a href="<em><u>hidden link</u></em>" target="blank"><img class="alignnone size-full" style="vertical-align: middle;" src="<em><u>hidden link</u></em>" alt="L" width="auto" height="30" /></a>[/types][types field='light' state="unchecked"][/types][types field='performance-lighting-systems' state="checked"]<a href="<em><u>hidden link</u></em>" target="blank"><img class="alignnone size-full" style="vertical-align: middle;" src="<em><u>hidden link</u></em>" alt="PLS" width="auto" height="30" /></a>[/types][types field='performance-lighting-systems' state="unchecked"][/types][types field='plp-socal' state="checked"]<a href="<em><u>hidden link</u></em>" target="blank"><img class="alignnone size-full" style="vertical-align: middle;" src="<em><u>hidden link</u></em>" alt="PLP" width="auto" height="30" /></a>[/types][types field='plp-socal' state="unchecked"][/types][types field='total-lighting-concepts' state="checked"]<a href="<em><u>hidden link</u></em>" target="blank"><img class="alignnone size-full" style="vertical-align: middle;" src="<em><u>hidden link</u></em>" alt="TLC" width="auto" height="30" /></a>[/types][types field='total-lighting-concepts' state="unchecked"][/types]</td>
				<td style="padding: 5px 0; border-top: none; border-bottom: thin solid #bfbfbf; font-size: 16px; line-height: 1.3em;" width="11%" valign="middle" align="center">[wpv-conditional if="( $(wpcf-booth-number) ne '' )"][types field="booth-number"][/types][/wpv-conditional]</td>
			</tr>
	</wpv-loop>	<!-- wpv-loop-end -->
		</tbody>
	</table>

	[/wpv-items-found]
[wpv-layout-end]
#1190626
Screen Shot 2019-01-24 at 12.29.18 PM.png

Hi, it's possible that an "orderby" option was applied to the View shortcode, which can override the settings you choose in the View editor screen. See the attached screenshot. Please check where you inserted the View and look for the "orderby" option in the shortcode, for example:

[wpv-view name="your-view-name" orderby="title"]

If the orderby attribute is there, remove it. If not, try the following troubleshooting steps:
- Temporarily deactivate all other plugins except Types and Views.
- Activate a default theme like Twenty Nineteen, and test again.
- If the problem is resolved, reactivate your theme and other plugins one by one until the problem returns.
- If the problem is not resolved, I'll need to take a closer look.

#1190639

Hi, Christian...

Thank you for your quick reply.

This was the View code that was inserted on the page:

{!{wpv-view name='exhibitor-list-los-angeles' orderby='exhibitor-full-name' order='asc'}!}

I removed the "orderby" and "order" from the code and my list is alphabetizing now.

Thank you so very much for this help. Glad it was an easy fix.
CommMgr