-
AuthorPosts
-
June 16, 2016 at 4:29 am #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
June 17, 2016 at 3:22 pm #649818Hey 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 > Editorfunction 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,
YigitJune 18, 2016 at 6:12 am #650090Yigit,
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
June 21, 2016 at 2:26 am #651177Hi,
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,
AndyJune 21, 2016 at 4:12 am #651215Andy,
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.
June 21, 2016 at 5:28 am #651237Hi,
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,
AndyJune 23, 2016 at 3:47 am #652431Andy/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
June 23, 2016 at 7:23 pm #652689Hi,
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,
AndyJune 23, 2016 at 10:44 pm #652767I 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
June 24, 2016 at 4:44 pm #653065Hi,
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 -
AuthorPosts
- You must be logged in to reply to this topic.