WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] [Plugin: Category Template Hierarchy] Argument #2 is not an array on line 70 (2 posts)

  1. madn3ss75
    Member
    Posted 2 years ago #

    Hello,
    when I try to open a category page like http://www.example.com/category/blog/ I receive this error:
    Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /fullpath-hidden/wp-content/plugins/category-template-hierarchy/category-template-hierarchy.php on line 70

    The category has its own template file (category-blog.php) but no child template files.

    I think this could be a bug.

    Thanks.

  2. madn3ss75
    Member
    Posted 2 years ago #

    I found the problem.
    You need to add at line 71, just before
    $templates = array_merge($templates, self::add_template_set($template_prefix));
    the following code:
    if (!empty($template_prefix))

    And the problem is gone.

Topic Closed

This topic has been closed to new replies.

About this Topic