WordPress.org

Ready to get started?Download WordPress

Forums

Plugin (Developing One) Prevents Blog Posts From Loading (2 posts)

  1. jbh
    Member
    Posted 4 years ago #

    Hey,

    I have developed a few wordpress plugins in my day and never had this problem. Whenever I to add:

    add_filter('the_content',myfunction);

    No posts will display. Basically, I created this plug-in to not need any content filters. Thing is, I created a file called functions.php which houses every function. I use in.php to create the installation set-up. I get *no* errors with activating or using the plug-in. ** The only error is that all posts are disappearing* and the home page says:

    "Sorry, but there aren't any posts with this date."

    If I de-activate this plug-in, every post re-appears.
    What type of conflicts could cause the 'the_content' filter to not work (I tried using filters from previous plug-ins nothing works)

    I am researching this everywhere but I cannot find the answer. I would post code if needed.

    Thanks

    Joel

  2. Eric Mann
    Member
    Posted 4 years ago #

    You need to have your function in ''s as well. So add_filter('the_content', 'myfunction');

    I don't know if this is the only issue you're running into, but from my first glance of your description it should fix it. If not, please post a code snippet.

Topic Closed

This topic has been closed to new replies.

About this Topic