1
vote
2answers
60 views

Post-ID in url differs from $post->ID

I've got a page with a blogroll in the left column and a sidbar in the right one. When I try to retrieve the page-id inside of the sidebar like: echo $post->ID; echo get_the_ID(); The result is ...
0
votes
2answers
240 views

Widget to show posts in the sidebar basing on its IDs

I am trying to create a widget that displays posts in the sidebar taking post IDs as input from the user. The result of my code is that the widget displays just the first entered ID and ignores the ...
1
vote
1answer
108 views

How to call widget by widget's id?

Is it possible to call widgets using it's id? for example I have a sidebar. In this sidebar I put meta widget and tag cloud widget. I have got their id's ($widgets_list): 'meta-2' and 'tag_cloud-2'. ...
0
votes
1answer
127 views

Print_r displaying two different post->ID if placed in sidebar or single.php

My website is displaying, if print_r, two different ID for the same post. If i ask: <?php echo $post->ID;?> in the single.php it gives me a number. If i do the same thing in the sidebar it ...