• I have 2 errors to solve:

    Post type non valido. (invalid post type)

    Questo messaggio è stato generato da Core di WordPress.

    Stack di chiamate:

    1. wp_die()
      wp-admin/edit.php:18

    Where I have to put the hands?

    and:

    NoticeUndefined variable: content+

    wp-content/themes/sacconicase/template-parts/content-search.php:44

    wp-content/themes/sacconicase/template-parts/content-search.php:56

    This is my content-search.php: https://pastebin.com/mj6J9MPW

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • As I can see your code there is two thing in your code

    1. your $content variable is being used in If condition. if condtion is not true. you will face such error. so it its better if you want to use $content variable then you have to define that $content variable before if condition.
    2. check this screenshot . https://prnt.sc/fDNU1a03cQ6A
      • If your problem didn’t solved.Let me know.
    Moderator bcworkz

    (@bcworkz)

    The simplest solution to the $content issue is to place this:
    $content = '';
    prior to any attempt at concatenating anything else to the variable. Perhaps add it at line 42?

    The invalid post type message could be because an improper post type is passed in the edit link, for example:
    /wp-admin/edit.php?post_type=portfolio
    If “portfolio” was not properly registered prior to attempting to use the link, we’ll get an invalid post type message. This can happen when a plugin that’s responsible for registering the post type had been deactivated and you try to use a bookmarked edit link. You need to ask yourself, “What post type am I trying to edit?” and “What happened to the code that registers this post type?”

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘errors php’ is closed to new replies.