MichaelH
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: How do I add a link in the info bar my posts?The code that displays that ‘info bar’ appears to be in the mystique/lib/core.php file around line 670 so you could edit that file and add your link.
Forum: Installing WordPress
In reply to: After FantasticoAssuming you just registered you domain, then you may have to wait several hours (2-48) for the DNS to be updated everywhere.
And yes, Fantastico will install successfully even if your domain is not yet resolving correctly.
Forum: Fixing WordPress
In reply to: Making a page into a category?Might need post_type in your query_post arguments. Might look closer at those examples in the Pages article.
For example to get all posts in category ‘mycategory’:
<?php $cat_id = get_cat_ID('mycategory'); $args=array( 'cat' => $cat_id, '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() ) { 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: Links from categoryThen add
echo '<h2> this is the title '.$post->post_title.'</h2>';and make sure it is what you expect.Forum: Fixing WordPress
In reply to: Listing Custom Taxonomy TermsDon’t know about the WPMS, but if that plugin creates normal taxonomies don’t know why it wouldn’t work unless the taxonmies are empty–if so try
$taxonomy = 'industry'; $term_args=array( 'hide_empty' => false, 'orderby' => 'name', 'order' => 'ASC' ); $tax_terms = get_terms($taxonomy,$term_args);Forum: Fixing WordPress
In reply to: Listing Custom Taxonomy TermsI just threw that code in the index.php (using TwentyTen theme) of a test install and it worked fine.
Forum: Fixing WordPress
In reply to: How do I stop getting email everytime someone registers?Forum: Fixing WordPress
In reply to: Listing Custom Taxonomy TermsBefore this line
//list terms in a given taxonomyput
echo '<h2>listing taxonomy</h2>';That way you know if the code is executing.
If necessary, please provide a link to your site and put all the code from that template in a pastebin like wordpress.pastebin.com and report the link back here and maybe someone can spot the problem.
Forum: Fixing WordPress
In reply to: Moving within same Domain, and a bit more complicated…Create the index.php on your local machine and put that text in the file. Then use FTP to upload. As for the web-root, let me quote the above
(it is the same folder that contains the wordpress folder)
. That file, the index.php should be a new file in your web-root — but if it isn’t then you will want to understand what is already there.
Suggested updating your permalinks, not changing them.
Also review and do WordPress Backups!
Forum: Fixing WordPress
In reply to: Last post from each category in home page<?php //get all terms (e.g. categories or post tags), then display 2 posts (1st post displays the_content) in each term $taxonomy = 'category';// e.g. post_tag, category $param_type = 'category__in'; // e.g. tag__in, category__in $term_args=array( 'orderby' => 'name', 'order' => 'ASC' ); $terms = get_terms($taxonomy,$term_args); if ($terms) { foreach( $terms as $term ) { $args=array( "$param_type" => array($term->term_id), 'order' => 'ASC', 'orderby' => 'title', '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() ) { $count = 0; 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 $count ++; if ($count == 1) { the_content(); } endwhile; } } } wp_reset_query(); // Restore global post data stomped by the_post(). ?>Forum: Fixing WordPress
In reply to: Listing Custom Taxonomy Terms<?php //list terms in a given taxonomy $taxonomy = 'industry'; $tax_terms = get_terms($taxonomy); ?> <ul> <?php foreach ($tax_terms as $tax_term) { echo '<li>' . '<a href="' . esc_attr(get_term_link($tax_term, $taxonomy)) . '" title="' . sprintf( __( "View all posts in %s" ), $tax_term->name ) . '" ' . '>' . $tax_term->name.'</a></li>'; } ?> </ul>Forum: Plugins
In reply to: Preformatted table into postsThat would probably be more like a custom field type plugin then (though not sure about a table):
# http://wordpress.org/extend/plugins/magic-fields/
# http://wordpress.org/extend/plugins/more-fields/
# http://wordpress.org/extend/plugins/supple-forms/
# http://wordpress.org/extend/plugins/custom-field-template/
# http://wordpress.org/extend/plugins/custom-field-taxonomies/Start with New To WordPress – Where to Start. Then review WordPress Semantics.
Forum: Fixing WordPress
In reply to: Removing Sidebar from Sub-pagesDidn’t test this but something like:
<?php global $posts; $photo_parent = 345; //id of photo page if ( is_page() && $posts[0]->post_parent == $photo_parent) { //do stuff } ?>Some plugins to consider
* http://wordpress.org/extend/plugins/slayers-custom-widgets
* http://wordpress.org/extend/plugins/widget-logic
* http://wordpress.org/extend/plugins/display-widgets
* http://wordpress.org/extend/plugins/widget-context
* http://wordpress.org/extend/plugins/dynamic-widgets/
* http://wordpress.org/extend/plugins/widgets-on-pages/Forum: Fixing WordPress
In reply to: using of get_the_tags function<?php $args=array( 'tag__in' => array(6), '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 for tag id 6'; 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(). ?>