Can a page_id and a post_id be same?
No, all posts, pages and other custom post types exist in the same table (wp_posts) and they all share the same ID column. The ID is unique to each entry regardless of its post type.
No, all posts, pages and other custom post types exist in the same table (wp_posts) and they all share the same ID column. The ID is unique to each entry regardless of its post type.
Can you use a custom menu (Appearance -> Menus) ? If so, just create a custom link and insert it where desired. This has the added benefit of not cluttering your list of pages with a page that isn’t real.
This would probably be better achieved using CSS. First, you hide all .children: .page_item .children { display: none; } Then, you show the current_page_item’s children: .current_page_item .children { display: block; }
ok, found the answer here : http://codex.wordpress.org/Function_Reference/wp_list_pages#Exclude_Pages_from_List here is the core of the answer : Markup and styling of page items By default, wp_list_pages() generates a nested, unordered list of WordPress Pages created with the Write > Page admin panel. You can remove the outermost item (li.pagenav) and list (ul) by setting the title_li parameter … Read more
This is challenging, because showing something would require page not to be private. It is more common to leave page public, but make it produce conditional output depending on if user is logged (is_user_logged_in()) in or other criteria.
To dynamically add menu items you can use WP_Query, specifically get_posts or get_pages. Get pages is more consistent. Here’s an example to add all pages to the Pages admin menu. You can change paramaters to exclude, include, orderby, etc in the $args below. To change to a custom post type just change $custom variable to … Read more
Try this: if ( is_front_page() && is_home() ) { // Default homepage } elseif ( is_front_page() ) { // static homepage } elseif ( is_home() ) { // blog page } else { //everything else } Source: http://codex.wordpress.org/Conditional_Tags
Even if you will keep your content static, you must create the pages through wp-admin. It’s the right and easiest way. After that, you have some options of how you will keep your content static: Page template You’ll create a file into your theme folder with your static content, starting with this piece of code … Read more
No script of function necessary. It’s actually built into WordPress. Simply go to your page to edit and on the right hand side you should see a widget labeled Publish. On the third line down, you will see an Edit button and you can set the date and time on when you want the page … Read more
nopaging disables pagination, and posts_per_page is a pagination parameter. You are telling it to ignore pagination and return all posts.