logo
Ask your WordPress questions! Pay money and get answers fast! (more info)

Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.

If the asker does not get an answer then they have 10 days to request a refund.

$10
Autofocus+ Pro – remove sticky posts, but keep in slider

Hey guys, me again.

I need to remove sticky posts from index loop (the portfolio image grid), but not from the featured content area (slider) in Autofocus Pro.

I'm hoping it's a simple procedure. I'm still getting my head around PHP syntax so I'm having a bit of trouble. I've isolated the code that is responsible, but keep breaking stuff.

I'd appreciate any help :)


Cheers,
Marcel

This question has been answered.

folette | 09/12/10 at 7:45am Edit


(3) Possible Answers Submitted...

See a chronological view of answers?

Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.

  • avatar
    Last edited:
    09/12/10
    8:00am
    Kaavs says:

    Hi Marcel,

    You might want to read up on this...

    http://www.nathanrice.net/blog/definitive-sticky-posts-guide-for-wordpress-27/

    Cheers,
    Kaavs

    • 09/12/10 8:35am

      folette says:

      thanks for the advice Kaavs :) will definitely be helpful to understand the problem better.

  • avatar
    Last edited:
    09/12/10
    7:02pm
    Denzel Chia says:

    Hi,

    Find the following in thematic-functions.php and comment out
    I think its at line 294 or lower.


    //add_action('thematic_above_indexloop','af_sticky_area');


    I do not have the paid version of autofocus pro theme, only the free version, therefore maybe its not the same.

    Tell me if it doesn't work.

    Thanks.

    Previous versions of this answer: 09/12/10 at 8:04am

    • 09/12/10 8:07am

      Denzel Chia says:

      Hi,

      I think its wrong info. Working on it again.

      Thanks.

    • 09/12/10 8:10am

      Denzel Chia says:

      Hi,

      Can you post the isolated code here?
      I see what I can do.

      Thanks.

    • 09/12/10 8:34am

      folette says:

      Hey Denzel, sent you the code I need looked at

      Cheers!

    • 09/12/10 9:10am

      Denzel Chia says:

      Hi,

      I attached a screenshot of my setup.
      Is the area circled in red, the area you want to remove?
      It is four sidebars above the footer.

      Thanks.

      Attached Image

    • 09/12/10 10:41am

      Denzel Chia says:

      Hi,

      Please put the following in thematic-functions.php
      at the beginning of the file and below the <?php tag


      function remove_thematic_actions_by_autofocus(){
      //remove thematic index loop
      remove_action('thematic_indexloop', 'thematic_index_loop');
      }
      add_action('init','remove_thematic_actions_by_autofocus');

      // new autofocus index Loop
      function autofocus_index_loop() {
      global $options;
      foreach ($options as $value) {
      if (get_option( $value['id'] ) === FALSE) { $$value['id'] = $value['std']; }
      else { $$value['id'] = get_option( $value['id'] ); }
      }
      /* Count the number of posts so we can insert a widgetized area */ $count = 1;
      //add query to remove all sticky post
      query_posts(array("post__not_in" =>get_option("sticky_posts")));
      while ( have_posts() ) : the_post() ?>

      <div id="post-<?php the_ID() ?>" class="<?php thematic_post_class() ?>">
      <?php thematic_postheader();// this is the post header that show thumbnails ?>
      <div class="entry-content">
      <?php thematic_content(); ?>

      <?php wp_link_pages('before=<div class="page-link">' .__('Pages:', 'thematic') . '&after=</div>') ?>
      </div>
      <?php thematic_postfooter(); ?>
      </div><!-- .post -->

      <?php comments_template();

      if ($count==$thm_insert_position) {
      get_sidebar('index-insert');
      }
      $count = $count + 1;
      endwhile;
      }

      add_action('thematic_indexloop', 'autofocus_index_loop');


      This code will remove the original thematic index loop and add out new index loop that removes the stick post from query.
      This does not affect slider.

  • avatar
    Last edited:
    09/12/10
    9:12am
    akosipau says:

    hey mate could you paste or send me the featured area code and the index loop

This question has expired.





Current status of this question: Completed



Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.

If the asker does not get an answer then they have 10 days to request a refund.