Site logo

[Resolved] error when using template tag {{post_terms.taxonomy}} in Elements Header

Home Forums Support [Resolved] error when using template tag {{post_terms.taxonomy}} in Elements Header

Home Forums Support error when using template tag {{post_terms.taxonomy}} in Elements Header

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #668209
    konceptuel

    Hey,
    i’m getting this error when assigning an Elements Header with the template tag {{post_terms.taxonomy}} to All Posts:

    ( ! ) Catchable fatal error: Object of class WP_Error could not be converted to string in /app/public/wp-content/plugins/gp-premium/elements/class-hero.php on line 848

    The Posts has taxonomy, category and tag, assigned to them.
    If the template tag {{post_terms.taxonomy}} is removed from the Elements header, the header is working.

    WP 4.9.8
    PHP 7.2.0
    MySQL 5.6.34
    Apache webserver (Local by Flywheel)

    #668534
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    Are you replacing taxonomy with the same of the taxonomy you want to display terms for?

    For example, if you wanted to display categories, you would do this: {{post_terms.category}}

    Let me know 🙂

    #668569
    konceptuel

    Ahh.. 🙂
    I did not replace taxonomy with the type of taxonomy I want to display.
    It works like a charm.

    Thank you Tom.

    #668844
    Tom
    Lead Developer
    Lead Developer

    You’re welcome 🙂

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.