Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
1 answer
39 views

after refresh the id that shows correct in first time click, changes to 1

I made a like post type for another post type called recipe that user can toggle for like and getting back the like. I have to get the latest like id of specific single recipe when cliked on in data-...
Alipvd's user avatar
  • 3
0 votes
1 answer
1k views

get_the_ID() in the footer returns wrong value

I'm using get_the_ID() in footer.php but it returns a wrong value. It might come from any of the plugin which is altering The Loop without resetting it after with wp_reset_postdata() as mentioned in $...
Basj's user avatar
  • 85
0 votes
0 answers
79 views

Why does my output of get_the_ID() change after a wp_query?

I use ACF. I have the following code: $args = array( "post_type" => "membership", "posts_per_page" => 1, 'meta_query' => array( 'relation' => '...
MastaBaba's user avatar
  • 311
0 votes
1 answer
1k views

Global page ID variable empty error

I am creating theme and I have a need to create global variables within theme functions.php file. Currently I am doing it like this: /** * Setup globals */ global $nb_id, $nb_page; $nb_id = ...
richardevcom's user avatar