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

    #865519

    Hey raisonbrands,

    Please, could you provide to us a screenshot about this? I can`t see the problem.

    Best regards,
    John Torvik

    #865835

    Hi John,
    Sure thing: https://imgur.com/a/Kmz6y

    Screen Shot 1 and 2

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

    #865856

    Update 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, 2 months ago by raisonbrands.
    #865978

    After 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

    Screen Shot 3

    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/39sg7

    Please use the credentials below, the ones above are no longer relevant.

    Thanks!

    #866549

    Hi,

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

    #866550

    Hi,

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

    #867697

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

    #867701

    Sorry, forgot to mention, we’re trying out new PHP in the dev environment, the credntials are below.

    #868490

    Hi,

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

    #868942

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

    https://imgur.com/a/y8kHE

    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!

    #869902

    Hi,

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

    #870657

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

    #871929

    Hey!

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

    #873833

    Hi 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

    #874020

    Hi,

    Alright. Please edit the postslider.php file, remove everything then replace it with the following code.

    // https://pastebin.com/q4HpJewV

    Best regards,
    Ismael

    #876826

    Sorry 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?

    #877368

    Hi,

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

    #879867

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

    #880069

    Hi,

    Glad it worked. Please open a new thread or post if you need anything else. We’ll close the thread now.

    Best regards,
    Ismael

Viewing 20 posts - 1 through 20 (of 20 total)
  • The topic ‘Posts Function Appears to be Broken’ is closed to new replies.