1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Whats wrong with this wordpress theme?

Discussion in 'WordPress' started by Jalpari, Feb 27, 2009.

  1. #1
    I am trying to fix this problem since 4 hours but not getting i try many new themes file but getting same problem in this site, for other blog this theme works fine.

    Problem exists in featured posts blog is tech now pedia(dot)com remove the space between domain name. its posts tabs are not moving automatically, in 4 hours i ensure everything is at his place and tried different theme files, check the stye and featured file but not getting whats wrong in this blog. :confused: original theme is here http://deluxethemes.com/guzel in this theme featured posts tab are chnaged automatically.

    I tried same theme at other blog its working fine there.

    Here is featured file code.

     
    <div id="featured">
     <div id="featuredleft">
     
     <ul id="featuredposts" class="featuredposts">
     <?php 
     for($i = 1; $i <= $opt['fcatn']; $i++) {
     ?>
     <li><a href="#" rel="cat<?=$i?>" class="<?php if($i==1) print 'selected'; ?>"><?php query_posts('cat='.$opt['cat'.$i]); ?><?php single_cat_title(); ?></a></li>
     <?php
     }
     ?>
     </ul>
     <div class="clear"></div>
     <?php
     for($i = 1; $i <= $opt['fcatn']; $i++) {
     ?>
     <div id="cat<?=$i?>" class="featuredposts_content">
     <?php query_posts('showposts=1&cat='.$opt['cat'.$i]); ?>
     <?php while (have_posts()) : the_post(); ?>
     <div class="thumb"><?php echo get_the_image(array('Thumbnail','My Thumbnail'),'thumbnail'); ?></div>
     <div class="post">
      <h1><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h1>
      <div class="time"><?php the_time('l, F j, Y G:i'); ?></div>
      <div class="entry"><p><?php the_excerpt_reloaded($opt['fexcerpt'], '<a>', FALSE, FALSE, 2); ?></p></div>
      <div class="endpost">
      <div class="cat"><a href="<?php echo get_category_link($opt['cat'.$i]); ?>"><?=$l_opt['word54']?> <?php single_cat_title(); ?></a></div>
      <ul class="extra">
      <li><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?=$l_opt['word4']?></a></li>
      <li class="comments"><a href="<?php the_permalink() ?>#commenting" title="<?=$l_opt['word5']?>"><?php comments_number($l_opt['word9'],$l_opt['word10'],'% '.$l_opt['word11']); ?></a></li>
      </ul>
      </div><div class="clear"></div>
      
     </div><div class="clear">
     </div>
     <?php endwhile; ?>
     </div>
     <?php
     }
     ?>
     <script type="text/javascript">
     var featuredposts=new ddtabcontent("featuredposts")
     featuredposts.setpersist(true)
     featuredposts.setselectedClassTarget("link")
     featuredposts.init()
     </script>
     
     </div>
     <div id="featuredright">
     
     <ul id="featuredtabs" class="featuredtabs">
     <li><a href="#" rel="popular" class="selected"><?=$l_opt['word55']?></a></li>
     <li><a href="#" rel="recent"><?=$l_opt['word56']?></a></li>
     <li><a href="#" rel="comments"><?=$l_opt['word57']?></a></li>
     <li><a href="#" rel="tags"><?=$l_opt['word58']?></a></li>
     </ul>
     <div class="clear"></div>
     <div id="popular" class="featuredtabs_content">
     <ul>
     <?php
     $now = gmdate("Y-m-d H:i:s",time());
     $ap = $opt["popular"];
     $popularposts = "SELECT ID, post_title, post_date, comment_count, COUNT($wpdb->comments.comment_post_ID) AS 'popular' FROM $wpdb->posts, $wpdb->comments WHERE comment_approved = '1' AND $wpdb->posts.ID=$wpdb->comments.comment_post_ID AND post_status = 'publish' AND post_date < '$now' AND comment_status = 'open' GROUP BY $wpdb->comments.comment_post_ID ORDER BY popular DESC LIMIT $ap";
     $posts = $wpdb->get_results($popularposts);
     $popular = '';
     if($posts){
     foreach($posts as $post){
     $post_title = stripslashes($post->post_title);
     $post_date = stripslashes($post->post_date);
     $comments = stripslashes($post->comment_count);
     $guid = get_permalink($post->ID);
     $popular .= '<li><a href="'.$guid.'" title="'.$post_title.'">'.$post_title.'</a>
     <span>'.$l_opt['word59'].' <a href="'.$guid.'#commenting" title="'.$l_opt['word60'].' '.$post_title.'">'.$comments.' '.$l_opt['word11'].'</a> '.$l_opt['word61'].' '.$post_date.'</span></li>';
     }
     }echo $popular;
     ?>
     </ul>
     </div>
     <div id="recent" class="featuredtabs_content">
     <ul>
     <?php query_posts('showposts='.$opt["posts"].'&orderby=date'); ?>
     <?php while (have_posts()) : the_post(); ?>
     <li><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a>
     <span><?=$l_opt['word59']?> <?php comments_popup_link($l_opt['word9'],$l_opt['word10'],'% '.$l_opt['word11']); ?> <?=$l_opt['word61']?> <?php the_time('l, F j, Y G:i'); ?></span></li>
     <?php endwhile; ?>
     </ul>
     </div>
     <div id="comments" class="featuredtabs_content">
     <?php if (function_exists('src_simple_recent_comments')) { src_simple_recent_comments($opt["comments"], $opt["cexcerpt"], '', ''); } ?>
     </div>
     <div id="tags" class="featuredtabs_content">
     <?php wp_tag_cloud('smallest=8&largest=14&number='.$opt["tags"]); ?>
     </div>
     <script type="text/javascript">
     var featuredtabs=new ddtabcontent("featuredtabs")
     featuredtabs.setpersist(false)
     featuredtabs.setselectedClassTarget("link")
     featuredtabs.init()
     </script>
     
     </div>
     <div class="clear"></div>
    </div>
    
    PHP:

     
    Jalpari, Feb 27, 2009 IP
  2. mrhrk01

    mrhrk01 Well-Known Member

    Messages:
    664
    Likes Received:
    28
    Best Answers:
    0
    Trophy Points:
    145
    #2
    Hi

    Have you followed the author's instructions on how to get the different features posts to appear as they do on the other site(http://deluxethemes.com/guzel) you showed us ?

    Also have you edited/changed the code if so check you have not made a mistake in that.

    Thanks & Kind Regards
     
    mrhrk01, Feb 27, 2009 IP
  3. Boulder

    Boulder Well-Known Member

    Messages:
    806
    Likes Received:
    46
    Best Answers:
    0
    Trophy Points:
    118
    #3
    Looks like it could be right here man:


    <?php query_posts('showposts=1&cat='.$opt['cat'.$i]); ?>


    Try to change that showposts=1 to show how many posts you need to show!


    Boulder
     
    Boulder, Feb 27, 2009 IP
  4. dickieknee

    dickieknee Active Member

    Messages:
    441
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    80
    #4
    well if you quoted a low price then you have to grin and bear it
     
    dickieknee, Feb 27, 2009 IP
  5. Jalpari

    Jalpari Notable Member

    Messages:
    5,640
    Likes Received:
    137
    Best Answers:
    0
    Trophy Points:
    260
    #5
    Hello,
    I am not new in wordpress, i tried many techniques but not getting whats going wrong.

    Yeah i follow all the author instructions, every thing is according to the instructions, i feel u ppl r not getting what i wanna tell u.

    See in demo of theme u will see featured posts tab automatically move or highlight after few seconds but when comes to my given blog then u will see its same as demo but featured tabs are not highlighting each tab after few seconds, they r still.

    Now come to my another blog, i install same theme at my other blog its working fine here, but there i can not see theme manager and some other options in wp admin dashboard under appearance. At tech site theme options appears in admin dashboard and they all r well settled.

    i am talking about these features or options (appearnce > theme control panel and theme options and style manager)

    i am using same files and folder for both blogs but why theme options are only appears for that blog which is getting problem. Delete files many times my mind sucks after 5 hours of work :mad:

    this section is for setting no of posts per cat in featured.php not for moving tabs automatically.
     
    Jalpari, Feb 27, 2009 IP
  6. roseau

    roseau Peon

    Messages:
    266
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Hello

    The feature section is controlled in the "config.inc.php" file. Inside the file, you will find a line

    /*******************************************************
    Setting up [Featured] posts widget
    *******************************************************/
    $comfy['featured'] = 12; // ID of the featured category.
    $comfy['featured_n'] = 10; // Enter here the number of featured posts you wish to rotate
    PHP:
    You must look inside your WP for the category ID that you wish to make the featured category. When you know the number, change the "12" in this example to your ID number.

    And if you want to change the number of items that rotate, just change the "10" to however many you expect to have.

    Also, make sure ALL the plugins are activated. There are about five or six but check your plugin section to be sure.

    Let me know if you can get it working, otherwise, I can take a look for you.
     
    roseau, Feb 28, 2009 IP
  7. EnPassant

    EnPassant Active Member

    Messages:
    612
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    70
    #7
    Its much simpler issue.. actually you need to set the init() to make automatic rotation.

    I notice in the code you posted:

    
    featuredposts.init()
    
    Code (markup):
    No, should be ..

    
    featuredposts.init(10000)
    
    Code (markup):
    Everything else is fine
     
    EnPassant, Mar 3, 2009 IP
    Jalpari likes this.