$alm_item returns the current item # in the loop.
To get the post id $id = get_the_ID();
I’m so sorry, I meant “$alm_page” returns “1”.
I just tested and $alm_page is returning as expected.
Not really sure what is going on with yours.
It should return the ID of the post(page) that is calling the shortcode, isn’t it?
No, it should return the page number… e.g. the amount of time you have clicked LOAD MORE
You should add that to the documentation, because I misunderstood the definition. There any way to get that ID? (Post/page that is calling the shortcode).
No where does it says returns the current post id.
$alm_page – Returns the current page number. echo $alm_page;
the get the current post id you would <?php echo get_the_ID(); ?>
No, I think i’m not explaining myself.
I don’t want the current post ID. I want the ID of the page that is calling the shortcode.
Oh, my bad 🙂
sorry – I’m not actually sure to accomplish this one.
Ok that’s bad xD haha I need that ID to get a lot of data.
Can I pass a custom variable through the shortcode to the template?
N, but that’s a pretty idea for a filter.
Have you tried searching google for how to get a parent page ID inside another loop?
Yeah, really good actually.
No, I don’t see that approach. I will.
I solved my problem but I had to create the optional variable that I mentioned before.