WordPress.org

Ready to get started?Download WordPress

Forums

WP-Cycle
links open in new window (3 posts)

  1. nomad-one
    Member
    Posted 2 years ago #

    anyone manage to get links in wp-cycle tp open in a new window? I'd be interested to know which code area to edit to get this working.

    http://wordpress.org/extend/plugins/wp-cycle/

  2. kingkin
    Member
    Posted 2 years ago #

    go to this section in the php code and overwrite the first line (seen below with the second line

    ///////////////////////////////////////////////
    this final section generates all the code that
    is displayed on the front-end of the WP Theme
    \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

    echo '';
    echo '
    ';

  3. alieneila
    Member
    Posted 2 years ago #

    Here is my solution to this that I've used, I found it to be easier than creating a lot of other code to handle a checkbox and new option and blah blah to handle it.

    In wp-cycle.php, 417 change the line

    if($data['image_links_to'])
    			echo '<a href="'.$data['image_links_to'].'">';

    to

    if($data['image_links_to']) {
    			$link = explode('|', $data['image_links_to']);
    			if ($link[1]) {
    				echo '<a href="'.$link[0].'" target="'.$link[1].'">';
    			}
    			else {
    				echo '<a href="'.$link[0].'">';
    			}
    		}

    And then in the URL field, use a pipe and put the target, such as..

    http://www.yourwebsite.com|_blank

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags