Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. COThanks @Joe I forgot to write that I tried printing out get_post_custom and yes the data is there. This is what I get: Array ( [_edit_last] => Array ( [0] => 1 ) [_edit_lock] => Array ( [0] => 1383347235:1 ) [_slide_url] => Array ( [0] => something.com ) ) Then I try what you suggested and it works. I knew there was other way to get the ID but I forgot and was trying something like $post_ID, which didnt work. But this seems to work perfectly. Could you explain to me if possible, how does this work and why $post->ID doesnt work but get_the_ID() works? Thank you :)
      singulars
    2. COI'm not 100% sure on this. I think when you call `$loop->the_post();` It makes certain functions work like `the_title()` and `the_ID()` I have found that it also stops the $loop object from working as it would without calling `the_post();`. I think the reason that`$post->ID` does not work is because it should be `$loop->ID` and `$slider_loop->ID`
      singulars
    3. COI didnt understand much because im not good in PHP but also chaning get_the_ID to $loop->ID works. Not sure if that is what you meant. So thanks again for help :) I got one more thing not related to this, I want slider to be only available in WP admin. Because now you can go to mysite.com/slider/slide-1 and it would show the content. Setting public -> false will fix this issue but then Slider dissapears from admin menu. I managed to show it by using, show_ui, show_in_menu, etc. but here is the problem, when creating new slide the slug box that shows URL dissapears.
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload