Hi I tried to improve the sequence in which Rentalhive displays the attributes when creating attributes and I installed a plugin called Post Types Order , Which destroyed my my HP attributes editing program All I have left is the name of the attribute and the display order. Has as anyone got some bright ideas how to fix this over and above doing a complete backup restore
It sounds like you’ll need to use a backup to restore the lost data. However, the good news is once you’ve done that; the order of attributes can be easily customised from the Edit page of the relevant attribute. Simply, update the Order number in the sidebar of the page and click Save.
If the attribute doesn’t get repositioned, try using a greater number between increments and/or applying a logical ordering sequence to your other attributes, as well.
I hope this helps!
PS: if you mean reordering the attributes on the submission form itself, this can be done but will require a code snippet.
Cheers,
Chris
Hi,
Could you please clarify where exactly you’d like to change the order of the attributes? A screenshot would be very helpful as well.
““If you mean reordering the attributes on the submission form itself, this can be done but will require a code snippet.””
That is exactly what I’m looking for.
If you could let me have such a snippet it would be much appreciated.
Kind regards Jean
You’ll need to adjust (and possibly extend) the snippet below to target the relevant attribute(s) that you’re looking to reposition.
(If you get stuck, you can reply with your preferred order of attributes that you would like, and each attribute’s slug name, if they’re custom attributes.)
The listing submission form and the listing edit form are two seperate forms, hence why there’s two snippets per attribute.
add_filter(
'hivepress/v1/forms/listing_submit',
function( $form ) {
$form['fields']['title']['_order'] = 1;
$form['fields']['images']['_order'] = 2;
return $form;
},
1000
);
add_filter(
'hivepress/v1/forms/listing_update',
function( $form ) {
$form['fields']['title']['_order'] = 1;
$form['fields']['images']['_order'] = 2;
return $form;
},
1000
);
These are PHP snippets, so use the Code Snippets plugin to add them.
I hope this helps!
Cheers,
Chris ![]()
@ChrisB, thanks for sharing the solution! Just wanted to add a quick tip, since the listing_submit form extends the listing_update form, you can actually keep it simpler by just hooking into listing_update. That way you’re covering both cases with less code.
Hi guys Maybe I’m a bit dof but none of these snippets make any difference to how attributes are displayed on the add attributes page it only displays in date published order.
Hi,
Please take a look at this screencast that demonstrates how the provided snippets reorder the attributes: Reorder attributes | Loom
If nothing is happening on your website, could you please provide the following details:
- The exact code snippet you’re using
- Which specific attributes you’re trying to reorder
- What the current order of attributes is on your site (screenshots can be helpful)
The more details you can share, the more efficiently we’ll be able to help you resolve this.
The snippets above effect the front-end listing submission/editing pages. These don’t change anything on the backend.
If you’re trying to sort your attribute list on the backend of WordPress, you may find clicking the column headings useful to sort the results differently.
As mentioned before, a screenshot can be really helpful to show where you’re trying to make changes.
I hope this helps!
Cheers,
Chris ![]()
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.