MichaelH
Forum Replies Created
-
Forum: Themes and Templates
In reply to: query-post loopYou’ll want to confirm with that link I presented that your code is similar.
Forum: Fixing WordPress
In reply to: How to remove posts tags in bulkOne possible solution for in the loop:
<?php $taxonomy = 'post_tag'; $args=''; $terms = wp_get_post_terms($post->ID , $taxonomy, $args); if ($terms) { $count = 0; foreach ( $terms as $term ) { $count++; if ($count <= 3) { echo '<p><a href="' . esc_attr(get_term_link($term, $taxonomy)) . '" title="' . sprintf( __( "View all posts in %s" ), $term->name ) . '" ' . '>' . $term->name.'</a> has ' . $term->count . ' post(s). </p> '; } } } ?>Forum: Themes and Templates
In reply to: List posts only from authors level?Then you’d need to capture the ID of the author users in an array that are ‘authors’, then do a query posts loop and check to see if the author of each post was part of your author array.
Forum: Fixing WordPress
In reply to: How to remove posts tags in bulkNot sure but you’d need to look at wp_insert_post that uses wp_set_post_tags that uses wp_set_object_terms.
Forum: Themes and Templates
In reply to: List posts only from authors level?Well that code lists each user of the Author Role and two posts (if there are two posts).
Oh well maybe someone else can jump in here with a better solution. Good Luck.
Forum: Fixing WordPress
In reply to: Displaying a customized music databaseIf you put your database table(s) into the same database that houses your WordPress tables you can use the wpdb class to access those tables.
Talk to your host if you are not comfortable with copying that table from one database to another.
Forum: Plugins
In reply to: [User-Cats Manager] [Plugin: User-Cats Manager] this plugin does not workMight look at http://wordpress.org/extend/plugins/capa/
Forum: Fixing WordPress
In reply to: How do I get admin view?Look in the
wp_userstable.The
wp_part of that could be different on your systemForum: Themes and Templates
In reply to: List posts only from authors level?<?php //displays users of author role and two posts for each $blogusers = get_users_of_blog(); if ($blogusers) { foreach ($blogusers as $bloguser) { $user = new WP_User( $bloguser->user_id ); if ( !empty( $user->roles ) && is_array( $user->roles ) && ( in_array('author',$user->roles) ) ){ //echo "<pre>"; print_r($user); echo "</pre>"; echo '<p>User ID ' . $user->data->ID . ' ' . $user->data->user_firstname . ' ' . $user->data->user_lastname . '</p>'; $args=array( 'author' => $user->data->ID, 'post_type' => 'post', 'post_status' => 'publish', 'posts_per_page' => 2, 'caller_get_posts'=> 1 ); $my_query = null; $my_query = new WP_Query($args); if( $my_query->have_posts() ) { echo 'List of Posts for this user'; 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: Sidebar and subpagesIf you use parent/child relations ships you can use the
child_ofargument of wp_list_pages(). If not, you could use theinclude=argument.Consider downloading and installing Otto’s PHP Code Widget, then something like this code in one of those widgets:
<?php wp_list_pages('include=5,9,23&title_li=<h2>' . __('Liturgical Ministries') . '</h2>' ); ?>See the template tag, wp_list_pages(), for more arguments and examples
Forum: Fixing WordPress
In reply to: How do I get admin view?Maybe not directly related but you can find user names by using phpMyAdmin if you have access.
http://wordpress.org/support/topic/lost-password-email-retrieval-not-working?replies=1
Forum: Themes and Templates
In reply to: query-post loopIn addition to presthe you need to use a proper pagination construct such as:
<?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts('cat=3&posts_per_page='.get_option('posts_per_page').'&paged=' . $paged); ?>One example:
http://wordpress.org/support/topic/taxonomy-pagination-1?replies=21#post-1750529Forum: Fixing WordPress
In reply to: Tried to upgrade plugin, site now down!Looks okay to me.
Forum: Fixing WordPress
In reply to: Backdating posts older than 1970 not possible…That has been reported:
http://core.trac.wordpress.org/ticket/10332Forum: Fixing WordPress
In reply to: Display differently styled custom post types in one listApply your styling accordingling:
<?php $args=array( 'post_type' => array('post','videopost'), '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() ) { 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 if ($my_query->post->post_type == 'videopost') { echo 'this is a videopost'; } endwhile; } wp_reset_query(); // Restore global post data stomped by the_post(). ?>