The tag has no wiki summary.

learn more… | top users | synonyms

1
vote
1answer
3k views

Get previously visited page ID

I would like to get the ID (or permalink) of the page the visitor visited just before visiting the current page - in other words the ID of the last page in the browser history. Can this be done? Any ...
2
votes
6answers
11k views

How to get Author ID outside the loop

I can't get the post author ID outside the loop to make the get_the_author_meta work. So far I've tried different approaches: 1. $author_id=$post->post_author; 2. global $post; ...
2
votes
4answers
3k views

Custom Walker: how to get ID in function start_lvl

I am making my first custom walker to build an accordion menu. To start with I used this example: http://bitacre.com/2025/custom-nav-menu-walker-for-wordpress-themes There are two functions. First ...
4
votes
1answer
9k views

get all posts ID from a category

Problem: I need to get an array of ID's of posts from a given category If the category have any posts. This is to be used on a plugin options page. So far I have: $posts = ...
2
votes
2answers
2k views

Post ID At The End Of Permalink URL Effects Performance (Positively)?

HARD NOTE: This question is solely about performance, and NOT search engine optimization. So, please make sure your answers are as such. W.r.t permalinks, "year" is the most obvious numeric of ...
0
votes
3answers
903 views

How to get post ID with hooks publish_post, new_to_publish, etc

I have two plugins, one uses the function wp_insert_post(), the other has a code like this: add_action('future_to_publish', 'myFunc', 10, 1); add_action('new_to_publish', 'myFunc', 10, 1); ...
4
votes
2answers
7k views

How to get permalink and title from post ID?

I have stored an array of post IDs and I would like to list the posts as links, meaning I need to get the title and permalink for the post ID - $id. The list should be echoed out by the following if ...
3
votes
2answers
4k views

ID for posts/blogs page

I have a website which has a static front page and a blog page where all the blogs are displayed. I am using my own theme and have created some custom meta boxes that display content in a sidebar ...
1
vote
2answers
8k views

how to get page id of a page using page slug

Im pretty new to wordpress and I was wondering if I could get a page id with it's slug. Is it possible please let me know.
1
vote
1answer
807 views

Why id in urls doesn't work and slug yes?

I'm lost, I don't understand why this works http://website.com/?tag=my-cat-slug and not this http://website.com/?tag=15 It's really annoying because wp_dropdown_categories() only provides ids as ...
0
votes
1answer
54 views

Are all ID's used unique?

I'm using JSON api plugin to pull data from wordpress into an app I am making. I need a unique identifier to make sure I don't have any duplicates WHILE also using the identifier as a way to sort from ...
0
votes
2answers
3k views

How do I get the current edit page ID in the admin?

Most solutions I found are for front-end use. This is for a plugin, so the all activity is in the back-end. How do I get the page ID that's being currently use(edited) in the admin? Note I'm out of ...
0
votes
1answer
998 views

Display 1 category only with get_the_category (by ID or slug)

After hours of unfruitful Googling, I am asking for your help on this issue. My objective is to display only 1 category with get_the_category if the category ID matches the ID or slug set in the ...
-3
votes
2answers
111 views

Query parsing only author ids

I need array only all author ids from the loop, each one only once if possible and out of all posts in the loop. Any suggestions?