Home › Forums › Photo World/Photo Session Support › Adding 'target=blank' to homepage and navigation links?
- This topic has 3 replies, 2 voices, and was last updated 9 years, 11 months ago by Sonl Sinha.
-
AuthorPosts
-
January 12, 2015 at 4:19 pm #3348
Is it possible to make the links in the Photo World navigation and front page slider open in new windows?
The new site I’m working on uses the slider (and a link in the navigation) to link to various events on different sites, and I’d like to be able to generate a new browser tab if I could. Thanks in advance.
<b>On Edit:</b> I was able tofix the navigation link via WordPress’ Advanced Menu options. If there’s a way to do that to the home page links, it would be perfect.
Don
January 13, 2015 at 10:39 am #3367Hi,
Check functions.php line number 320 to 322.
Replace with the following code and save: if( $imgUrl != ” ){
echo ‘{image : \”.$imgUrl.’\’, title : \”.( ($imgTitle!=”) ? ‘<div class=”slide-title”><span>’ : ” ).( ($imgHref!=” && $imgTitle!=”) ? ‘<a href=”‘.$imgHref.'” target=”_blank”>’ : ”).$imgTitle.( ($imgHref!=” && $imgTitle!=”) ? ‘</a>’ : ”).( ($imgTitle!=”) ? ‘</span></div>’ : ” ).( ($imgDesc!=”) ? ‘<div class=”slide-description”><span>’.esc_html($imgDesc).'</span></div>’ : ” ).( ($imgHref != ”) ? ‘<div class=”slide-description”><span><a href=”‘.$imgHref.'” target=”_blank”>Read More ›</a></span></div>’ : ”).’\’, thumb : \”.$imgUrl.’\’, url : \’\’}’.( ($i==15) ? “” : “,”).”\n”;
}
January 13, 2015 at 1:45 pm #3375Okay, I tried that and got this error:
Parse error: syntax error, unexpected ‘{‘ in /home/twisted/www/www/wp-content/themes/skt-photo-world-pro/functions.php on line 320
I reloaded functions.php from my local ‘clean’ copy and the error went away.
Here is code from line 320 to 322:
<?php
if ( (of_get_option('innerpageslider', true) != 'hide') || is_home() || is_front_page() ) {
for ($i=1;$i<16;$i++) {
Am I misplacing the new code? Should the
<?php
stay?Thanks.
January 14, 2015 at 1:21 pm #3386Hi,
That is totally wrong. On my Mac it appears Line number: 181.
Starting line search this: if( $imgUrl !=
This instance is only 1. Then replace this code: if( $imgUrl != ” ){
echo ‘{image : \”.$imgUrl.’\’, title : \'<div class=”slide-title”><span>’.( ($imgHref!=” && $imgTitle!=”) ? ‘<a href=”‘.$imgHref.'”>’ : ”).$imgTitle.( ($imgHref!=” && $imgTitle!=”) ? ‘</a>’ : ”).'</span></div><div class=”slide-description”><span>’.$imgDesc.'</span></div>’.( ($imgHref != ”) ? ‘<div class=”slide-description”><span><a href=”‘.$imgHref.'”>Read More ›</a></span></div>’ : ”).’\’, thumb : \”.$imgUrl.’\’, url : \’\’},’.”\n”;
With the top code as given above.
Regards,
Shri
-
AuthorPosts
- You must be logged in to reply to this topic.