Custom Field causing issues with site

Hey. I'm using custom fields to have sources for our articles. The issue is, if a source is not defined, the page does not load anything past it, including my money-earning ads! We have around 1800 articles that don't have a source, usually stuff we covered ourselves etc, and some of these are our highest viewed pages.

You can see what I mean by viewing this article that does have a source:

http://searchbuzz.co/11082/michael-bay-ces-2014/

And here is one where the source was just added as text, and not through the custom field.

http://searchbuzz.co/9084/new-zealand-suffers-6-9-magnitude-earthquake/

I have thought of two solutions.

All of these issues are in the "Articles" category, so I could make it so this custom field does not appear in that category?

Another solution could be to ammend the code so that it is able to load the content past it even if a "source" has not been defined.

Let me know if you can help with this issue.

Thanks a lot
Ashley

  • Alexander
    • DEV MAN’s Mascot

    Hey @Ashley Pearson,

    Let's find out what's causing the problem. Can you start by clearing your W3TC cache, and disabling it temporarily? This will help avoid any false negatives during testing.

    Next, can you try switching to a default theme temporarily like TwentyThirteen. Let me know if the page loads fully in this theme. If so, we know there's a problem with the post template of your theme.

    If that doesn't make a difference, try disabling all your plugins one at a time. Try reloading the page each time you deactivate one. If it starts working, we'll know the last plugin you toggled was causing a problem.

    Once we identify a conflict, we can look for a specific solution for it.

    Let me know how it goes!

    Best regards,

  • Alexander
    • DEV MAN’s Mascot

    @Ashley Pearson,

    The fact that subsequent articles are not loading means that something is causing a problem. Just because they don't have a source doesn't mean there shouldn't be a fallback that allows the rest of the site to load properly. Are you able to test for a plugin/theme conflict?

    I just pulled up the site again and looks like it's loading ok at the moment.

    Best regards,

  • Ashley Pearson
    • The Incredible Code Injector

    Hi Alex,

    As I said, the site is loading fine. It doesn't affect the site. If a source is not entered, it stops the rest of the page from loading as it has nothing to load from. I already understand what the issue is and was looking for a workaround, but I shall look elsewhere.

    Regards,
    Ash

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.