PaulWarren
Forum Replies Created
-
@wordweaver,
eliminating the box is easy – just add this to the custom CSS box:div.updated, .login .message { display: none }
Thanks Marcus – I plan on using it as soon as this can be done.
Appreciate your help!
Forum: Plugins
In reply to: 3-level nav: need to drill back up – help?This is so close to what I am looking for… how would I amend this code to get the topmost category’s child categories rather then it’s child’s child’s categories?
Thanks!
Michael –
When I add the bit of php you mentioned I get “post cat Array” instead of the category.
Yes, Richard – I am sure that they are not in multiple categories. This really isn’t the issue anyway. The issue only appears when there are NO posts in the given category.
Paul
Forum: Fixing WordPress
In reply to: weird problem trying to show random postI had a similar issue where I needed to include the content of custom fields from a random posts in a specific category in my sidebar. In case it helps anyone, here is my hodgepodge of code. — I was rather proud of myself ??
<?php query_posts('category_name=bonus_benefits&showposts=1&orderby=rand'); ?> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <?php // check for thumbnail $thumb = get_post_meta($post->ID, 'Sidebar Thumbnail', $single = true); // check for thumbnail class $sidebar_text = get_post_meta($post->ID, 'Sidebar Text', $single = true); $thumb_class = get_post_meta($post->ID, 'Thumbnail Class', $single = true); // check for thumbnail alt text $thumb_alt = get_post_meta($post->ID, 'Thumbnail Alt', $single = true); ?><?php // if there's a thumbnail if($thumb !== '') { ?> <p> <a href="<?php the_permalink(); ?>"><img src="<?php echo $thumb; ?>" class="<?php if($thumb_class !== '') { echo $thumb_class; } else { echo "sidebar-thumbnail"; } ?>" alt="<?php if($thumb_alt !== '') { echo $thumb_alt; } else { echo the_title(); } ?>" /></a></p><p><h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3> <?php echo $sidebar_text; ?> </p> <?php } // end if statement // if there's not a thumbnail else { echo ''; } ?> <?php endwhile; ?> <?php endif; ?> <?php wp_reset_query(); ?>
Forum: Fixing WordPress
In reply to: how to highlight current post?Xamataca, Can you offer the php to do this? It seems like it would really help a few others in the same bind! The ideal solution for me would be something that uses query_posts so that we can limit the posts to one category.
Forum: Fixing WordPress
In reply to: how to highlight current post?Hi Guys,
This is driving me nuts as well. Did anyone ever come up with a solution? I found this:https://www.kevinleary.net/highlight-current-wordpress-post-on-the-sidebar/
Which seemed like a good solution but I couldn’t make it work. Is there nothing like current_POST_item?
The site I am working on is visable here https://altuit.on-rev.com/cig-test/category/cignews/
The way the blog part of the site works is visible on under the left 4 menu items. Each section is pulling from a post category with
<?php query_posts(‘cat=1&showposts=3’); ?>
I was able to use conditionals to build a dynamic sidebar and highlight the active page items and the archive pages when clicked. The client really wants to highlight the active blog post. Is there any way? Is anyone having any luck with the jQuery method on Kevin Leary’s site?