Tagged: 

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #219536

    Hi, I’m not getting the “Link” post format to work correctly. I added a new post as a Link, added a link in the contact area, but when I’m on the category page, the post doesn’t open the link.

    There is an example on this page – http://goo.gl/uScUS5 – for the post “An Experimental Appro….” towards the bottom of the page.

    Any ideas as to why the link is showing there in the excerpt and why clicking on the title doesn’t lead me to the linked PDF file?

    Thanks – Erik

    #219566

    Hey erostad!

    The grid layout doesn’t support post formats on version 2.4.2. Please download the latest version of Enfold on your themeforest account then update the theme via FTP. Watch this video by Devin: http://vimeo.com/channels/aviathemes/67209750

    Cheers!
    Ismael

    #221065

    Thanks Ismael – I have now updated the template to the latest version and that fixed the issue. Now I’m wondering if it is possible to switch the “Link” posts so that the linked item opens in a new window. Is there code I can change so that those links open _blank?

    Thanks- Erik

    #221200

    Hi!

    Open up wp-content/themes/enfold/includes/helper-post-format.php and replace

    
    $current_post['title'] = "<a href='$link' rel='bookmark' title='".__('Link to:','avia_framework')." ".the_title_attribute('echo=0')."' $markup>".get_the_title()."</a>";
    
    

    with

    
    $current_post['title'] = "<a href='$link' target='_blank' rel='bookmark' title='".__('Link to:','avia_framework')." ".the_title_attribute('echo=0')."' $markup>".get_the_title()."</a>";
    
    

    Cheers!
    Peter

    #221232

    Thanks – how about opening the links _blank from the main category page. Here’s an example (http://goo.gl/uScUS5) and the linked article is “An Experiment…” towards the bottom. These links are still opening in the same window.

    Thanks.
    Erik

    #221578

    Hey!

    Open up wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/postslider.php and replace

    
    		                  	if($format == 'link')
    		                   	{
    			                        $current_post = array();
    			                        $current_post['content'] = $entry->post_content;
    			                        $current_post['title'] =  $entry->post_title;
    			                        
    			                        if(function_exists('avia_link_content_filter'))
    			                        {
    			                            $current_post = avia_link_content_filter($current_post);
    			                        }
    			
    			                        $link = $current_post['url'];
    		                    	}
    

    with

    
    			                 $linktarget = '';
    		                  	if($format == 'link')
    		                   	{
    			                        $current_post = array();
    			                        $current_post['content'] = $entry->post_content;
    			                        $current_post['title'] =  $entry->post_title;
    			                        
    			                        if(function_exists('avia_link_content_filter'))
    			                        {
    			                            $current_post = avia_link_content_filter($current_post);
    			                        }
    			
    			                        $link = $current_post['url'];
    			                        $linktarget = 'target="_blank"';
    		                    	}
    

    and

    
                        $markup = avia_markup_helper(array('context' => 'entry','echo'=>false));
    					$output .= "<article class='slide-entry flex_column {$style} {$post_class} {$grid} {$extraClass} {$thumb_class}' $markup>";
    					$output .= $thumbnail ? "<a href='{$link}' data-rel='slide-".avia_post_slider::$slide."' class='slide-image' title=''>{$thumbnail}</a>" : "";
    					$output .= "<div class='slide-content'>";
    
                        $markup = avia_markup_helper(array('context' => 'entry_title','echo'=>false));
                        $output .= '<header class="entry-content-header">';
                        $output .= !empty($title) ? "<h3 class='slide-entry-title entry-title' $markup><a href='{$link}' title='".esc_attr(strip_tags($title))."'>".$title."</a></h3>" : '';
                        $output .= '</header>';
    

    with

    
                        $markup = avia_markup_helper(array('context' => 'entry','echo'=>false));
    					$output .= "<article class='slide-entry flex_column {$style} {$post_class} {$grid} {$extraClass} {$thumb_class}' $markup>";
    					$output .= $thumbnail ? "<a href='{$link}' {$linktarget} data-rel='slide-".avia_post_slider::$slide."' class='slide-image' title=''>{$thumbnail}</a>" : "";
    					$output .= "<div class='slide-content'>";
    
                        $markup = avia_markup_helper(array('context' => 'entry_title','echo'=>false));
                        $output .= '<header class="entry-content-header">';
                        $output .= !empty($title) ? "<h3 class='slide-entry-title entry-title' $markup><a href='{$link}' {$linktarget} title='".esc_attr(strip_tags($title))."'>".$title."</a></h3>" : '';
                        $output .= '</header>';
    

    Best regards,
    Peter

    #221623

    Perfect – thank you.

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

The topic ‘Link Post Format’ is closed to new replies.