I am using sirup, but the categories don't show on the first page. There is just a little black box which contains the link but no text. What to do? Grateful for any help with this.
I am using sirup, but the categories don't show on the first page. There is just a little black box which contains the link but no text. What to do? Grateful for any help with this.
I see this under "Kategorier"
* Den nya mitten
* Intervjuade
* Ledare
* Nummer 3 2010
* Ny hemsida
* På löpet
* Redaktionsblogg
and links work
am I missing something?
edit - well now you switched themes on me :>)
hi!
You can see them on the top of the page, and on the sidebar - but on the first page, there are just little black boxes above the stories.
Compare with the demo site:
http://themes.1000ff.de/
where there are categories in black boxes above the individual articles/blogposts. I tries uninstalling and reinstalling the theme, but that didn't help. I'm not using any plugins except akismet.
you don't see any words in the boxes?
like
* På löpet
* Den nya mitten
* Reportage
* Redaktionsblogg
* Porträtt
* LedareNo, only in the boxes at the top of the site just below the header - those work.
But the boxes above the individual articles are just like a little black box or line - they link to the right place, but the text isn't visible.
I still see the post titles
Yes, the post titles work - but not the category titles that are supposed to be just above every post title on the first page.
can you give your index.php file?
Below is the index.php code:
'<?php get_header(); ?>
<?php get_sidebar(); ?>
<div id="content">
<?php if (get_option('sirup_lead_story') == 'true') { ?>
<div class="feature" id="lead">
<?php $lead_cat = get_option('sirup_lead_cat'); ?>
<?php query_posts('showposts=1&cat='.$lead_cat); ?>
<?php while (have_posts()) : the_post(); ?>
<h1>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>" class="title"><?php the_title(); ?></h1>
<?php if /* Check if there even is an image */ (get_post_custom_values("Image") != '') { ?>
" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">
<img src="<?php bloginfo('url'); echo get_option('sirup_upload_path'); $values = get_post_custom_values("Image"); echo $values[0]; ?>" alt="" id="leadpic" width="<?php echo get_option('sirup_thumb_lead'); ?>"/>
<?php } ?>
<?php the_excerpt(); ?>
<?php endwhile; ?>
</div>
<?php } ?> <!-- END LEAD STORY -->
<?php if (get_option('sirup_theme_style') == 'magazine') { ?>
<div class="frontcol">
<?php $display_categories = explode(',', get_option('sirup_left_cat') ); foreach ($display_categories as $category) { ?>
<div class="clearfloat">
<?php query_posts("showposts=1&cat=$category"); $wp_query->is_category = false; $wp_query->is_archive = false; $wp_query->is_home = true; ?>
<?php while (have_posts()) : the_post(); ?>
<h3>"><?php single_cat_title(); ?></h3>
<h2>" rel="bookmark" class="title"><?php the_title(); ?>»</h2>
<?php $values = get_post_custom_values("Image"); if (isset($values[0])) { ?>
" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">
<img src="<?php bloginfo('url'); echo get_option('sirup_upload_path'); $values = get_post_custom_values("Image"); echo $values[0]; ?>" alt="" width="<?php echo get_option('sirup_thumb_cat'); ?>"/>
<?php } ?>
<?php the_excerpt(); ?>
<?php endwhile; ?>
</div>
<?php } ?>
</div>
<div class="frontcol">
<?php $display_categories = explode(',', get_option('sirup_right_cat') ); foreach ($display_categories as $category) { ?>
<div class="clearfloat">
<?php query_posts("showposts=1&cat=$category"); $wp_query->is_category = false; $wp_query->is_archive = false; $wp_query->is_home = true; ?>
<?php while (have_posts()) : the_post(); ?>
<h3>"><?php single_cat_title(); ?></h3>
<h2>" rel="bookmark" class="title"><?php the_title(); ?>»</h2>
<?php $values = get_post_custom_values("Image");
if (isset($values[0])) { ?>
" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">
<img src="<?php bloginfo('url'); echo get_option('sirup_upload_path'); $values = get_post_custom_values("Image"); echo $values[0]; ?>" alt="" width="100"/>
<?php } ?>
<?php the_excerpt(); ?>
<?php endwhile; ?>
</div>
<?php } ?>
</div>
<?php } ?><!-- END MAGAZINE -->
<?php if (get_option('sirup_theme_style') == 'blog') { ?>
<?php $lead_cat = get_option('sirup_lead_cat'); /* Make pagination work */ if ($paged == '') $offsetcount = 0; else $offsetcount=($posts_per_page*$paged)-$posts_per_page;
query_posts('cat=-'. $lead_cat .'&offset='. $offsetcount .''); ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="post">
<h2>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></h2>
<small><?php the_time('F jS, Y') ?></small>
<div class="entry">
<?php the_content() ?>
</div>
<p class="postmetadata">
Posted in <?php the_category(', ') ?> by <?php the_author_posts_link() ?> | <?php edit_post_link('Edit', '', ' | '); ?>
<?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?>
</p>
</div>
<?php endwhile; ?> <?php endif; ?>
<div class="navigation">
<div class="alignleft"><?php next_posts_link('« Previous Entries') ?></div>
<div class="alignright"><?php previous_posts_link('Next Entries »') ?></div>
</div>
<?php } ?>
<?php if (get_option('sirup_gray_boxes') == 'true') { ?>
<div id="frontpage">
<div class="box-left">
<h2>Nya Kommentarer</h2>
<?php global $wpdb;
$sql = "SELECT DISTINCT ID, post_title, post_password, comment_ID,
comment_post_ID, comment_author, comment_date_gmt, comment_approved,
comment_type,comment_author_url,
comment_content AS com_excerpt
FROM $wpdb->comments
LEFT OUTER JOIN $wpdb->posts ON ($wpdb->comments.comment_post_ID =
$wpdb->posts.ID)
WHERE comment_approved = '1' AND comment_type = '' AND
post_password = ''
ORDER BY comment_date_gmt DESC
LIMIT ". get_option('sirup_comments') ."";
$comments = $wpdb->get_results($sql);
$output = $pre_HTML;
$output .= "\n
foreach ($comments as $comment)
{
if(strlen($comment->com_excerpt) > 25) $comment->com_excerpt = substr($comment->com_excerpt, 0, 25) . "...";
$output .= "\n
$output .= "\n
?>
</div>
<div class="box-right">
<h2>Nya Artiklar</h2>
<?php endforeach; ?>
</div>
<div class="box-left">
<h2>Slumpade Artiklar</h2>
<?php endwhile; ?>
</div>
<div class="box-right">
<h2>Taggar</h2>
<?php $stags = get_option('sirup_tags'); ?>
<?php wp_tag_cloud('smallest=10&largest=12&order=DESC&orderby=count&number='.$stags); ?>
</div>
</div>
<?php } ?>
</div>
<?php get_footer(); ?>'
replase <?php single_cat_title(); ?> with <?php single_cat_title('',true); ?>or <?php the_category(', ') ?>
Ok, we are getting somewhere but this is weird:
- if I use your first suggestion,'<?php single_cat_title('',true); ?>' the categories on the left hand side work but not the right hand side.
- If I use your other suggestion, '<?php the_category(', ') ?>' the right hand side works but not the left hand side.
What can I do about that?
@chinmoy29 is on to something:
http://wordpress.org/support/topic/problem-with-single_cat_title-after-upgrading-to-wordpress-30?replies=9
try and replace:
<?php single_cat_title(); ?>
(which appears two times in your code)
with:
<?php echo get_cat_name($ategory); ?>
the php echo didn't work, but the
'<?php the_category(', ') ?>'
did work, when I put it in properly in both places.
THANK YOU so much for your help! I am forever in gratitude!
This topic has been closed to new replies.