Tagged: Blog
-
AuthorPosts
-
March 28, 2014 at 8:29 am #244237
I have a page here:
http://wholisticmedicalcentre.com.au/holistic-health-news/
I’ve built this using Layout Builder and the Blog content element specifying”single author, small preview pic” specifying excerpt with “read more” link
But the read more link doesn’t point to the permalink for the associated post.
Any clues would be appreciated. I am using Enfold 2.6
- This topic was modified 10 years, 8 months ago by bongoman.
March 29, 2014 at 8:50 pm #244884Hi bongoman!
Can we take a look at your settings from the backend? If you provide admin login credentials as a private reply here on the forums we can log in and take a look and then see whats going on. I know there has been some quirks with the new setting so seeing it first hand would be the quickest and most direct way to try and fix it.
Regards,
DevinApril 1, 2014 at 1:51 am #245820This reply has been marked as private.April 2, 2014 at 8:30 am #246398Hi!
I don’t know why the read more link doesn’t work on your server but I solved the issue. I replaced this code in includes/loop-index.php:
$current_post['content'] = $blog_content == "content" ? get_the_content(__('Read more','avia_framework').'<span class="more-link-arrow"> →</span>') : get_the_excerpt(); $current_post['content'] = $blog_content == "excerpt_read_more" ? $current_post['content'].'<div class="read-more-link"><a href="'.get_permalink().'" class="more-link">'.__('Read more','avia_framework').'<span class="more-link-arrow"> →</span></a></div>' : $current_post['content']; $current_post['before_content'] = "";
with
$current_post['content'] = $blog_content == "content" ? get_the_content(' ') : get_the_excerpt(); $current_post['content'] = $blog_content == "excerpt_read_more" ? $current_post['content'].'<div class="read-more-link"><a href="'.get_permalink($current_post['the_id']).'" class="more-link">'.__('Read more','avia_framework').'<span class="more-link-arrow"> →</span></a></div>' : $current_post['content']; $current_post['content'] = $blog_content == "content" ? $current_post['content'].'<div class="read-more-link"><a href="'.get_permalink(get_the_ID()).'" class="more-link">'.__('Read more','avia_framework').'<span class="more-link-arrow"> →</span></a></div>' : $current_post['content']; $current_post['before_content'] = "";
and now the loop uses the get_permalink() function instead of the get_the_content() function to generate the read more link. If you place the modified loop-index.php into your child theme the change is also update safe.
Best regards,
Peter -
AuthorPosts
- You must be logged in to reply to this topic.