Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter oldnumber9

    (@oldnumber9)

    OK here is the code that I am using (the issue is towards the bottom):

    <div <?php post_class() ?> id="post-<?php the_ID(); ?>">
    <div id="<?php foreach((get_the_category()) as $category) {echo $category->cat_name . '-'; } ?>tag">
    <!-- VARIABLE CAT IMAGE -->
    <?php
    $the_cat = get_the_category();
    $category_name = $the_cat[0]->cat_name;
    $category_description = $the_cat[0]->category_description;
    $category_link = get_category_link( $the_cat[0]->cat_ID ); ?>
    <a href="<?php echo $category_link; ?>"><img title="<?php echo $category_description; ?>" src="<?php bloginfo('template_url'); ?>/images/<?php echo $category_name; ?>-tag.png" alt="<?php echo $category_name; ?>" /></a>
    </div>
    <!-- THUMB IMAGE -->
    <a href="<?php the_permalink() ?>" title="<?php the_title(); ?>">
    <img src="<?php $values = get_post_custom_values("thumb"); echo $values[0]; ?>" alt="<?php the_title(); ?>" class="thumb" /></a>
    <!-- HEADING -->
    <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
    <span class="entry"><?php the_excerpt(); ?></span>
    </div>

    And this is what is generated:

    <div class="post-46 post hentry category-nw" id="post-46">
    <div id="news-tag">
    <!-- VARIABLE CAT IMAGE -->
    <a href="https://www.oldnumbernine.com/mcjh/?cat=3">
    <img title="" src="https://www.oldnumbernine.com/mcjh/wp-content/themes/default/images/news-tag.png" alt="news" /></a>
    </div>
    <!-- THUMB IMAGE -->
    <a href="https://www.oldnumbernine.com/mcjh/?p=46" title="and another one"><img src="https://www.oldnumbernine.com/mcjh/wp-content/uploads/2009/07/GripTrixPhoto-180x180.jpg" alt="and another one" class="thumb" /></a>
    <!-- HEADING -->
    <h2><a href="https://www.oldnumbernine.com/mcjh/?p=46" rel="bookmark" title="Permanent Link to and another one">and another one</a></h2>
    <span class="entry"><p>eu quam, turpis amet Pellentesque fames mi habitant vitae morbi ultricies ultricies tempor sit semper. ac eget, egestas. quam et tortor placerat [...]</p><p></p></span>
    </div>

    Hope thats not too much information.

    EDIT: get_the_excerpt() returns nothing for me. Just an empty span.

    That works great! You just solved 60 min of frustration.

    Forum: Plugins
    In reply to: Get Category URL
    Thread Starter oldnumber9

    (@oldnumber9)

    Success!! Thanks so much for your help!

    Forum: Plugins
    In reply to: Get Category URL
    Thread Starter oldnumber9

    (@oldnumber9)

    You are right about the loop. What I have now is an icon that changes depending on the category the img src returns. There will only be one category assigned to each post, so I need the icon to link to that category. Does that make any since?

    Thanks for you help!

    Thread Starter oldnumber9

    (@oldnumber9)

    Thanks isa.goksu. The error you pointed out led me to file permissions. It seems that most of the files in the proplayer directory were set to 755 not 644. Changing them to 644 seemed to fix the issue. Thanks again!

Viewing 5 replies - 1 through 5 (of 5 total)