Posts vs Pages and categories

the way WordPress stores pages in the database is the same as it stores posts, so it makes no difference if the content is created as pages or posts (static or not). And if most of the content is static you can always use a caching plugin to serve that content as static.

Stepping through a foreach loop – adding +1 to the end of it so next time it loops it starts on item 2

Use the offset argument, and only get 1 result: global $my_page_offset; if(!isset($my_page_offset)) $my_page_offset = 0; $pages = get_pages(array( ‘child_of’ => $post->ID, ‘sort_column’ => ‘menu_order’, ‘offset’ => $my_page_offset, ‘number’ => 1, )); $my_page_offset++; … I’m assuming here that you don’t have much control over these loops, because you’re doing them multiple times. This is why the … Read more

Disable or lock parent pages from being edited in wordpress admin

Yes there is. Save this code as plugin and activate one. Plugin will lock all pages that has children from edit. <?php /* Plugin Name: Lock parent pages form edit Plugin URI: Description: Version: 0.1 Author: Alexey Selin <[email protected]> Author URI: http://wordpress.stackexchange.com/users/7314/alexey */ function lock_parent_pages_from_edit( $capauser, $capask, $param){ global $wpdb; $post = get_post( $param[2] ); … Read more

Admin taking a very long time to load

I would do most of my troubleshooting in the Debug Bar plugin along with the Debug Bar extender plugin. This plugin gives you detailed access to everything that is going on behind the scenes. It can also detail memory usage and execution time for each function and database query along with where it was called … Read more

How can I use “getarchives_where” to get monthly archives for static pages?

wp_get_archives already have post_type=”post” by default and to replace it try this: add_filter(‘getarchives_where’,’my_archives_filter’); function my_archives_filter($where_clause) { str_replace( “post_type=”post”” , “post_type=”page”” , $where ); } in sidebar: add_filter(‘getarchives_where’,’my_archives_filter’); wp_get_archives(‘type=yearly’); remove_filter (‘getarchives_where’,’my_archives_filter’);

“about us”, ” contact” sections should be article(post) or page in the simple small Business website?

It’s totally up to you to decide to put it as a post or a page. I would put it as a page though. One important difference between them is that Pages are hierarchycal and Posts chronological. You can study each in the Codex to better decide: http://codex.wordpress.org/Posts http://codex.wordpress.org/Pages This can also be usefull: http://codex.wordpress.org/Main_Page#Learn_How_to_Use_WordPress