Blaque
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Multiple category posts – exclude certain categoryThanks, ninjagowoo, for that reply. As I am not very skilled at all in PHP programming, would you be able to provide me with some more details of how I would go about?
Thanks, Johan, for your help. I might be a complete idiot, but where do I find the CSS file containing the
widget_custom_post_widget
class? In other words, how do I style the content block posts individually or class-wise?Is there a way to change how the Content Blocks are displayed, i.e. specify CSS category?
Would appreciate any guidance!
Forum: Fixing WordPress
In reply to: 500 Error on permalinks!I had the same problem, permalinks didn’t work but returned a 500 error. Just change the RewriteRule line in the .htaccess so it fits your new domain name.
Forum: Fixing WordPress
In reply to: Latest post shows twiceI think it has something to do with that initial exclusion of category 2 posts from the home page. But I have no idea what the problem is!?
Forum: Fixing WordPress
In reply to: Show category posts in sidebar onlyNothing happened with that extra if tag in the sidebar.php. I managed to solve it, though!
By adding the following code after the header call in the index.php file:
<?php if ( is_home() ) { query_posts($query_string . '&cat=-2'); } ?>
And adding this to the sidebar.php file:
<?php query_posts('cat=2&showposts=3'); ?> <?php while (have_posts()) : the_post(); ?> <ul> <li> <a href="<?php the_permalink(); ?>"> <div style="font-weight: bold"><?php the_title(); ?></div> <?php the_excerpt(); ?> </a> </li> </ul> <?php endwhile; ?>
Category 2 posts are excluded from the home page, but show up in the sidebar.
Forum: Fixing WordPress
In reply to: Show category posts in sidebar onlySorry for the delay, chinmoy29, I’ve been out of town for a while.
Here’s the sidebar.php file. I have the three most recent posts from category 2 displaying, but for some reason the latest post (no matter what category) is diplayed before the three category 2 posts. Can’t see why!?
But, the main issue is that I want category 2 posts to be displayed in the sidebar only on the main page.
<div id="sidebar1"> <ul> <li> <h2 style="font-color: #000000;"><img src="https://www.xyz.se/images/bulletlarge.jpg"/> Senaste programmen</h2> <?php $recent = new WP_Query(); ?> <?php $recent->query('cat=2&showposts=3'); ?> <?php while($recent->have_posts()) : $recent->the_post(); ?> <ul> <li> <a href="<?php the_permalink(); ?>"> <div style="font-weight: bold"><?php the_title(); ?></div> <?php the_excerpt(); ?> </a> </li> </ul> <?php endwhile; ?> </ul> </li> </ul> <div style="font-weight: bold;"> > <a href="https://www.xyz.se/?cat=2">Till programarkivet</a></div> </div> <div id="sidebar1"> <ul> <h2><img src="https://www.xyz.se/images/bulletlarge.jpg"/> S?k</h2><ul> <div id="search"><?php include (TEMPLATEPATH . '/searchform.php'); ?> </ul> <ul><li> <h2><img src="/images/bulletlarge.jpg"/> Mest l?¤sta</h2> <ul> <?php todays_count_widget('bes?k', 'ul'); ?> </ul> </li> <ul> <li><img src="/images/bulletlarge.jpg"/> <?php src_simple_recent_comments(); ?> </ul> </li> <h2><img src="/images/bulletlarge.jpg"/> Prenumerera</h2> <p><a href="https://feeds.feedburner.com/xyz" rel="alternate" type="application/rss+xml"><img src="https://www.feedburner.com/fb/images/pub/feed-icon16x16.png" alt="" style="vertical-align:middle;border:0"/></a> <a href="https://feeds.feedburner.com/xyz" rel="alternate" type="application/rss+xml"><font color="#000000">PodCast</font></a></p> <p> <li><a href="<?php bloginfo('rss2_url'); ?>"><font color="#000000">RSS - Artiklar</font></a></li> <li><a href="<?php bloginfo('comments_rss2_url'); ?>"><font color="#000000">RSS - Kommentarer</font></a></li> <li> <a href="https://www.feedburner.com/fb/a/emailverifySubmit?feedId=312442&loc=en_US"> <font color="#000000">Radio UPF via Epost</font></a></li> <ul> </div>
Thanks alot for your time and efforts!
Forum: Fixing WordPress
In reply to: Show category posts in sidebar onlySure, this is the index.php file:
<?php get_header(); ?> <div id="content"> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <div class="post" id="post-<?php the_ID(); ?>"> <h1><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h1> <p class="postmetadata">I <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?> <?php the_time('l, F jS, Y') ?> | <?php comments_popup_link('0 Kommentarer »', '1 Kommentar »', '% Kommentarer »'); ?> | <?php if(function_exists('wp_print')) { print_link(); } ?> | <a href="<?php trackback_url(true); ?> " rel="trackback">Trackback</a></p> <span style="display:none;"><?php todays_overall_count($post->ID, '', '', '', '0'); ?></p></span> <div class="entrytext"> <?php the_content('Forts?¤tt l?¤sa artikeln »'); ?> </div> </div> <?php endwhile; ?> <div class="navigation"> <div class="alignleft"><?php next_posts_link('??ldre inslag') ?></div> <div class="alignright"><?php previous_posts_link('Nyare inslag') ?></div> </div> <?php else : ?> <h2 class="center">Vi hittar inte det du s??ker.</h2> <p class="center">Vi hittar ingen matchning till den s??ktermen. Prova n?¥got annat.</p> <?php include (TEMPLATEPATH . "/searchform.php"); ?> <?php endif; ?> </div> <?php get_sidebar(); ?> <?php get_footer(); ?>
Forum: Fixing WordPress
In reply to: Show category posts in sidebar onlyHmm, the page won’t even load when I put that code into my index.php file. Am I perhaps doing something wrong?