Title: errors php
Last modified: February 23, 2024

---

# errors php

 *  [sacconi](https://wordpress.org/support/users/sacconi/)
 * (@sacconi)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/errors-php-9/)
 * 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](https://pastebin.com/mj6J9MPW)
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ferrors-php-9%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  [Devinlabs Solutions](https://wordpress.org/support/users/devinlabsolutions/)
 * (@devinlabsolutions)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/errors-php-9/#post-17448220)
 * 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](https://prnt.sc/fDNU1a03cQ6A)
    3.  - If your problem didn’t solved.Let me know.
 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/errors-php-9/#post-17449674)
 * 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.

## Tags

 * [php](https://wordpress.org/support/topic-tag/php/)

 * In: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
 * 2 replies
 * 3 participants
 * Last reply from: [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * Last activity: [2 years, 3 months ago](https://wordpress.org/support/topic/errors-php-9/#post-17449674)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
