-
AuthorPosts
-
October 16, 2017 at 6:45 pm #864910
Hi,
I’m trying to create a blog landing page that has teasers for third party articles (through “Link” format posts) and original content (through posts with the Avia Layout Builder).
I’m having three issues.
1. Most importantly, the original content posts are unreachable from the front end. You’re just taken to a “404” page. We do have some custom code in there for some masonry grids we use on the front page, but as that code only affects the Homepage, I can’t see why it would affect all posts:
jQuery(document).ready(function() {
jQuery(‘.page-id-2333 .av-masonry-entry’).click(function(e) {
e.preventDefault();
});
})I also tested with the plugins turned off, still the same behavior. I also tried it without the Avia Layout Builder on a “Standard” post format, still the same behavior.
2. For the “Link” format posts, the “Red more” links go to a 404 page, not the links that everything else is set to.
3. For the “Link” format posts in Grid View, is there any way to hide the link? I note that in other Blog Styles (like single author) that link is hidden, but on Grid style it shows up and looks pretty odd.
Thanks!
October 18, 2017 at 5:10 am #865519Hey raisonbrands,
Please, could you provide to us a screenshot about this? I can`t see the problem.
Best regards,
John TorvikOctober 18, 2017 at 5:17 pm #865835Hi John,
Sure thing: https://imgur.com/a/Kmz6ySo there are three posts. #1 (in red) is a normal post with the Avia Layout Builder. #2 and #3 are “Link” posts (in purple) that link to external websites.
For #1, despite the fact that there is post content, when you click on either the feature image or “read more” link, you’re taken to the “Nothing Found” page (the second image in the screen shots link). When you’re logged into the back-end WordPress editor for the post, the preview button also takes you to the “Nothing Found” page.
For #2 and #3, clicking on the feature images take you to the appropriate site. But clicking on the “read more” link takes you to the “Nothing Found” page. We need it to take you to the appropriate linked site.
So those are the big problems that we’d love to solve as soon as we can.
A smaller issue that would be great to solve is getting rid of the link text (underlined in yellow) in #2 and #3 that shows when in a grid layout blog style. That text does not appear in other blog styles (like Single Author) and it looks a lot cleaner without it.
Thanks!
October 18, 2017 at 6:03 pm #865856Update on this:
Thought I’d solved the problem but did not. For some reason I cannot delete this comment.
- This reply was modified 7 years ago by raisonbrands.
October 18, 2017 at 11:42 pm #865978After more investigation, the post functionality has been solved–server side issue, Enfold is vindicated! Please disregard the above.
But there are still a couple smaller issues that we would love some help ironing out related to the blog posts.
Please see the attached: https://imgur.com/a/t6FOp
The two posts inside the purple square are “Link” posts. The blog style itself is Grid with Title & Excerpt + Read More Link.
Issue 1: In other blog styles, the link itself is not present on the front end (which is what we’d like). But on Grid mode, the link shows up (underlined in red). We would like that link text to not be present in Grid mode (it’s the only format that will work for the design).
Issue 2: The Read More links (in green boxes) for the Link Style posts go to essentially a post view of the link. We would just like those links to go to the appropriate website, just like the feature images do.
Just in case I’m still being confusing, here’s a screen shot of what we’d like to happen.
https://imgur.com/a/39sg7Please use the credentials below, the ones above are no longer relevant.
Thanks!
October 20, 2017 at 4:24 am #866549Hi,
Thank you for the info. Please edit the config-templatebuilder > avia-shortcodes > postslider.php file. Remove everything then replace it with the following code.
// https://pastebin.com/VP7V9TwL
Best regards,
IsmaelOctober 20, 2017 at 4:25 am #866550Hi,
Thank you for the info. Please edit the config-templatebuilder > avia-shortcodes > postslider.php file. Remove everything then replace it with the following code.
// https://pastebin.com/VP7V9TwL
Best regards,
IsmaelOctober 23, 2017 at 4:47 pm #867697Hi Ismael,
Sorry for the delay in response. I implemented the changes last week on the child theme, took a bit to figure out that we needed to change parent theme settings before the effects of the new postslider.php file to register.
So unfortunately we ended up loosing excerpts and “read more” links. Leaving just the titles and categories, here’s a look: https://imgur.com/a/9MXpn
The second image shows what we’re trying to achieve, we just want to get rid of the link that shows up at the beginning of the exceprts for “link format” posts in grid views, and have those read “more links” go to the adress that the “link format” post is linked to. BTW, here’s what I mean by a “link format” post: https://imgur.com/a/2zaU1
Thanks!
October 23, 2017 at 4:49 pm #867701Sorry, forgot to mention, we’re trying out new PHP in the dev environment, the credntials are below.
October 25, 2017 at 2:45 am #868490Hi,
Thank you for the update.
Please look for this code around line 464.
$prepare_excerpt = preg_replace('#<a.*?>.*?</a>#i', '', $excerpt);
Replace it with.
$prepare_excerpt = preg_replace('#<a.*?>.*?</a>#i', '', $prepare_excerpt);
The login credentials are not working.
Best regards,
IsmaelOctober 25, 2017 at 8:46 pm #868942Thanks Ismael,
Almost home! That brought back the excerpts and made the Read More links go the right places, but we’d still love to get rid of these links that are automatically inserted as a part of the “link” format post.
Just a bit of clarity, one must start the except with the link for it to go where it needs to go, but in all blog styles except for “grid”, it doesn’t show up.
Thanks! I know this is a pain!
October 28, 2017 at 2:36 pm #869902Hi,
Thank you for the update. Please look for the same line.
$prepare_excerpt = avia_link_content_filter($prepare_excerpt);
Replace it with:
$prepare_excerpt = avia_link_content_filter($prepare_excerpt); $prepare_excerpt = $prepare_excerpt['content'];
Best regards,
IsmaelOctober 30, 2017 at 10:26 pm #870657Hi Ismael and thanks,
So I assume when you say
“please look for the same line:
$prepare_excerpt = avia_link_content_filter($prepare_excerpt);”I should be able to find that exact same line already in the postslider.php file. Would you mind pointing out where that line would be located? I’m having troubles tracking it down.
Thanks!
EDITED// please use pastebin.com for long codes.
November 3, 2017 at 4:19 am #871929Hey!
You just modified the code. Please install the Notepad++ software or any IDE of your chocie then open the file. The line should be located around line 400.
Best regards,
IsmaelNovember 7, 2017 at 5:13 pm #873833Hi Ismael,
Sorry for the difficulty here. When you say “you just modified the code”, if you look above, I never modified “$prepare_excerpt = avia_link_content_filter($prepare_excerpt);”
I did modify “$prepare_excerpt = preg_replace(‘#<a.*?>.*?#i’, ”, $excerpt);” and changed it to “$prepare_excerpt = preg_replace(‘#<a.*?>.*?#i’, ”, $excerpt);”
So, when I replace “$prepare_excerpt = preg_replace(‘#<a.*?>.*?#i’, ”, $excerpt);” with “$prepare_excerpt = avia_link_content_filter($prepare_excerpt);
$prepare_excerpt = $prepare_excerpt[‘content’];”All I get is an error message and an odd formatting (no link though): https://imgur.com/a/pokn4
Would you mind showing me where the code is that I should replace? Here is the code presently in the postslider.php file https://pastebin.com/2pupv925
November 8, 2017 at 6:01 am #874020Hi,
Alright. Please edit the postslider.php file, remove everything then replace it with the following code.
// https://pastebin.com/q4HpJewV
Best regards,
IsmaelNovember 14, 2017 at 10:35 pm #876826Sorry Ismael,
Deleted all code in the Postslider.php file and pasted from // https://pastebin.com/q4HpJewV but I get what looks to be the same exact results: https://imgur.com/a/FvUOT
With Pantheon, I get a commit message so I know the file has been edited and saved successfully.
Any ideas?
November 16, 2017 at 5:30 am #877368Hi,
The problem is that the posts have no excerpt. There is also an invalid code in the modification. Please edit the posts, add the same content from the default editor excluding the link or url to the Excerpt box. Example.
Default Editor: http://rsmus.com/what-we-do/industries/consumer-products/restaurant/top-trends-to-watch-in-restaurants-in-2017.html A formal analysis of 2017 trends and revenue impact from QSR. Excerpt: A formal analysis of 2017 trends and revenue impact from QSR.
In the postslider.php file, look for the following code then remove it.
if($format == 'link') { $prepare_excerpt = avia_link_content_filter($prepare_excerpt); $prepare_excerpt }
Best regards,
IsmaelNovember 21, 2017 at 6:38 pm #879867All right Ismael, that did the trick. Originally I had tried using the excerpt field with the link text, wouldn’t show.
But, everything looks and functions just like we want it to now.
Thanks and sorry for all the back and forth!
November 22, 2017 at 5:57 am #880069 -
AuthorPosts
- The topic ‘Posts Function Appears to be Broken’ is closed to new replies.