Are page/post IDs unique across a whole network?
Nope, they aren’t unique. So yes – you’d have to check current site and do that…. or use a theme with a custom menu?
Nope, they aren’t unique. So yes – you’d have to check current site and do that…. or use a theme with a custom menu?
If it is a strict structure, you might be better off creating a custom post type. You would then store the name in the title field, the image as the featured image, and the “About” would be the main content. If you need extra information, you can use custom fields (with a plugin to style … Read more
You don’t need to use a query, just create your tample and name single-YOURCUSTOMPOSTNAME.php, for more references take a look at: http://codex.wordpress.org/Post_Types#Template_Files
If a page won’t work without a specific template, I would just remove the need for them to select a template. Filter template_include and select the template based on the requested page: function wpse50455_template_include( $template ) { // check if it’s a page if ( is_page() ): $this_page_id = get_query_var( ‘page_id’ ); // check for … Read more
the codex has exacly what you need: get_page_by_title() Example $page = get_page_by_title( ‘About’ ); $the_excerpt = $page->post_excerpt; or $page = get_page_by_path( ‘parent-page/sub-page’ );
Use the get_post_meta function.
I figured this problem out literally seconds before I posted the question, so I thought I would go ahead and post the answer here. I’ve noticed there is not a lot of consolidated help for this problem out there. This will help you if your “Older Posts” or “Newer Posts” links give you a 404 … Read more
You can use all template tags inside this file, so to get the ID, just use get_the_ID() (or the_ID() to output it). get_the_ID() will retrieve the numeric ID of the current post. It has no parameters and returns the ID of the current post. the_ID() will display the numeric ID of the current post. It … Read more
You can set the display status with show_admin_bar function <?php show_admin_bar( false ); ?>
orderby defaults to date, so we can always leave that out if we want to order by date. so the only thing we need to detect is if $_GET[‘sort’] is set and it’s equal to title. here we set the query args for all queries, and just add on the orderby if it’s title: $args … Read more