Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #648957

    Hi,

    By default the portfolio options pops open a new tab in the browser as a new page, as in “_blank”. I need the portfolio items to lead to the portfolio pages, but I want it to happen in the same window, not pop a new one open. How can I achieve this?

    Thanks so much,

    Tony

    #649818

    Hey tonyiatridis,

    Can you please post the link to your page?
    You can turn on custom CSS field for ALB elements – http://kriesi.at/documentation/enfold/turn-on-custom-css-field-for-all-alb-elements/ and edit your element and give it a custom CSS class and then add following code to Functions.php file in Appearance > Editor

    function custom_class_link(){
    ?>
     <script>
    jQuery(window).load(function(){
    jQuery('.your-custom-class a').removeAttr('target');
    });
     </script>
    <?php
    }
    add_action('wp_footer', 'custom_class_link');

    Best regards,
    Yigit

    #650090

    Yigit,

    Well here’s the thing we just put up 4 sites for this client, with 4 new purchases of the theme, not bad huh? Anyway, we need the portfolio links on the home page of each to open in the same window. We have identical settings on two sites but they are behaving differently.

    http://kofinsiahpoku.com/ stays in same window

    http://kinagroupltd.com/ pops new window

    I need them to stay in the same window always.

    Thanks

    #651177

    Hi,

    you didn’t follow Yigit’s suggestions. Please do so and let us know when you’re done and still need help with it.

    Best regards,
    Andy

    #651215

    Andy,

    Maybe you’re no following what I said, with no modification of the functions .php file the portfolio does open it’s portfolio pages into the same window on http://kofinsiahpoku.com/

    On http://kinagroupltd.com/ with the same exact settings it pops open a new window.

    What I want to know is why. Either it can work either way without changing code, or somethings wrong with the one where it does what I want it to stay in the same window.

    Is there some sort of choice in the settings I’m missing that makes it act differently from one site to the other? That’s of concern to me.

    Thanks.

    #651237

    Hi,

    not sure why it’s doing this, but by default it should open in the same window in a new page. Please update your theme to Enfold v3.6.1 and deactivate all your plugins.

    Best regards,
    Andy

    #652431

    Andy/Yigit

    Ok so I enabled the custom field by altering the functions php file in the child theme.

    But adding:

    function custom_class_link(){
    ?>
    <script>
    jQuery(window).load(function(){
    jQuery(‘.your-custom-class a’).removeAttr(‘target’);
    });
    </script>
    <?php
    }
    add_action(‘wp_footer’, ‘custom_class_link’);

    adding in my class ‘.changeitup’ for ‘.your-custom-class’ causes this error:

    Parse error: syntax error, unexpected ‘?’ in /home/kinapharma14/public_html/wp-content/themes/enfold-child/functions.php on line 6

    Is the code correct?

    Thanks,

    Tony

    #652689

    Hi,

    as far as I can see it, it seems correct. Does this happen for you with a default WP theme as well? I will tag Yigit for this thread again, so he can check it.

    Best regards,
    Andy

    #652767

    I remade the child theme and it’s working now, so never mind and thanks. Odd though that it the theme handles it as opening in the same window be default on another installation with the same exact settings and all plugins off. I’m coding it as such there as well just to be sure it keeps working that way obviously.

    Thanks

    #653065

    Hi,

    hm, alright, glad it’s working for you now. Let us know in a new ticket if you have some more questions related to the theme. We are happy to assist you.

    Best regards,
    Andy

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