MichaelH
Forum Replies Created
-
Forum: Plugins
In reply to: Users can have custom pages where they can update infoForum: Fixing WordPress
In reply to: no blog navigation on static pagesThe TwentyTen theme has a onecolumn-page.php you could use.
Forum: Fixing WordPress
In reply to: WP Login SystemThis is easy to use:
http://wordpress.org/extend/plugins/sidebar-login/Forum: Fixing WordPress
In reply to: Tags on new postsSo you don’t see a Post Tags module anywhere on your Add new Posts screen. What about when you edit a post? Any plugins causing the problem?
Forum: Themes and Templates
In reply to: How to sort terms in custom taxonomies?Haven’t tried it but you might use wp_get_post_terms (the docs aren’t quite complete)
$taxonomy = 'habitat'; $tax_args=array('orderby' => 't.term_id'); $terms = wp_get_post_terms( $post->ID , $taxonomy, $tax_args); foreach ($terms as $term) { echo $term->slug; }Forum: Fixing WordPress
In reply to: Pagination with custom post typeWith the TwentyTen theme I created a Page called Books, then utilized a Page Template called Page of Books and have it paginating to two books per page.
<?php /** * Template Name: Page of Books * * Selectable from a dropdown menu on the edit page screen. */ ?> <?php get_header(); ?> <div id="container"> <div id="content"> <?php $type = 'book'; $args=array( 'post_type' => $type, 'post_status' => 'publish', 'paged' => $paged, 'posts_per_page' => 2, 'caller_get_posts'=> 1 ); $temp = $wp_query; // assign orginal query to temp variable for later use $wp_query = null; $wp_query = new WP_Query($args); ?> <?php get_template_part( 'loop', 'index' );?> </div><!-- #content --> </div><!-- #container --> <?php get_sidebar(); ?> <?php get_footer(); ?>Forum: Plugins
In reply to: Recent Post ProblemIn your SELECT statement, instead of
ORDER BY iduseORDER BY post_date.Related:
http://codex.wordpress.org/Integrating_WordPress_with_Your_WebsiteForum: Fixing WordPress
In reply to: Possible to convert phpmyadmin sql dump file to wxr?Is it possible to convert a sql dump file to wxr?
If you have an sql dump, just use something like phpMyAdmin to restore your database, then upgrade WordPress. Then you will have the ability to export.
Forum: Fixing WordPress
In reply to: Query posts by tag and custom field<?php $cat_id = get_cat_ID('catalog'); $args=array( 'cat' => $cat_id, 'meta_key' => 'author' 'meta_value' => 'author_value_here', 'post_type' => 'post', 'post_status' => 'publish', 'posts_per_page' => -1, 'caller_get_posts'=> 1 ); $my_query = null; $my_query = new WP_Query($args); if( $my_query->have_posts() ) { echo 'List of Posts'; while ($my_query->have_posts()) : $my_query->the_post(); ?> <p><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></p> <?php endwhile; } wp_reset_query(); // Restore global post data stomped by the_post(). ?>Forum: Fixing WordPress
In reply to: Naming PagesMight also want to review WordPress Semantics to get an idea of some of the basic concepts of WordPress.
Forum: Themes and Templates
In reply to: Basic help: how to show blogtitles on home?Yes, use posts_per_page to limits the posts to number you desire.
Forum: Fixing WordPress
In reply to: Tags on new postsIf you don’t have a Posts Tags module (usually under the Categories module to the right side of the screen) then make sure Post Tags is checked under your Screen Options (hanging tab at top of screen).
Forum: Hacks
In reply to: Listing posts by a pre-filled Array !You can use
posts__infor posts, just put the ids in an array<?php $args=array( 'posts__in' => array(5,12,2,14,7), 'post_type' => 'post', 'post_status' => 'publish', 'caller_get_posts'=> 1 ); $my_query = null; $my_query = new WP_Query($args); if( $my_query->have_posts() ) { echo 'List of Posts'; while ($my_query->have_posts()) : $my_query->the_post(); ?> <p><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></p> <?php endwhile; } wp_reset_query(); // Restore global post data stomped by the_post(). ?>Forum: Fixing WordPress
In reply to: How to require_once external php file in the custom templete?Consider using a Page Template. Put the external php file in your theme folder (e.g. wp-content/themes/yourthemehere)
Forum: Fixing WordPress
In reply to: How to add php code in a new page?Either put code in a Page Template or use a php exec code type plugin such as http://wordpress.org/extend/plugins/exec-php/