Hello,
I am facing the same problem of this fellow user right here:
https://toolset.com/forums/topic/sorting-custom-view-query-by-intermediary-post-types-content-order-number/
I read the whole discussion and have already tried to 1) register my custom field into its intermediary post type; 2) to setup the view so that it queries the posts of that intermediary post type, and order by custom field, but it doesn't seem to be working.
Please, can you help me?
Hello,
Same as above, please check the compatibility problem first:
1) deactivate other plugins and switch to wordpress default theme, and test again
2) If the problem still persists, please provide a database dump file (ZIP file) of your website in below private detail box, also point out the problem view URL, I need to test and debug it in my localhost, thanks
We deactivated everything,
and it still not works.
Do you want a website dump ?
I have enabled the enabled the private detail box, please provide your database dump file(zip file or downloadable URL), also point out the problem view URL I need to test and debug it in my localhost
Your database dump file is not valid, I get a lots of mysql errors when import it, you can follow our document to make the backup file:
https://toolset.com/faq/provide-supporters-copy-site/
or you can provide your website credentials, I can check it directly in your website.
Hello,
I have updated the previous reply with another dump (IOCUM_studiogiochi_com.sql.zip).
I have checked (with an import into an empty database) that it's a valid one.
Unfortunately, there are still mysql errors when I import your database dump file, see screenshot import-error.JPG.
I suggest you provide your website credentials in above private message box,
https://toolset.com/forums/topic/sort-view-by-intermediary-post-types-content/#post-1133470
We are using a Linux machine (for the export we tried both the MySQL command line and PHPMyAdmin), so I suppose it's some kind of encoding issue.
Anyway, I have updated the private message above with the credentials to the website.
Thanks for the details, I can login your website, since you did not point out the view URL and page URL, I have setup another view in your website:
1) post view: Sort view by intermediary post type
hidden link
It is duplicated from your post view "ordine autori (in scheda pubblicazioni)"
The only difference is in section "Elemento del ciclo in Sort view by intermediary post type", I have changed the codes from:
[wpv-post-title item="@autore.parent"]
To:
[wpv-post-link item="@autorepubblicazioni.parent"]
The many-to-many relationship slug is "autorepubblicazioni", see it here:
hidden link
Put it in content template "single-pubblicazioni":
hidden link
{!{wpv-view name='sort-view-by-intermediary-post-type'}!}
See the result here:
hidden link
it works fine, see screenshot sort-by.JPG
Thanks a lot: that's what we were looking for.
Though: is there any way to hide the numbers (1, 2, 3 etc) and just keep the associated values (the names)?
Solved by our own! Thank you again.