WordPress.org

Ready to get started?Download WordPress

Forums

Page Links To
url parameters (1 post)

  1. Miguel Angel Hernaiz
    Member
    Posted 1 year ago #

    looking for redirecting with original parameters

    i tried to modify the original plugin source ( version 2.7.1 ) :

    /**
    	 * Performs a redirect, if appropriate
    	 */
    	function template_redirect() {
    		if ( !is_single() && !is_page() )
    			return;
    
    		global $wp_query;
    
    		$link = get_post_meta( $wp_query->post->ID, '_links_to', true );
    
    		if ( !$link )
    			return;
    		/* begin Modification */
                    if($_SERVER['QUERY_STRING']) {
                          $link .= '?' . $_SERVER['QUERY_STRING'];
                     }
                    /* end modification */
    		wp_redirect( $link, 301 );
    		exit;
    	}

    and works.. but maybe i´m missing something.

    Thanks all for your work.

    http://wordpress.org/extend/plugins/page-links-to/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

  • RSS feed for this topic
  • Started 1 year ago by Miguel Angel Hernaiz
  • This topic is not resolved
  • WordPress version: 3.4.1