-
AuthorPosts
-
March 6, 2017 at 1:46 pm #756388
I want to have the ability to add custom links to certain blog posts (which have a particular category) such that when they are added to an element like a magazine element from the avia builder, on clicking them, the user goes to the link mentioned in the custom link rather than the post link. Also, these link should open in a new window (would be preferable if I have the option to set whether I want target=”_self” or target=”_blank”).
March 7, 2017 at 9:12 am #756848Hey architchandra,
There is no functionality like that in the theme unfortunately so you would have to looks for a plugin or custom code to be able to add that to your site. I’m not sure why you would like to have another link that then actual post though, wouldn’t that be misleading your users?
Best regards,
RikardMarch 8, 2017 at 9:42 am #757620No no, I’m not looking to mislead my users at all. Don’t worry. :)
In Enfold, the link post format does not work properly in the Magazine section, so I had to find a workaround such that in a magazine section called Latest News, people can see links to some selected news items, which would be added by me in the backend just like a blog post. Do fix that, I used this plugin called page-links-to which gives the option to add a custom link to any post. But now the problem that is creating is that the image posts (which I had enabled the lightbox setting for under Enfold) also can either open in their post page (which looks a bit ugly as I have not styled it and don’t plan to) or I can give a custom link (but the image is uploaded at the same location so no custom link exists). The net result is that the lightbox setting is not working.
Do you think you can help me with that? Is there some way for me to disable the plugin for the portfolio custom post type or is there any other plugin that you recommend or is there some link that I can add in the custom link field that will make the image open in a lightbox modal?March 14, 2017 at 8:11 am #760504Hey!
In Enfold, the link post format does not work properly in the Magazine section,
This is actually possible but you have to modify one of the parent theme files.
// https://kriesi.at/support/topic/enfold-magazine-post-with-link-format-does-run/#post-435156
// https://kriesi.at/support/topic/enfold-magazine-post-with-link-format-does-run/#post-429736
// https://kriesi.at/support/topic/link-post-type-direct-link/#post-701674Cheers!
IsmaelApril 7, 2017 at 1:19 pm #773943Hi,
was looking for a solution to this and i figured you can use jquery to replace the href link when your page loads. Use this in your functions.php file.//ADD CUSTOM JQUERY SCRIPTS function add_custom_script(){ ?> <script> jQuery('a[href*="http://old-link"]').attr('href', 'http://new-link'); </script><?php } add_action('wp_footer', 'add_custom_script');
April 8, 2017 at 6:09 am #774284Hi,
Let us know if you have any other questions or issues :)
Best regards,
John Torvik -
AuthorPosts
- You must be logged in to reply to this topic.