Nathan Riley
asked on
Worpdress Post Not Saving
I have a Wordpress post that when trying to save it just redirects to the 404 not found page.
If I only have text in the post it works just fine, but when trying to show a code example of:
In the post and saving it redirects to the 404 page, not sure why or what in this is causing the issue?
If I only have text in the post it works just fine, but when trying to show a code example of:
$postTitle = str_replace(
array("\xe2\x80\x98", "\xe2\x80\x99", "\xe2\x80\x9c", "\xe2\x80\x9d", "\xe2\x80\x93", "\xe2\x80\x94", "\xe2\x80\xa6"),
array("'", "'", '"', '"', '-', '--', '...'),
$postTitle);
$postTitle = str_replace(
array(chr(145), chr(146), chr(147), chr(148), chr(150), chr(151), chr(133)),
array("'", "'", '"', '"', '-', '--', '...'),
$postTitle);
In the post and saving it redirects to the 404 page, not sure why or what in this is causing the issue?
ASKER
What I mean by show a code example is just that, I'm not trying to execute code on the page, I'm just dropping it in with <code> tags so that it can be shown in the article.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Figured out on my own.
Likely your theme won't change post/page slugs.
Plugins, especially SEO plugins, can muck about with slugs.
You say "show a code example" + it's unclear why you'd change your title, if you were just trying to embed a code example in your content.
Also... you don't mention how you're getting the shown str_replace(...) calls to fire... hook? plugin? hacked theme functions.php?
Try starting at the beginning + describe exactly what you're trying to accomplish + how you're firing your code.