MichaelH
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: WordPress as websiteForum: Fixing WordPress
In reply to: Cannot locate culprit in WPThen on the “Political” Category there is an Edit link that leads back to my Admin Page. That’s no good!
Only logged in user would see that, but that link is usually rendered via the template tag, edit_post_link:
For example:<?php edit_post_link('Edit', '', ' | '); ?>Note: Use Template Hierarchy to determine what template (e.g. category php) your theme uses to display those posts with the edit link.
[ oops, cubecolour got there first ]
Forum: Fixing WordPress
In reply to: Question about TagsActually, thinking about it, a category called Jokes is redundant of the site itself. Maybe just categoires that are “Animal Jokes” and “Bar Jokes”. No sub-categories.
Forum: Fixing WordPress
In reply to: Question about TagsProblem is, how do you “connect” the tags and the categories. You can’t.
What about categories and sub-categories (children)?
Forum: Fixing WordPress
In reply to: Get the term (custom taxonomy) name outside of the loop?pulls the custom taxonomy name from the page itself
echo get_query_var('taxonomy');Forum: Plugins
In reply to: Pulling posts from previous weekTry just the letter ‘w’ instead of ‘weeknum’ in your query
http://codex.wordpress.org/Template_Tags/query_posts#Time_Parameters
Forum: Themes and Templates
In reply to: Archive: Custom post type and taxonomyHave used this lately, but might help you:
<?php //get desired post_type(s) //get all taxonomies for each post_type //for each taxonomy get all terms //for each term display all posts in that post_type/taxonomy/term $args=array( 'name' => 'book', 'publicly_queryable' => true, 'exclude_from_search' => false ); $output = 'objects'; $post_types=get_post_types($args,$output); foreach ($post_types as $post_type ) { $object_type = $post_type->name; $taxonomies = get_object_taxonomies($object_type); foreach ($taxonomies as $taxonomy ) { $args=array( 'name' => $taxonomy ); $output = 'objects'; // or objects $tax=get_taxonomies($args,$output); $tax_terms = get_terms($taxonomy); foreach ($tax_terms as $tax_term) { $args=array( 'post_type' => $object_type, "$taxonomy" => $tax_term->slug, '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 '<p>Listing post_type='.$post_type->label . ', taxonomy='. $taxonomy . ', term='. $tax_term->slug.'</p>'; 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 echo get_the_term_list( $my_query->post->ID, $taxonomy, $tax[$taxonomy]->singular_label.': ', ', ', '' ); endwhile; } } } } wp_reset_query(); ?>Forum: Fixing WordPress
In reply to: Displaying Custom Posts by CategoryIn registering your taxonomy shouldn’t that be toolkit instead of Categories?
register_taxonomy("Categories", array("portfolio"), array("hierarchical" => true, "label" => "Categories", "singular_label" => "Tool", "rewrite" => true));should be
register_taxonomy("toolkit", array("portfolio"), array("hierarchical" => true, "label" => "Tool Kit", "singular_label" => "Tool", "rewrite" => true));Forum: Plugins
In reply to: Plugin to email usersMight check http://wordpress.org/extend/plugins/email-users/
Forum: Fixing WordPress
In reply to: Is it possible?Might consider using categories and review the Page of Posts example in the Pages article.
You can also create a Page and use a plugin such as http://wordpress.org/extend/plugins/list-category-posts/
Forum: Plugins
In reply to: Pulling posts from previous weekFor posts from last year wouldn’t you need to decrement the year?
// don't need this $current_week = (date('W')-1); $current_year = (date('Y')-1); query_posts("year=$current_year&order=ASC&posts_per_page=-1");Forum: Plugins
In reply to: How to make auto update process for my custom plugin.Auto updates only work if the plugin is in the WordPress Plugin repository.
Forum: Installing WordPress
In reply to: Multiple blogs with multiple databases on one host error.This would imply wordpress is trying to use the same database twice. However, I set up a new database for this blog (and double checked the wp-config to see I had it refer to the correct database). Does anyone know what’s wrong here?
Double check the wp-config.php file as that is where the database info resides.
Forum: Fixing WordPress
In reply to: Custom Fields on PagesSee Custom Fields
Forum: Fixing WordPress
In reply to: Upgrading across multiple releasesThanks. So is the CODEX too conservative in suggesting incremental upgrades?
Maybe, but it the 1.5 direct to 3.0.1 fails then the incremental approach works.
Or maybe the incremental upgrades are needed only to get up to 2.7.x?
Depends, but you would only know when the 1.5 to 3.0.1 does not work.