Home › Forums › All Other Themes › Webhosting theme target=blank does not work
- This topic has 14 replies, 2 voices, and was last updated 7 years, 3 months ago by Carla.
-
AuthorPosts
-
August 12, 2017 at 1:31 pm #80855
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.
August 14, 2017 at 5:56 am #80914Hi,
Kindly show us your website URL so that we can assist further.
Regards,
BradAugust 14, 2017 at 7:48 am #80934That 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.
August 14, 2017 at 10:18 am #80940Hi,
kindly show your theme name.
Regards,
BradAugust 14, 2017 at 10:31 am #80941The theme name is Webhosting
August 14, 2017 at 10:38 am #80945Hi,
Can you send us the screenshot of your issues? Upload your screenshot on imgur.com and paste the share url here.
Regards,
BradAugust 14, 2017 at 11:26 am #80951I 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?August 17, 2017 at 9:14 am #81221Hi,
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,
BradAugust 17, 2017 at 11:54 am #81240Sorry 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.August 18, 2017 at 7:07 am #81301Hi,
The shortcode [service] doesn’t have the option for link target, we asked for login details to add the target option for you.
Regards,
BradAugust 18, 2017 at 7:43 am #81305That 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.August 18, 2017 at 9:45 am #81316Hi,
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,
BradAugust 18, 2017 at 10:17 am #81327Ok, 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.August 18, 2017 at 10:41 am #81329Hi,
Kindly replace the code in parent theme’s core-functions.php file.
Regards,
BradAugust 18, 2017 at 11:17 am #81338Thank 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.
-
AuthorPosts
- You must be logged in to reply to this topic.