The tag has no wiki summary.

learn more… | top users | synonyms

3
votes
4answers
4k views

How to get page's ID if I know the title only?

Is there an exact opposite funciton to this one: get_the_title(ID) I know there's: get_the_id() But it doesn't seem to accept any arguments. So, basically, I'm looking for something like: ...
1
vote
1answer
623 views

wp_get_current_user always returns 0 continued

I have been busting my head trying to get the user ID with every piece of code possible but it always comes back "0". Not sure what I'm doing wrong. I started out using this: <?php $user_info = ...
0
votes
1answer
60 views

Conditional using get_the_ID() not working [closed]

I'm using this script to not show title on a specific page <?php if (get_the_ID() != 50){ ?> Now I need to add another page: <?php if ((get_the_ID() != 50) || (get_the_ID() != 317)){ ...
0
votes
1answer
183 views

Wordpress returns the same Post ID every time everywhere!

There is something weird happening in a recent theme I have developed. Inside the post page when I use $post->ID and get_the_ID() it always returns the same ID which belongs to one of my posts! I'm ...