Title: Oliver Farrell's Replies | WordPress.org

---

# Oliver Farrell

  [  ](https://wordpress.org/support/users/oliverfarrell/)

 *   [Profile](https://wordpress.org/support/users/oliverfarrell/)
 *   [Topics Started](https://wordpress.org/support/users/oliverfarrell/topics/)
 *   [Replies Created](https://wordpress.org/support/users/oliverfarrell/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/oliverfarrell/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/oliverfarrell/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/oliverfarrell/engagements/)
 *   [Favorites](https://wordpress.org/support/users/oliverfarrell/favorites/)

 Search replies:

## Forum Replies Created

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

 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [Excerpt Link](https://wordpress.org/support/topic/excerpt-link/)
 *  [Oliver Farrell](https://wordpress.org/support/users/oliverfarrell/)
 * (@oliverfarrell)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/excerpt-link/#post-2854151)
 * I noticed that you have two functions declared to remove the read more hash, 
   maybe try deleting the second one.
 * It’s likely that there’s some conflict with another function.
 * Let me know whether removing the duplicate function works for you.
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [Excerpt Link](https://wordpress.org/support/topic/excerpt-link/)
 *  [Oliver Farrell](https://wordpress.org/support/users/oliverfarrell/)
 * (@oliverfarrell)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/excerpt-link/#post-2854114)
 * By default WordPress will add the ‘#more-‘ after your posts permalinks. It enables
   people to skip to the rest of the article if they have read the excerpt.
 * To remove that, you need to add the following to your functions.php
 *     ```
       function removeReadMoreHash($link) {
          $offset = strpos($link, '#more-');
          if ($offset) {
       	  $end = strpos($link, '"',$offset);
          }
          if ($end) {
       	  $link = substr_replace($link, '', $offset, $end-$offset);
          }
          return $link;
       }
       add_filter('the_content_more_link', 'removeReadMoreHash');
       ```
   
 * That should do the trick.
 *   Forum: [Everything else WordPress](https://wordpress.org/support/forum/miscellaneous/)
   
   In reply to: [Custom post structure vs sub-folder](https://wordpress.org/support/topic/custom-post-structure-vs-sub-folder/)
 *  [Oliver Farrell](https://wordpress.org/support/users/oliverfarrell/)
 * (@oliverfarrell)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/custom-post-structure-vs-sub-folder/#post-2808046)
 * You could create a category called ‘blog’ and then attach the category to all
   your blog posts. Then, from your permalinks settings change them to ‘/%category%/%
   postname%/’. That way only your blog posts will have the ‘blog’ slug before them.
 * Of course, this solution assumes you aren’t going to be using the categories 
   functionality for anything else.
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [wp_link_pages Next/Prev Links in Separate Divs?](https://wordpress.org/support/topic/wp_link_pages-nextprev-links-in-separate-divs/)
 *  [Oliver Farrell](https://wordpress.org/support/users/oliverfarrell/)
 * (@oliverfarrell)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/wp_link_pages-nextprev-links-in-separate-divs/#post-2802154)
 * Not a problem, sorry it took me a while to understand the question aha 🙂
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [wp_link_pages Next/Prev Links in Separate Divs?](https://wordpress.org/support/topic/wp_link_pages-nextprev-links-in-separate-divs/)
 *  [Oliver Farrell](https://wordpress.org/support/users/oliverfarrell/)
 * (@oliverfarrell)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/wp_link_pages-nextprev-links-in-separate-divs/#post-2802151)
 * Ah! My apologies, should have read your question more thoroughly.
 * I’m not wholly familiar with the function but I believe it is possible to place
   them in their own divs based on the example in the codex ([http://codex.wordpress.org/Template_Tags/wp_link_pages](http://codex.wordpress.org/Template_Tags/wp_link_pages))
 * You could try something like this maybe?
 *     ```
       <?php $args = array(
           'before'           => '<div class="page-link-next-prev">',
           'after'            => '</div>',
           'link_before'      => ,
           'link_after'       => ,
           'next_or_number'   => 'next',
           'nextpagelink'     => __('<div class="next">Continue Reading</div>'),
           'previouspagelink' => __('<div class="prev">Go Back</div>'),
           'pagelink'         => '%',
           'more_file'        => ,
           'echo'             => 1 ); ?>
   
       <?php wp_link_pages( $args ); ?>
       ```
   
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [Function to load on homepage only in function.php](https://wordpress.org/support/topic/function-to-load-on-homepage-only-in-functionphp/)
 *  [Oliver Farrell](https://wordpress.org/support/users/oliverfarrell/)
 * (@oliverfarrell)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/function-to-load-on-homepage-only-in-functionphp/#post-2804649)
 * Ah! That would make sense 🙂 That could save me a lot of messing about.
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [Function to load on homepage only in function.php](https://wordpress.org/support/topic/function-to-load-on-homepage-only-in-functionphp/)
 *  [Oliver Farrell](https://wordpress.org/support/users/oliverfarrell/)
 * (@oliverfarrell)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/function-to-load-on-homepage-only-in-functionphp/#post-2804647)
 * Oops, that’ll teach me to post before refreshing. Bronson’s suggestion should
   work just fine.
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [Function to load on homepage only in function.php](https://wordpress.org/support/topic/function-to-load-on-homepage-only-in-functionphp/)
 *  [Oliver Farrell](https://wordpress.org/support/users/oliverfarrell/)
 * (@oliverfarrell)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/function-to-load-on-homepage-only-in-functionphp/#post-2804646)
 * What Bronson suggested should work just fine (if the homepage/front page are 
   the pages you want to disable the scripts).
 * If there is a specific page/s you wish to disable the scripts on, do the following.
 *     ```
       if ( is_page('about') || is_page('hello-world') ) {
       function wpsc_deregister_scripts() {
       	wp_deregister_script( 'wpsc-thickbox' );
       	wp_deregister_script( 'jquery-rating' );
       	wp_deregister_script( 'wp-e-commerce' );
       	wp_deregister_script( 'jQuery' );
       	wp_deregister_script( 'infieldlabel' );
       	wp_deregister_script( 'wp-e-commerce-ajax-legacy' );
       	wp_deregister_script( 'wp-e-commerce-dynamic' );
       	wp_deregister_script( 'livequery' );
       	wp_deregister_script( 'wp-e-commerce-legacy' );
       	wp_deregister_script( 'l10n' );
       	wp_deregister_script( 'wpsc-gold-cart' );
       }
       add_action( 'wp_print_scripts', 'wpsc_deregister_scripts', 100 );
       }
       ```
   
 * Alternatively, if there is a top-level page and it’s sub pages you wish the disable
   the scripts one, try looking into the ‘is_tree()’ function.
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [wp_link_pages Next/Prev Links in Separate Divs?](https://wordpress.org/support/topic/wp_link_pages-nextprev-links-in-separate-divs/)
 *  [Oliver Farrell](https://wordpress.org/support/users/oliverfarrell/)
 * (@oliverfarrell)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/wp_link_pages-nextprev-links-in-separate-divs/#post-2802089)
 * I have a function in my functions.php for handling this. It’s a nice a clean 
   way of doing it really.
 * Add this to your functions.php file:
 *     ```
       function ShowPostsNav() {
          global $wp_query;
          return ($wp_query->max_num_pages > 1);
       }
       ```
   
 * And then put this wherever you want the links to appear:
 *     ```
       <?php if ($wp_query->max_num_pages > 1) : ?>
          <?php next_posts_link(__('<span class="older_posts">&larr; Older posts</span>')); ?>
          <?php previous_posts_link(__('<span class="newer_posts">Newer posts &rarr;</span>')); ?>
       <?php endif; ?>
       ```
   
 * Should work just fine for you 🙂

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