Tagged: link post
-
AuthorPosts
-
February 4, 2014 at 6:21 pm #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
February 4, 2014 at 6:57 pm #219566Hey 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!
IsmaelFebruary 7, 2014 at 10:55 pm #221065Thanks 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
February 8, 2014 at 11:50 am #221200Hi!
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!
PeterFebruary 8, 2014 at 4:07 pm #221232Thanks – 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.
ErikFebruary 10, 2014 at 9:14 am #221578Hey!
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,
PeterFebruary 10, 2014 at 11:16 am #221623Perfect – thank you.
-
AuthorPosts
- The topic ‘Link Post Format’ is closed to new replies.