tactics
Forum Replies Created
-
Forum: Plugins
In reply to: [Custom Post Type UI] Display post type's plural label?You’re right, my colleague changed the slug. Thanks much!
Forum: Plugins
In reply to: [Custom Post Type UI] Display post type's plural label?Tried:
<h1><?php $obj = get_post_type_object( 'wedding-logos' ); echo $obj->labels->name; ?></h1>
Didn’t work.
Forum: Plugins
In reply to: [Related Posts by Taxonomy] Plugin inserting " "s before excerptsOK, thanks very much.
Forum: Plugins
In reply to: [Related Posts by Taxonomy] Plugin inserting " "s before excerptsYes, but it still has the white space.
Forum: Plugins
In reply to: [Related Posts by Taxonomy] Plugin inserting " "s before excerptsIt is. And as you can see, now nothing shows up on the page.
Forum: Plugins
In reply to: [Related Posts by Taxonomy] Plugin inserting " "s before excerptsWhen I do that, the widget doesn’t show up at all.
Forum: Plugins
In reply to: [Related Posts by Taxonomy] Plugin inserting " "s before excerptsI’m adding it using the widget. In my template:
<aside class="related-posts"> <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar("Aside Widget") ) : ?> <?php endif; ?> </aside>
in my functions.php:
if ( function_exists('register_sidebar') ) register_sidebar(array( 'name' => 'Aside Widget', 'before_title' => '<h3>', 'after_title' => '</h3>', ) );
Forum: Plugins
In reply to: [Related Posts by Taxonomy] Plugin inserting " "s before excerpts<?php if ( $related_posts ) : ?> <ul> <?php foreach ( $related_posts as $post ) : setup_postdata( $post ); ?> <li> <?php the_post_thumbnail('thumbnail'); ?> <h4> <?php if ( get_the_title() ) the_title(); else the_ID(); ?> </h4> <?php the_excerpt(); ?> <a href="<?php the_permalink() ?>">Read More</a> </li> <?php endforeach; ?> </ul> <?php else : ?> <p> <?php _e( 'No related posts found', 'related-posts-by-taxonomy' ); ?> </p> <?php endif ?> <?php
Forum: Plugins
In reply to: [Related Posts by Taxonomy] Plugin inserting " "s before excerptsI’m not manually creating an excerpt. These are the excerpts that wordpress automatically generates from the first few words in the post.
Forum: Plugins
In reply to: [Related Posts by Taxonomy] Plugin inserting " "s before excerptsYep. Scroll down to the bottom of the page. The first post has one, the second has four, the last one has none. Completely random…
http://violetweddings.com/wedding-styles/classic-fifth-avenue/
Forum: Plugins
In reply to: [Related Posts by Taxonomy] Plugin inserting " "s before excerptsNote: should be “nbsp” between the quotes above
Forum: Plugins
In reply to: [Custom Post Type UI] Custom post types in more than one category?OK, I finally figured it out. Here it is:
<?php
$args = array(
‘post_type’ => array( ‘wedding-styles’ ),
‘order’ => ‘asc’,
‘orderby’ => ‘title’,
‘posts_per_page’ => -1
);$loop = new WP_Query( $args );?>
<?php while ( $loop->have_posts() ) : $loop->the_post();?>Forum: Fixing WordPress
In reply to: Create archive page of all posts from custom post type category?I finally figured it out:
<?php
$args = array(
‘post_type’ => array( ‘wedding-styles’ ),
‘order’ => ‘asc’,
‘orderby’ => ‘title’,
‘posts_per_page’ => -1
);$loop = new WP_Query( $args );?>
<?php while ( $loop->have_posts() ) : $loop->the_post();?>Forum: Plugins
In reply to: [Custom Post Type UI] Custom post types in more than one category?Anybody? I’ve been trying to figure this out for three days with no luck. There has to be SOME way to display custom posts types in more than one archive page.
Forum: Fixing WordPress
In reply to: Create archive page of all posts from custom post type category?Yes. I already have a custom post type template for my wedding-styles category, and it is successfully displaying the posts from that category. The code I pasted above is in another template called “archive-wedding-stationery.php”. I want it to show the same posts, just in a different format.