MichaelH
Forum Replies Created
-
Forum: Plugins
In reply to: [Register Plus] Register Plus. So, where is "Register" link?It is right under Meta on your site (of course if you are logged in already you won’t see that).
Forum: Fixing WordPress
In reply to: List of posts using custom taxonomy termNot sure what would happen–of course that example is for use in a template such as index.php or a Page Template.
Forum: Fixing WordPress
In reply to: What is taxonomy archive permalink?Use the taxonomy argument with the template tag, wp_list_categories(), and then click on your particular term to determine the URL.
Also see Template Hierarchy to understand what template will be used in various situations.
Forum: Your WordPress
In reply to: I have one blog and different topics to blog onYou really don’t need to do anything but use Categories (OnLine Marketing, Success, Physics) when writing your posts, then put the Category Widget in your sidebar and WordPress will automatically produce an archive (you called it a page) of that categories’ posts.
Don’t be confused by what an archive is–it is just a generated display of your posts at that moment. You don’t do anything to create the archive, that’s an automatic thing WordPress does for you. Usually, archives are date, category, tag, or author, based.
Access to archives is typically presented via links in a sidebar under an Archive (date based), Category, or Tag Cloud, heading. Widgets, or Template Tags such as wp_get_archives(), wp_list_categories(), wp_tag_cloud(), and wp_list_authors(), are the constructs used to present links to users to visit your various archives. The process of placing code in your Theme’s Templates is explained in Stepping Into Templates and Stepping Into Template Tags.
Once a user clicks on a Category link in the sidebar, the display of those posts can be controlled by a Category Template. Other Templates, such as Author Templates, and Tag Templates, are available if you set them up. These Templates can be coded via Template Tags such as the_title(), the_content(), or the_excerpt(), to display just a post title, the full content of the post, or just an excerpt of the post.
Also, it is important to understand the Template Hierarchy, as that is how WordPress determines what Template to use to render the posts for reading by your readers.
If a user visits a Category archive, then clicks on a given post title in that Category archive, the display of that single post is again presented by another Template, and again, the Template Hierarchy determines what Template displays that single post. Finally, that single post Template can be coded to display just the title, the full post content, or an excerpt.
Forum: Plugins
In reply to: Display GreetingNot exactly what you wanted but you can use the $userdata object
<?php //if user logged in, warn if first name is not filled in if ( is_user_logged_in() ) { echo 'Welcome, registered user!'; if ( $userdata->first_name ) { echo ' You have a first name of '. $userdata->first_name; } else { echo ' Please, visit your profile page and enter a First Name.'; } } else { echo 'Welcome, visitor!'; }; ?>Forum: Fixing WordPress
In reply to: How to hide posts….?If you don’t want it in Recent Posts (assuming you are using a widget) then use one of these so you can exclude a particular category:
* http://wordpress.org/extend/plugins/query-posts/
* http://wordpress.org/extend/plugins/wordpress-loop/
* http://wordpress.org/extend/plugins/category-posts/
* http://wordpress.org/extend/plugins/list-category/
* http://wordpress.org/extend/plugins/bns-featured-category/Forum: Fixing WordPress
In reply to: how to use wp_query display grand child page ONLYThis uses wp_list_pages to display the grandchildren (level 3) so you need to use the ids from the $gen3 array with your query…
<?php $gen1 = $wpdb->get_col("SELECT ID FROM $wpdb->posts WHERE $wpdb->posts.post_parent = 0 AND $wpdb->posts.post_type = 'page' AND $wpdb->posts.post_status = 'publish' ORDER BY $wpdb->posts.ID ASC"); $gen1_ids = implode($gen1,', '); $gen2 = $wpdb->get_col("SELECT ID FROM $wpdb->posts WHERE $wpdb->posts.post_parent IN ($gen1_ids) AND $wpdb->posts.post_type = 'page' AND $wpdb->posts.post_status = 'publish' ORDER BY $wpdb->posts.ID ASC"); $gen2_ids = implode($gen2,', '); $gen3 = $wpdb->get_col("SELECT ID FROM $wpdb->posts WHERE $wpdb->posts.post_parent IN ($gen2_ids) AND $wpdb->posts.post_type = 'page' AND $wpdb->posts.post_status = 'publish' ORDER BY $wpdb->posts.ID ASC"); $gen3_ids = implode($gen3,', '); wp_list_pages('include=' . $gen3_ids . '&title_li=<h2>' . __('Level 3 Pages') . '</h2>'); ?>Forum: Installing WordPress
In reply to: downloadsPlease review Installing WordPress. The WordPress files are in a compressed (e.g. zip file) file that needs to be extract on your local machine then use FTP to upload to your host.
Also check with your host to see if they have a one-click install for WordPress.
Forum: Plugins
In reply to: how to remove category from the postsThat kind of information is usually displayed using the_tags() and the_category() so figure out what Template is displaying those posts and delete the appropriate code.
Review:
Stepping Into Template Tags
Stepping Into Templates
Template HierarchyForum: Fixing WordPress
In reply to: Making a page into a category?There isn’t a way to ‘associate’ Pages to categories in the admin. If you use categories on posts WordPress will automatically give you access to a display of all the posts in a particular category if you use something like the Category Widget.
You can also create a Page and use a plugin such as http://wordpress.org/extend/plugins/list-category-posts/
Or the Pages article has the Page of Posts example where you can code it to say if this is Page X, display category Y posts.
Forum: Fixing WordPress
In reply to: Archive.php Show post links under each categoryUse this to list the query_vars:
<?php echo "<pre>"; print_r($wp_query->query_vars); echo "</pre>"; ?>If I’ve got it right you need to use http://php.net/manual/en/function.substr.php
Forum: Plugins
In reply to: Retrieving data from an external mysql databaseI’d consider putting that in a template that displays the posts or at the very least use a Shortcode.
Related:
Stepping Into Template Tags
Stepping Into Templates
Template HierarchyForum: Fixing WordPress
In reply to: Number of posts to display in the monthly or tag archiveForum: Plugins
In reply to: [WP-PageNavi] WP-PageNavi does not display after WP 3.0.1 upgradeFor the plugin author to help you might want to
1. Explain what theme you are using
2. Provide a link to see the problem
3. Explain where you put the code to display the paginationForum: Fixing WordPress
In reply to: List of posts using custom taxonomy termHaven’t used this for a while but might see if you can make it fit:
<?php //for in the loop, display all "content", regardless of post_type, //that have the same custom taxonomy (e.g. genre) terms as the current post $backup = $post; // backup the current object $found_none = '<h2>No related posts found!</h2>'; $taxonomy = 'genre';// e.g. post_tag, category, custom taxonomy $param_type = 'genre'; // e.g. tag__in, category__in, but genre__in will NOT work $post_types = get_post_types( array('public' => true), 'names' ); $tax_args=array('orderby' => 'none'); $tags = wp_get_post_terms( $post->ID , $taxonomy, $tax_args); if ($tags) { foreach ($tags as $tag) { $args=array( "$param_type" => $tag->slug, 'post__not_in' => array($post->ID), 'post_type' => $post_types, 'showposts'=>-1, 'caller_get_posts'=>1 ); $my_query = null; $my_query = new WP_Query($args); if( $my_query->have_posts() ) { while ($my_query->have_posts()) : $my_query->the_post(); ?> <h3><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h3> <?php $found_none = ''; endwhile; } } } if ($found_none) { echo $found_none; } $post = $backup; // copy it back wp_reset_query(); // to use the original query again ?>