• Resolved Dnal

    (@dnal)


    I am designing a website using WordPress and do not want it to look like a blog.

    With that in mind I am trying to edit searchpage.php so that the date posted, comments, categories and tags do not appear alongside the page names in the search results.
    When I remove the various bits of php code that WordPress uses to display them they do not appear in the search results any more but the rest of the page does not display properly and I get an error:

    Fatal error: Call to undefined function phpinclude() in /home/tcrfm/public_html/wp-content/themes/lysa/search.php on line 1

    I have not made any changes to line 1, which reads:

    <?php get_header(); ?>

    The header displays correctly but there is no white background behind the page content as there should be and the rest of the page (sidebar, footer etc.) does not display.

    I don’t understand why removing a small piece of php which has no connection to the rest of the page content causes such havoc.

    I should also mention that if the search finds no results the page displays correctly and the “nothing found” heading which is included in searchpage.php shows up as it should.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The error is in search.php – not searchpage.php.

    Thread Starter Dnal

    (@dnal)

    Sorry, I meant search.php not searchpage.php. My mistake. Anyway, the problem still stands.

    Any ideas?

    Try changing phpinclude() to php include()

    Thread Starter Dnal

    (@dnal)

    Thanks a lot, that seems to have solved the problem. Oddly the php include() in line 1 was fine. The problematic one was much further down.

    Thanks a lot!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Problems editing searchpage.php’ is closed to new replies.