Forums Forums Search & Filter Pro Open result links in same window

Viewing 3 posts - 11 through 13 (of 13 total)
  • Anonymous
    #188357
    <?php
    /**
     * Starts Headway
     *
     * @package Headway
     * @author Clay Griffiths
     */
    
    /* Prevent direct access to this file */
    if ( !defined('WP_CONTENT_DIR') )
    	die('Please do not access this file directly.');
    
    /* Make sure PHP 5.2 or newer is installed and WordPress 3.2 or newer is installed. */
    require_once get_template_directory() . '/library/common/compatibility-checks.php';
    
    /* Load Headway! */
    require_once get_template_directory() . '/library/common/functions.php';
    require_once get_template_directory() . '/library/common/application.php';
    
    Headway::init();
    
    // THIS LINKS THE THUMBNAIL TO THE POST PERMALINK
     
    add_filter( 'post_thumbnail_html', 'my_post_image_html', 10, 3 );
     
    function my_post_image_html( $html, $post_id, $post_image_id ) {
     
    $html = '<a href="' . get_permalink( $post_id ) . '" target="_blank" title="' . esc_attr( get_post_field( 'post_title', $post_id ) ) . '" >' . $html . '</a>';
     
    return $html;
    }
    
    //ADDING NEXT AND PREVIOUS LINKS, USE SHORT CODE [previous-next-post-links] IN LOOP BUDDY SHORTCODE//
    
    function my_previous_next_post() {
    // retrieve the value for next post link
    $next_string = "Next >>";
    ob_start();
    next_post_link("%link", $next_string,$in_same_cat="true");
    $next_link = ob_get_clean();
    
    // retrieve the value for previous post link
    $previous_string = "<< Previous";
    ob_start();
    previous_post_link("%link", $previous_string,$in_same_cat="true");
    $previous_link = ob_get_clean();
     
    // build output
    $return = PHP_EOL . '<div id="next-previous" class="navigation clearfix">' . PHP_EOL;
     
    // display previous link if any
    if ($previous_link) {
    $return .= '<div class="nav-previous alignleft">'. PHP_EOL;
    $return .= $previous_link. PHP_EOL;
    $return .= '</div>'. PHP_EOL;
    }
     
    // display next link if any
    if ($next_link) {
    $return .= '<div class="nav-next alignright">'. PHP_EOL;
    $return .=  $next_link . PHP_EOL;
    $return .= '</div>'. PHP_EOL;
    }
     
    $return .= '</div>';
     
    return $return;
    }
    add_shortcode('previous-next-post-links', 'my_previous_next_post');
    
    //SORT AJAX QUERY FILTER ALPHABETICALLY//
    add_filter('ajax_wpqsf_query','title_sorting_fn','',2);
    function title_sorting_fn($args, $id){
    $args['orderby'] = 'title';
    $args['order'] = 'ASC';
    return $args;
    }
    
    Anonymous
    #188359

    Ok thanks for jogging my memory. This is my functions.php file. What should target= ?

    Anonymous
    #188361

    I think I got it. Changed it to _self. Thank you so much for your help, Trevor. I really appreciate it… especially after seeing it wasn’t your plug-in causing the issue!!

Viewing 3 posts - 11 through 13 (of 13 total)