Category Shortcode
Fatal error message (5 posts)

  1. bbigham
    Posted 4 years ago #

    Ooops ... I must be doing something wrong.

    I placed the shortcode
    [Category number='-1' method='full' order='asc' id='3' orderby='title']
    on the page, and get this:

    Fatal error: Call to undefined function get_the_post_thumbnail() in /home/content/c/h/i/chirobooks/html/wp-content/plugins/category-shortcode-w-generator/category_shortcode.php on line 157

    Can someone help me figure this out?


  2. Netjera
    Posted 4 years ago #

    Hi! I had this problem, too, and I was able to trace it back to how category_shortcode gets the post thumbnails. It uses the get_the_post_thumbnail (http://codex.wordpress.org/Function_Reference/get_the_post_thumbnail) and if that isn't enabled by your theme, then you get this error.

    To fix it, go into your theme's functions.php file, and add:
    add_theme_support( 'post-thumbnails' );
    to it. I put it under where the theme registered the menus and side bars, but before it set the paths for everything, and it works fine now. (You'll still need to style the output, but there's directions for that in the readme.) Good luck!

  3. bbigham
    Posted 4 years ago #

    Thanks so much for the response and the info, Netjera. I'll definitely keep it on file for future reference!

    In the meantime, however, I tried a different shortcode plugin that worked so I'm using it instead.

  4. Netjera
    Posted 4 years ago #

    No problems. I tried a couple of different post in pages/shortcode plugins before I found the one that worked for me. :D

  5. heelgrinder
    Posted 3 years ago #

    Thank you, Netjera! That worked perfectly!!!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Category Shortcode
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic