dallasbpeters
Forum Replies Created
Viewing 5 replies - 1 through 5 (of 5 total)
-
Well these forums are kinda useless eh?
Update:
I replicated the code to get those divs and now I just need to pull all the content from that taxonomy term into it. I feel I might be headed down a wrong path though. Any help would be great.
<!-- !Get the tabs --> <ul> <?php $args=array( 'orderby' => 'name', 'order' => 'ASC', 'taxonomy' => 'team' ); $categories=get_categories($args); foreach($categories as $category) { echo '<li><a href="#tab-' . $category->term_id . '" title="' . sprintf( __( "View all posts in %s" ), $category->name ) . '" ' . '>' . $category->name.'</a> </li> '; } ?> </ul> <!-- and then get the posts --> <?php $args=array( 'orderby' => 'name', 'order' => 'ASC', 'taxonomy' => 'team' ); $categories=get_categories($args); foreach($categories as $category) { echo '<div id="tab-' . $category->term_id . '">'; echo '<h2>' . sprintf( __( "%s" ), $category->name ) . '</h2>'; echo '<p>' . sprintf( __( "%s" ), $category->description ) . '</p>'; echo '</div>'; } ?>Forum: Fixing WordPress
In reply to: Disable/Change the url of the link | wp_list_categoriesyou ever get it figured out? Im trying to do the same thing. need it for some jquery tab action.
Forum: Fixing WordPress
In reply to: in sidebar, show other posts of same categorywhat if I wanted ‘Related Posts’ to be dynamic based on the category title? help?
Forum: Fixing WordPress
In reply to: Display 4 more posts from same categoryI’m trying to show one post at the top of the page. Then ALL other posts in the category with title and content (read more) included. Possible an image from a custom field. I’ve tried to figure out how this:
$cat_posts = get_posts($args); $out=''; foreach($cat_posts as $cat_post) { $out .= '<h3>'; $out .= '<a href="'.get_permalink($cat_post->ID).'">'.wptexturize($cat_post->post_title).'</a></h3>'; } $out = '<div class="cat_post">' . $out . '</div>'; echo $out;<code></code>is printing. I can’t seem to figure out how to add content under the title. Help?
Viewing 5 replies - 1 through 5 (of 5 total)