0
votes
1answer
36 views

Are post, page and category IDs unique to each other?

I was looking for a function to get all ancestors of a post or category and found get_ancestors( $object_id, $object_type ). To my surprise, the Codex shows that the second parameter is required: ...
2
votes
1answer
2k views

Creating a WordPress admin page without a menu for a plugin

I am writing a plugin, that will list a number of entries from a custom set of tables. I added the main page for the plugin using the following WordPress functions: // Add menu and pages to ...
0
votes
0answers
96 views

Using Post ID and Page ID in same function

I've written a function to display a custom sidebar, which is outputted as a sidebar. On some pages, I have a Custom Field called 'show_sidebar', which I can assign as 'false' on pages which I do not ...
-2
votes
1answer
76 views

How to get page title with the page ID?

My page ID is: 30601 How can get the title of this ID? I want get page's title with ID.
0
votes
0answers
188 views

Get ID of the page where shortcode is included

I have a page with a shortcode that uses get_the_ID(). The shortcode displays custom fields from the current page. When I include that page within another page, get_the_ID() returns the ID of the ...
0
votes
1answer
80 views

get id custom tables on current page

i will get id on current page. <?php $hasil = $wpdb->get_results("SELECT id,bab,tema FROM $tabel ORDER BY bab ASC"); foreach ($hasil as $bab) : ?> <tr> ...
0
votes
0answers
62 views

Using array page name together with page id to deregister script

If I use this: if (is_page(array(blabla-test-page, 20726, 20720, 38881))) {wp_deregister_script( 'gdsr_script' ); } the blabla-test-page looks like it overrides different pages, even if certain ...
2
votes
1answer
2k views

Get page id by title?

I'm using the following code to insert the content from another wp page into my main home page. Is it possible to make it work with a page title instead of an id number? Eg. Not $page_id = 518 but ...
0
votes
2answers
137 views

Determine if ID is page or post and query the ID

I want to look up a page id and determine if it's a page or post. Then query that id and display stuff like title, featured image, etc. This works for Pages: query_posts('page=' . ...
1
vote
0answers
161 views

Passing the page ID to a login php script

I'm trying to create a simple registration process which goes like this, A visitor clicks on a link (which is viewable only after entering some information such as name, email, phone etc.) This ...
0
votes
1answer
221 views

Can a page_id and a post_id be same?

Wordpress generates ID's for each page/post. Do pages in wordpress share the same ID column in the database as the posts? I mean, if a site has both posts and pages, can one or more page_ID's be same ...