alexpoccard
Forum Replies Created
-
Forum: Plugins
In reply to: [Pods - Custom Content Types and Fields] Order by Publish DateThank you it worked!
Thanks so much 🙂
Forum: Plugins
In reply to: [Pods - Custom Content Types and Fields] Order by Publish DateHello! I’m really struggling with this, and i need to be able to sort the related items by post date (From new to old) to create relevant content.
Would love if someone could just tell me the syntax needed in the “Order by” on the related field because everything i try is not working.
Thanks in advance!
AlexHello! @keraweb
So i tried with another pods and another query and still not working.
Pods name is “balancing” and one of the field is “datebalancing”. I want to be able to display all the weapons that have the date of “05/25/2022″.
I’m using this shortocde:
[pods name=”balancing” where=”datebalancing= ’05/25/2022′”]{@weapon}[/pods]But still no data displayed despite having multiple balancing items with this date.
here is a screenshot of the query monitor:
https://warzoneloadout.games/wp-content/uploads/2022/09/2022-09-06_12h07_48.pngUsing query monitor i see this query but with 0 records:
SELECT DISTINCT
t.*,d.*
FROMwp_postsASt
LEFT JOINwp_pods_balancingASd
ONd.id=t.ID
WHERE ( (datebalancing= ’05/25/2022′ )
AND (t.post_type= ‘balancing’ )
AND (t.post_statusIN ( ‘publish’ ) ) )
ORDER BYt.menu_order,t.post_title,t.post_date
LIMIT 0, 15Thanks for your help!
- This reply was modified 3 years, 9 months ago by alexpoccard.
- This reply was modified 3 years, 9 months ago by alexpoccard.
Yes whithout the where is displays some data.
730 764 766 720 664 675 560 649 724
Those are all the TTKIndex20m values available in my items in the pods stat.
So i think it’s really the Where clause not working. Adding the ?pods_debug_sql does not do anything.
Thanks again for your help!
AlexHello @keraweb
Sadly no it’s still not displaying any value, even with the new shortocde you provided 🙁
I think it’s the where clause that is breaking my shortcode because the stat pod is recognised (i dont have the “pods not found”) but somehow no data is found.
Sincerely,
AlexHello,
I’m placing this shortcode in the “CODE” module of the divi theme.
I’m using shortcode for pods on many pages using the same way so i don’t think it’s an issue of the theme or the code module because it works to retrieve the pods field of the pages.
For example on this page here: https://warzoneloadout.games/weapons/ugm-8/
– The image of the weapon is a pods field
– Description is a pod fieldYou can check the https://warzoneloadout.games/warzone-loadout-dev-environment/ here under the first module “Statistics” there is the shortcode mentionned:
[pods name=”stat” where=”weaponname.meta_value = ‘Sten’”]{@ttkindex20m}[/pods]But nothing is displayed despite having a pod named stat and inside one element called Sten with the right field not empty.
Thank you for your help,
AlexHey! Thanks for your reply.
I just excluded those words to be translated but it’s still not working.
I also created a ticket on Weglot side, but let me know if you have any other ideas i could try 🙂
Thanks!
AlexHello,
Done: https://github.com/pods-framework/pods/issues/6864
Thanks! Let me know if you need anything else.