Webhosting theme target=blank does not work

Home Forums All Other Themes Webhosting theme target=blank does not work

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #80855
    Carla
    Participant
    • Topics: 11
    • Replies: 27
    • Total: 38
    Member since: January 16, 2017

    I am building a customers website with the webhosting theme. I want to link one of the service boxes to an external link with target=”blank”. I use the following code:

    [service pattern=”boxpattern-2″ icon=”icon link here” title=”User Friendly” go=”fa-angle-right” url=”external url here” target=”blank”]Text here[/service]

    But it does not open in another tab. What am I doing wrong?

    Thank you.

    #80914
    Forum Moderator
    Participant
    • Topics: 0
    • Replies: 25504
    • Total: 25504
    Member since: August 16, 2013

    Hi,

    Kindly show us your website URL so that we can assist further.

    Regards,
    Brad

    #80934
    Carla
    Participant
    • Topics: 11
    • Replies: 27
    • Total: 38
    Member since: January 16, 2017

    That is not possible because I am building behind a construction wall. But the only thing I want to know is if I can put a target=blank into the code for the serviceboxes and if so how I can do that. I hope you can answer my question without seeing the site.

    #80940
    Forum Moderator
    Participant
    • Topics: 0
    • Replies: 25504
    • Total: 25504
    Member since: August 16, 2013

    Hi,

    kindly show your theme name.

    Regards,
    Brad

    #80941
    Carla
    Participant
    • Topics: 11
    • Replies: 27
    • Total: 38
    Member since: January 16, 2017

    The theme name is Webhosting

    #80945
    Forum Moderator
    Participant
    • Topics: 0
    • Replies: 25504
    • Total: 25504
    Member since: August 16, 2013

    Hi,

    Can you send us the screenshot of your issues? Upload your screenshot on imgur.com and paste the share url here.

    Regards,
    Brad

    #80951
    Carla
    Participant
    • Topics: 11
    • Replies: 27
    • Total: 38
    Member since: January 16, 2017

    I don’t see the point in posting a screenshot because the problems I have are within the code of the servicebox. The code I am trying to use is:
    [service pattern=”boxpattern-2″ icon=”url of the icon here” title=”Verkoop van computers en laptops” go=”fa-hand-o-right” url=”external url here” target=”blank”]Wij verkopen zowel nieuwe als gereviseerde laptops. Overweegt u een nieuwe laptop aan te schaffen maar vindt u de investering in een nieuwe te hoog? Kijk dan eens in onze webshop naar een gereviseerde laptop. [/service]

    Because it is an external url I want to use target=blank but that does not work. The external website won’t open in a new window. A screenshot won’t help because it isn’t about something I can show on the front end. My problem lies within the code I am using on a page in the backend. I copied the code for you as you see above. For privacy mathers I did not show the website or the link I use.
    So my question is: can I add a target=blank code to the servicebox code or not? And when it is possible is the above way the correct way to do it or do I need another code?

    #81221
    Forum Moderator
    Participant
    • Topics: 0
    • Replies: 25504
    • Total: 25504
    Member since: August 16, 2013

    Hi,

    This can only be done via coder.

    Kindly send us your WordPress admin details (Username & Password) via sktthemes.net/contact Please mention this forum URL while replying so that we understand what needs to be done.

    Regards,
    Brad

    #81240
    Carla
    Participant
    • Topics: 11
    • Replies: 27
    • Total: 38
    Member since: January 16, 2017

    Sorry but I don’t see the point in sending you the login data. It also is a client website so I don’t want to give others login data for clients websites, I hope you will understand.
    I ask you a simple question for which I don’t think you need login data. I think you can answer my question without loggin in to the dashboard. I be quite frankly. Everytime I ask a question in this forum you always ask for an url of screenshots or login data. Some questions you don’t need that information for. The only thing I want to know is if I can put a target=blank code inside the service box code. For you, the makers of the theme, that must not be a very hard question to answer in my opinion. Sp please answer my question without url’s screenshots or login data. You don’t need those because they are irrelevant. The only thing that is relevant is if the servicebox code allows to put in a target=blank option. Other codes in the template have that option but in the service box code it doesn’t work. So one last time please simply answer my question. Thank you.

    #81301
    Forum Moderator
    Participant
    • Topics: 0
    • Replies: 25504
    • Total: 25504
    Member since: August 16, 2013

    Hi,

    The shortcode [service] doesn’t have the option for link target, we asked for login details to add the target option for you.

    Regards,
    Brad

    #81305
    Carla
    Participant
    • Topics: 11
    • Replies: 27
    • Total: 38
    Member since: January 16, 2017

    That is very kind of you and sorry for my reaction but I really want to know how to do that myself. That way I can learn from it for the next time. I use your themes for my customers and the more I know how things can be done the less I have to ask for help here.
    Is there a way you can let me know how to fix it myself? Do I have to add something in a php file and if yes what file and what do I add and where?
    I hope you can give me instructions to fix this issue myself.

    #81316
    Forum Moderator
    Participant
    • Topics: 0
    • Replies: 25504
    • Total: 25504
    Member since: August 16, 2013

    Hi,

    Okay fine.

    Kindly edit web-hosting/sktframe/core-functions.php file, go to line number 725 and replace code from line number 726 to 748 with below code:

    function servicebox($atts, $content = null){
        extract( shortcode_atts(array(
          'pattern' => 'pattern',
          'icon'  => 'icon',
          'title'  => 'title',
          'go'  => 'go',
          'url' => 'url',
          'target' => '',
        ), $atts));
        
        return '
           <a href="'.$url.'" target="'.$target.'"><div class="servicebox '.$pattern.'">
             <div class="serviceboxbg">
              <img src="'.$icon.'">
              <h3>'.$title.'</h3>
              <p>'.$content.'</p>
              <div class="sktgo"><i class="fa '.$go.'" aria-hidden="true"></i></div>
            </div>
           </div></a>  
        ';
    }
    add_shortcode('service','servicebox');

    Regards,
    Brad

    #81327
    Carla
    Participant
    • Topics: 11
    • Replies: 27
    • Total: 38
    Member since: January 16, 2017

    Ok, thank you very much. One question I have left. Am I losing this adjustments when updating the theme? I am using a child theme. Can I copy the core-functions.php file safely to the childtheme? Or do I break the theme by doing that? The functions.php file cannot be copied to the child without breaking the theme so perhaps this is also the case with the core-functions.php?. And if so can I make a new core-functions.php file with this code in it and add it to my childtheme? And if I have to make a new core-functions.php file in my child, which code I have to copy from the parent file to make it function?
    A lot of questions but I don’t want to lose the adjustments or break the theme. Thank you.

    #81329
    Forum Moderator
    Participant
    • Topics: 0
    • Replies: 25504
    • Total: 25504
    Member since: August 16, 2013

    Hi,

    Kindly replace the code in parent theme’s core-functions.php file.

    Regards,
    Brad

    #81338
    Carla
    Participant
    • Topics: 11
    • Replies: 27
    • Total: 38
    Member since: January 16, 2017

    Thank you very much, it worked!!!

    Hope you are not bored with me but can I do this also with one of the slider links? I want to link one of the sliderbuttons to an external link. Is there a php adjustment I can make? And what is the code and in which php file? Thank you in advance.

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