badget

Biggest Sale! Special Offer!

Get 30% discount on all of our single themes with this coupon code: #30%SALE

Hurry up! *Limited time offer*

How to add target_blank tag on a Slider image Redirect Link

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #11075
    Marguerite
    Participant

    I’m wanting to add a Redirect Link to one of my Featured Image Slider images that takes you to a new blank window (target_blank)
    Where can I add the code for this so that when user clicks the slider image it opens in a different browser window?

    Here is link to my site.
    http://192.145.238.144/~insigh53/

    thanks!

    #11076
    Marguerite
    Participant

    I’m wanting to add a Redirect Link to one of my Featured Image Slider images that takes you to a new blank window (target_blank)
    Where can I add the code for this so that when user clicks the slider image it opens in a different browser window?

    Here is link to my site.

    http://192.145.238.144/~insigh53/

    thanks!

    #11087

    Hi Marguerite,

    Are you using the featured post slider or featured image slider. To use target_blank you need code customization inside attitude-pro -> library -> structure -> header-extensions.php

    If you are using featured post slider then on line no 537 remove this line
    $attitude_featured_post_slider .= '<figure><a href="' . get_permalink() . '" title="'.the_title('','',false).'">'; and add this

    $attitude_featured_post_slider .= '<figure><a href="' . get_permalink() . '" title="'.the_title('','',false).'" target="_blank">';

    if you are using featured image slider then on line no 598 remove this line
    $attitude_featured_image_slider .= '<figure><a href="' . esc_url( $redirect_link ) .'" title="' . esc_attr( $title ) . '" >';and add
    $attitude_featured_image_slider .= '<figure><a href="' . esc_url( $redirect_link ) .'" title="' . esc_attr( $title ) . '" target="_blank" >';

    hope this may help you but we recommended not to change the code because if you change the code then while updating to our new version all the customization code will be lost. So better make a child theme and first unhook the functions and then you may edit the code will be the best solution.

    Thank you!

    #11111
    Marguerite
    Participant

    Thank you for the detailed reply.
    I have a child theme established.
    But it is a .css file.
    How do you create a child theme that holds php code?
    Or can you put .php into a .css child theme?
    Thank you

    #11131

    Just create one functions.php file inside the child theme folder.

    You can override the code but for that you have to first unhook the function responsible for showing that code then you have to hook your own function. Mere copy and pasting the relevant files and folder will not work.

    Have a look here in this article for more detail explanation http://venutip.com/content/right-way-override-theme-functions

    The function you have to look for is attitude_headerdetails in header-extensions.php

    If you are good at programmer then you can edit it otherwise you may hire a developer to fix it.

    Thank you

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.