Viewing 24 posts - 1 through 24 (of 24 total)
  • Author
    Posts
  • #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.
    #428706

    Hey analidia!

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

    Cheers!
    Rikard

    #428910
    This reply has been marked as private.
    #429736

    Hi!

    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,
    Elliott

    #431221

    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?

    #431222

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

    #432126

    Hi!

    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,
    Elliott

    #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!

    #433147

    Hi!

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

    Regards,
    Elliott

    #433317

    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 http://www.ladebacle.com/enfold/enfold3.jpg you can see the scheme with the problem.

    Thank you for your patience.

    #435156

    Hey!

    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,
    Ismael

    #438796

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

    #440150

    Hi!

    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,
    Ismael

    #756407

    Hey

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

    #756409

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

    #759817

    Hi,

    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,
    Ismael

    #759919

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

    #760396

    Hi!

    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,
    Ismael

    #1003725

    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?

    #1003883

    Hi,

    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,
    Ismael

    #1004200

    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.

    #1004762

    Hi,

    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,
    Ismael

    #1183468

    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!

    #1183754

    Hi,

    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

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.