Viewing 24 posts - 1 through 24 (of 24 total)
  • Author
  • #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 6 years, 3 months ago by  analidia.

    Hey analidia!

    Could you provide us with a link to the site in question so that we can take a closer look please?


    This reply has been marked as private.


    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,


    thanks!! 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?


    and other question… when the magazine is shown in a widget we have the same problem.



    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,


    /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.




    This is kind of bordering on custom work but send us a link to your page and we’ll take a look.



    Sorry 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 you can see the scheme with the problem.

    Thank you for your patience.



    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,


    Thank you!! good!!!
    In your next upgrade, will you include this change?



    If the feature gathers enough request, we’ll consider adding it on future updates. You can request the feature here:

    Best regards,



    I tried Ismael’s method to make the external link for in the magazine element but it’s not working. What should I do?


    I tried Elliot’s method as well and even that is not working. Please help. It’s pretty urgent at my end.



    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,


    The latest news section on this page:
    The way I am currently making it work is with a plugin called page-links-to.



    The posts are set to “Standard” format. Set the format to “Link”.


    Or create a new thread with the url to the site and the login details so that we can test it further.

    Best regards,


    I 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?



    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,


    Thank 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.



    You can actually move the magazine shortcode file in the child theme. Just follow the instruction in the documentation.


    Best regards,


    Hi, 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!



    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,

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

The topic ‘Enfold – Magazine (post with link format does not run)’ is closed to new replies.