-
AuthorPosts
-
April 14, 2015 at 11:20 am #428132
Hi, I put a magazine in a page but the post with link format does not run. You need to click the title on the summary and then click again on the title in a page with no content (only the title) to finally go to the link.
- This topic was modified 9 years, 7 months ago by analidia.
April 15, 2015 at 6:58 am #428706Hey analidia!
Could you provide us with a link to the site in question so that we can take a closer look please?
Cheers!
RikardApril 15, 2015 at 1:56 pm #428910This reply has been marked as private.April 16, 2015 at 4:51 pm #429736Hi!
Open up /enfold/config-templatebuilder/avia-shortcodes/magazine.php and around line 529 you should see this.
$title = "<a href='{$link}' {$titleAttr}>".get_the_title($entry->ID)."</a>";
Add this beneath it.
$post_content = get_post($entry->ID); if ( get_post_format($entry->ID) == 'link' ) { $title = "<a href='".$post_content->post_content."' {$titleAttr}>".get_the_title($entry->ID)."</a>"; }
Best regards,
ElliottApril 20, 2015 at 11:44 am #431221thanks!! and the icon link? we have the same problem.
I have done a child theme… can I put all this things in the function page?
April 20, 2015 at 11:46 am #431222and other question… when the magazine is shown in a widget we have the same problem.
April 21, 2015 at 4:48 pm #432126Hi!
If your post is using the link format then you would just copy the link inside the post content. The title will grab the link automatically.
For the Masonry try doing the same thing around line 275 in the masonry_entries.php file.
Best regards,
ElliottApril 22, 2015 at 11:14 am #432698/enfold/config-templatebuilder/avia-shortcodes/magazine.php ………….. OK
/enfold/config-templatebuilder/avia-shortcodes/ masonry_entries.php……………….?? Where… line 275??My post is using the link format then I copy the link inside the post content. I know. But the problem is with the icon,….. in the title is solved but in the icon no.
Thanks!
April 22, 2015 at 9:47 pm #433147Hi!
This is kind of bordering on custom work but send us a link to your page and we’ll take a look.
Regards,
ElliottApril 23, 2015 at 9:40 am #433317Sorry for my English.
I dont think this is a custom work, I think it is a malfunction of “Magazine” compared with others such as “Grid blog”, “mansory blog”….
I told you that i´m working in local… in this screen http://www.ladebacle.com/enfold/enfold3.jpg you can see the scheme with the problem.Thank you for your patience.
April 27, 2015 at 11:41 am #435156Hey!
Please remove the modifications then locate this code on the same file:
$link = get_permalink($entry->ID);
That is two lines above the previous code that you modified. Replace it with:
$link = get_post_format($entry->ID) == 'link' ? avia_custom_link_content_filter($entry->post_content) : get_the_permalink($entry->ID);
Add this in the functions.php file:
function avia_custom_link_content_filter($content) { //retrieve the link for the post $link = ""; $pattern1 = '$^\b(https?|ftp|file)://[-A-Z0-9+&@#/%?=~_|!:,.;]*[-A-Z0-9+&@#/%=~_|]$i'; $pattern2 = "!^\<a.+?<\/a>!"; $pattern3 = "!\<a.+?<\/a>!"; //if the url is at the begnning of the content extract it preg_match($pattern1, $content , $link); return $link[0]; }
That should take care of the icon and title link. Make sure that you add the custom url at the very top of the post text editor.
Best regards,
IsmaelMay 4, 2015 at 9:56 am #438796Thank you!! good!!!
In your next upgrade, will you include this change?May 6, 2015 at 7:27 am #440150Hi!
If the feature gathers enough request, we’ll consider adding it on future updates. You can request the feature here: https://kriesi.at/support/enfold-feature-requests/
Best regards,
IsmaelMarch 6, 2017 at 2:15 pm #756407Hey
I tried Ismael’s method to make the external link for in the magazine element but it’s not working. What should I do?
March 6, 2017 at 2:19 pm #756409I tried Elliot’s method as well and even that is not working. Please help. It’s pretty urgent at my end.
March 13, 2017 at 5:40 am #759817Hi,
Please provide a link to the page with the magazine element. We would like to inspect it. What kind of links are you adding in the posts?
Best regards,
IsmaelMarch 13, 2017 at 11:21 am #759919The latest news section on this page: http://lalitanijhawan.com/media/
The way I am currently making it work is with a plugin called page-links-to.March 14, 2017 at 4:33 am #760396Hi!
The posts are set to “Standard” format. Set the format to “Link”.
// https://codex.wordpress.org/Post_Formats
Or create a new thread with the url to the site and the login details so that we can test it further.
Best regards,
IsmaelAugust 30, 2018 at 5:27 pm #1003725I could not get this to work, either, using the function provided. Was there are changes made since this post to accomodate the ability to use linked posts in magazine view?
August 31, 2018 at 4:32 am #1003883Hi,
Yes, it’s a little different now. Just add this code around line 685 of the magazine.php file:
$link = get_post_format($entry->ID) == 'link' ? avia_custom_link_content_filter($entry->post_content) : $link;
And then add the “avia_custom_link_content_filter” function just below the avia_sc_magazine class or at the very bottom of the file. Let us know if it works.
Best regards,
IsmaelAugust 31, 2018 at 7:31 pm #1004200Thank you, Ismael.
My only worry with this type of solution is if it breaks during updates. I have always favored function-level adaptations, but if this is the only way to achieve functionality, I will work to implement it this way.
I really would like to see this functionality fixed in future versions. It is what keeps us from using the Magazine element on a regular basis.
September 3, 2018 at 4:27 am #1004762Hi,
You can actually move the magazine shortcode file in the child theme. Just follow the instruction in the documentation.
// https://kriesi.at/documentation/enfold/intro-to-advanced-layout-builder/#add-elements-to-alb
Best regards,
IsmaelFebruary 11, 2020 at 1:58 pm #1183468Hi, Ismael one question, I think you normally update magazine.php, if we do that solution we cannot update it. Why don’t you solve it for the next update? It’s a great solution.
And if that is impossible you can provide the text to insert in functions.php and also the archive magazine.php to put in child theme.Thank you!
February 12, 2020 at 5:47 am #1183754Hi,
The Blog Posts element has a list layout that looks like the magazine element and it supports the link post format. Have you tried it? Insert a Blog Posts element and select one of the 3 last List Style options in the Blog Style settings. If you need more info, please open a new thread/ticket. We’ll close this one for now.
Best regards,
Ismael -
AuthorPosts
- The topic ‘Enfold – Magazine (post with link format does not run)’ is closed to new replies.