go41

Re: Featured articles on all pages :: Reply by master

von Joern am 23. Nov. 2009 | Keine Kommentare

You want to show only the featured section on all pages, but not the headline? If this is the case, I got an idea! I would put the featured section into the sidebar.php. Setting the condition to show only if it’s not home, it will come only on all other views except frontpage view, where this section is shown anyway.

Easy to try, but BACKUP sidebar.php FIRST!!
Now edit sidebar.php and put the featured code after <div id="sidebar"> and before <div id="sidebar-ads">
On top of sidebar.php you find: <div id="sidebar">

get some more space (blank lines) below that and push <div id="sidebar-ads"> down some lines.
Now copy and paste the following code in this place:
Code:

<?php if(!is_home()) {  //start featured if is not home ?>
<div id="featured">
   <img src="<?php echo get_option('home'); ?>/wp-content/themes/arthemia/images/featured.png" width="72px" height="17px" alt="" />
   <?php query_posts("showposts=4&category_name=Featured"); ?>
   <?php while (have_posts()) : the_post(); ?>
   <div class="clearfloat">
      <?php $values = get_post_custom_values("Image"); if (isset($values[0])) { ?>
      <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">
         <img src="<?php echo bloginfo('template_url'); ?>/scripts/timthumb.php?src=/<?php $values = get_post_custom_values("Image"); echo $values[0]; ?>&w=100&h=65&zc=1&q=100" alt="<?php the_title(); ?>" class="left" width="100px" height="65px"  />
         </a>
    <?php } ?>
         <div class="info"><a href="<?php the_permalink() ?>" rel="bookmark" class="title"><?php the_title(); ?></a>
            <div class="meta">[<?php the_time('j M Y') ?> | <?php comments_popup_link('No Comment', 'One Comment', '% Comments');?> | <?php if(function_exists('the_views')) { the_views(); } ?>]</div>
         </div>
   </div>
   <?php endwhile; ?>
</div>
<?php } //end featured if is not home ?>

Save it to your site and look..
____________________
you find me on Google+, Twitter and Facebook

(von: master)

Hier noch 1 weitere Ergebnisse dieses Threads:

Featured articles on all pages

23. Nov. 2009 (von: four09)

Hi there,I am trying to figure out how I can get the "featured" section in Arthemia free to show on all pages. Obviously, it shows on the home page and also on the prev/next pages but I'd like to have…

Autor:

Du findest mich auch auf Twitter und Facebook!

Schreibe einen Kommentar

Pflichtfelder sind mit * markiert.


Diese Website verwendet Akismet, um Spam zu reduzieren. Erfahre mehr darüber, wie deine Kommentardaten verarbeitet werden.

weitere forum Beiträge: