get all page IDs from wp_list_pages

wp_list_pages() is for formatted markup. Use get_pages() and wp_list_pluck(): $pages = get_pages( array ( ‘parent’ => 0, // replaces ‘depth’ => 1, ‘exclude’ => ‘3,5,11’ ) ); $ids = wp_list_pluck( $pages, ‘ID’ ); $ids holds an array of page IDs now.

Are all ID’s used unique?

If you look at the description for the different tables used by WordPress, the columns described as “auto_increment” will be unique. I am not sure what you are doing though. The URL structure you are using is not one that I recognize. That is, the syntax I think you want is this: example.com/?p=1774 rather than … Read more

Getting the ID of a meta box

Here’s what I would do in order to get the ID of the metabox, In the Dashboard where the meta boxed are located, open up the Screen Options tab on the upper right corner Open up your browser’s developer tool (ex: Chrome) Use the element selector () and select the checkbox label that is listed … Read more

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

I’m not sure how to get it via the title, but you can get it via the slug (which is often more useful in my experience) using this: http://erikt.tumblr.com/post/278953342/get-a-wordpress-page-id-with-the-slug Just change “$page” to “$post” if you want to return slugs for posts instead of pages. G’luck!

How to change WordPress user ID?

Why not make a new account for this user which will generate a new database ID. Then delete the user with the ID of 1 and attribute all posts / content to the new user you created for them? Then you don’t have to worry about queries or messing up your database. Also, as said … Read more

Get user id from email?

You are probably looking for the user_exists function. http://codex.wordpress.org/Function_Reference/email_exists This function will check whether or not a given email address ($email) has already been registered to a username, and returns that users ID (or false if none exists). If the email address does not exist (user_exists returns false), you may want to use the wp_create_user … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)