Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   General (http://forum.bytesforall.com/forumdisplay.php?f=40)
-   -   How do I prevent Auto Draft from populating the Atahualpa Post/Page Options? (http://forum.bytesforall.com/showthread.php?t=10662)

lmilesw Oct 25, 2010 01:20 PM

How do I prevent Auto Draft from populating the Atahualpa Post/Page Options?
 
Edit the functions.php (in the Atahualpa theme folder)
At about line 603 replace
$title = $post_id->post_title;
with the following
$title = ($post_id->post_title !== 'Auto Draft') ? $post_id->post_title : '';


The line you are changing is right after
$thePostID = $post->ID;
$post_id = get_post($thePostID);

So currently the three lines that are there look like
$thePostID = $post->ID;
$post_id = get_post($thePostID);
$title = $post_id->post_title;

And what should be there after the change is
$thePostID = $post->ID;
$post_id = get_post($thePostID);
$title = ($post_id->post_title !== 'Auto Draft') ? $post_id->post_title : '';

The changes above will only prevent the Auto Draft from happening in the future and will not remove any Auto Draft entries. To get rid of those you will need to get into your database. If you are not clear on what you are doing though don't do anything. As always do a backup before making any changes.

If you are using Atahualpa with another language textstrings please take that into account as Auto Draft would be something different for you. For example in Danish "Auto Draft" would be "Automatisk kladde".


All times are GMT -6. The time now is 04:02 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.