Title: Offset not contained in string?
Last modified: August 19, 2016

---

# Offset not contained in string?

 *  [mycoachkennedy](https://wordpress.org/support/users/mycoachkennedy/)
 * (@mycoachkennedy)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/offset-not-contained-in-string/)
 * Hello,
 * I’m a newbie and trying to get this problem resolved:
 * Warning: strpos() [function.strpos]: Offset not contained in string in /home/
   content/32/4437032/html/shoesfordiabeticguide/shoesfordiabetics/wp-content/themes/
   magasin-siete/functions.php on line 280
 * Any ideas on how I can fixed this problem?
 * Thanks in advance for your assistance. Have a great day!

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

 *  [Christian Schenk](https://wordpress.org/support/users/chschenk/)
 * (@chschenk)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/offset-not-contained-in-string/#post-1121842)
 * Try adding the following line just above line 280 in `functions.php`:
 * > if (strlen($content) <= $max_char) $max_char = strlen($content);
 * Anyway, I suggest you tell the theme’s author about this problem. I’m sure he’ll
   fix this in a future release.
 *  Thread Starter [mycoachkennedy](https://wordpress.org/support/users/mycoachkennedy/)
 * (@mycoachkennedy)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/offset-not-contained-in-string/#post-1121898)
 * Hi Chschenk,
 * Thanks for your tip. I did give it a go but received this error message:
 * Parse error: syntax error, unexpected T_IF in /home/content/32/4437032/html/shoesfordiabeticguide/
   shoesfordiabetics/wp-content/themes/magasin-siete/functions.php on line 280
 * I emailed the theme author but haven’t received a reply yet.
 * Thanks for making the effort to help me out. Have a great day.
 *  [Christian Schenk](https://wordpress.org/support/users/chschenk/)
 * (@chschenk)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/offset-not-contained-in-string/#post-1122037)
 * The corresponding snippet should look like the following:
 * > function themefunction_content(…) {
   >  … $content = strip_tags($content);
   >  if (strlen($content) <= $max_char) $max_char = strlen($content);
   >  $space =
   > strpos($content,” “,$max_char); if (strlen($_GET[‘p’]) > 0) { …
 * If you can’t manage to fix this yourself, [contact](http://www.christianschenk.org/contact/)
   me and I’ll have a more detailed look.
 *  Thread Starter [mycoachkennedy](https://wordpress.org/support/users/mycoachkennedy/)
 * (@mycoachkennedy)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/offset-not-contained-in-string/#post-1122096)
 * chschenk,
 * Thank you so much for your reply. I’m going to save your problem solving tip.
   Out of frustration, I switched to another template but I could become motivated
   to return to the former.
 * Thanks again for your assistance. Have a great day!
 *  [orangej568](https://wordpress.org/support/users/orangej568/)
 * (@orangej568)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/offset-not-contained-in-string/#post-1122138)
 * I ran into the same problem and applied the code that you suggested mycoachkennedy
   and it worked great! Thanks!
 *  [tigger86](https://wordpress.org/support/users/tigger86/)
 * (@tigger86)
 * [16 years, 5 months ago](https://wordpress.org/support/topic/offset-not-contained-in-string/#post-1122178)
 * I ran into the same problem with the magasin-dos theme, and this solution cleared
   the problem up. Thanks chschenk. Now if only I could solve the rest of my problems
   so easily.
 *  [kalengirl](https://wordpress.org/support/users/kalengirl/)
 * (@kalengirl)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/offset-not-contained-in-string/#post-1122203)
 * I add the code chschenk posted above and it fix the problem in my website.
    Thanks!!

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

The topic ‘Offset not contained in string?’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 7 replies
 * 5 participants
 * Last reply from: [kalengirl](https://wordpress.org/support/users/kalengirl/)
 * Last activity: [16 years, 1 month ago](https://wordpress.org/support/topic/offset-not-contained-in-string/#post-1122203)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
