Open URL in a new blank window

  • Jersson
    Jersson
    Newbie 5 points
    August 17, 2016 at 12:11 pm

    Hello,
    I’d like to know how should I change code to open point those URL links into a new window as I cannot do that via Default Home Page Design Editor —-> image block 1
    Can not find code or function also.
    Thank you in advance and I apologize for maybe this easy/stupid question.
    Kind regards

    Attachments:
    You must be logged in to view attached files.
  • Alex Morgan
    Alex Morgan
    Super Guru 1,111 points
    August 17, 2016 at 12:18 pm

    hi Jersson,

    This needs to be changed from the homepage layout template file. Please edit the file: home-layout-dating1.php

    This reply was awarded the best answer by the topic poster.
  • Jersson
    Jersson
    Newbie 5 points
    August 17, 2016 at 12:41 pm

    Hi Alex.
    Found the following code for image 3. I’m a newbie, so please could you please modify the line for me with an example to be opnened in a new windows? just adding target=”_blank” to href?

    <div class="row">
      
    <div class="col-md-4">
    <a href="<?php echo $HDATA['t3']['link1']; ?>"><img src="<?php if(isset($HDATA['t3']['img1']) && strlen($HDATA['t3']['img1']) > 2){ echo $HDATA['t3']['img1']; }else{ ?>https://placehold.it/350x150&text=males<?php } ?>" class="r1" alt="males"></a>
    </div>

    Thanks for your fast reply.

  • Jersson
    Jersson
    Newbie 5 points
    August 17, 2016 at 12:49 pm

    IT WORKS!!!! Thank you!!!!!!!

  • Alex Morgan
    Alex Morgan
    Super Guru 1,111 points
    August 17, 2016 at 2:24 pm

    You’re welcome Jersson. 🙂

  • Jersson
    Jersson
    Newbie 5 points
    August 19, 2016 at 8:25 am

    Hello Alex I’m back with this issue.
    I changed yesterday some lines of code, to have the possibility to open image links to a new tab.
    Everything worked fine just the first time, then when i changed link and url for the second image, we found the problem.
    “Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 3840 bytes) in /homepages/10/d637954933/htdocs/wp-content/themes/DA/home.php on line 42 ”
    I just added code to file home-layout-dating1.php. no more changes done.

    Once the problem happened there was no way to fix the fatal error even if I restore the original file.

    This morning I restored the whole site from a backup, I changed again the code in home-layout-dating1.php and we have again the same problem.

    Attached you can find the modified file and the original file home-layout-dating1.php
    How can a simple modification cause this problem?.
    Could you please help us?.
    Thanks


  • Josh
    Super Guru 13,875 points
    August 19, 2016 at 12:33 pm

    Hello Jersson,
    Please contact your host and request them to your max memory size.You can also do it from the file php.ini

Viewing 7 posts - 1 through 7 (of 7 total)

New Business Themes for WordPress 2020

Start your new website today!

View Business Themes