SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Zealot charles_i's Avatar
    Join Date
    Apr 2007
    Location
    Toronto, Canada
    Posts
    161
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    WordPress code error call to thematic_abovecontent()

    I've copied the exact code (and renamed it to my child theme's name) from the book's download but the home page has this error:

    Call to undefined function: thematic_abovecontent() in /homepages/38/d93970146/htdocs/winepilgrims-ca/wp-content/themes/pilgrims/home.php on line 13

    Why can it not find the thematic_abovecontent() function?

    Charles

  2. #2
    SitePoint Zealot charles_i's Avatar
    Join Date
    Apr 2007
    Location
    Toronto, Canada
    Posts
    161
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I found the problem, and I've emailed Sitepoint books about it.

    In the Advanced Theme Construction chapter the book says to copy the index.php file and rename it as home.php - the example in the book and the code in the download includes this function call in home.php <?php thematic_abovecontent(); ?> - this function call is not in index.php and there is no function thematic_abovecontent() in the functions.php file so the home page shows a PHP error. If I'm correct this line should be removed from home.php <?php thematic_abovecontent(); ?>.

  3. #3
    SitePoint Member
    Join Date
    Sep 2008
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Charles,

    I had the same problem which means we are not alone but I took your suggestion by deleting line 13 in home.php and it has produced a new errer:

    Fatal error: Call to undefined function thematic_belowcontent() in /home/seosuch/public_html/wp-content/themes/wicked/home.php on line 47

    Can anybody help with this problem? Please...

    Thanks

  4. #4
    SitePoint Member
    Join Date
    Nov 2009
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Red face

    I deleted lines 13 and 47 from home.php.

    line 13: <?php thematic_abovecontent(); ?>

    line 47: <?php thematic_belowcontent(); ?>

    It then worked fine.

    My previous problems with the files were
    because I had gone to "Settings --> Reading , and checked "Front page displays" -- "a static page (select below):

    Front page: about"

    and not setting

    "Posts page: "

    Details! Details!

  5. #5
    SitePoint Member
    Join Date
    Sep 2008
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Algisk,

    I did what you suggested and now it seems to work perfectly!

  6. #6
    SitePoint Member
    Join Date
    Jan 2008
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thumbs up

    Thanks algisk, I to was having that same problem and racking my brain trying to figure out what I was doing wrong.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •