Project custom link to open in new tab


#1

Hi there,

Is it possible to allow the project custom link for individual projects to open up in a new tab instead of refreshing into a new page, directing the user away from my page?

My web is www.ulinkchina.com


#2

Hi,

Yes, please add target="_blank" to this code, to widgets / fp-projects.php, line 115:

<a class="item-wrap" href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">

like this:

<a class="item-wrap" href="<?php the_permalink(); ?>" title="<?php the_title(); ?>" target="_blank">

Please let me know how it works.

Best Regards,
Csaba


#3

Hi csaba,

I have added the code. However, it doesnt open to a new tab.

Best,
linda


#4

Hi,

Then please try to add it to this code from line 117:

<a class="item-wrap" href="<?php echo esc_url($link); ?>">

like this:

<a class="item-wrap" href="<?php echo esc_url($link); ?>" target="_blank">

Please let me know how it works.

Best Regards,
Csaba


#5

It works great now!!

Thanks alot Csaba!!


#6

Hi,

Great! You’re most welcome! If you need help with anything else, please, feel free to open a new topic.

Have a nice day!

Best Regards,
Csaba