For a functions I need the post ID in my functions.php file.
I must have the ID if the editpage is active.
How can I extend wordpress login sessions to a month so that it doesn’t automatically ask for login after 48 hours?
I’ve been looking for this method for weeks, but still can’t find it. There are so many sites that discuss how to create a custom login page, but they don’t cover how to block a specific id like the one I was looking for.
I know that this question is already often asked but there is no exact answer for it.
I have a custom vertical menu based on posts of a specific category. I want to match the slug of the menu item with the slug of the current post to apply css. Specifically, I want to change the background of the selected menu item. Selected menu item means, when the user clicks the menu and page loads, the background of that menu item should be changed indicating the user is at this menu item/post. What I think, if the menu item consists of posts, then the slug of the posts and slug of the menu item should be same. In the html, each li tag has the menu item ID. The code I am is like this
What are the canonical rules for the ID numbers of posts, pages and CPTs? Especially as they are created programatically.
This may sound like a stupid question, but is there something like an ID associated with the post types (built in or custom) in WordPress?
I’m pretty new to WordPress and I was wondering if I could get a page id
with its slug
. Is it possible please let me know?