Get pages by title instead of path to prevent duplicate

This commit is contained in:
Brian Miyaji
2014-03-16 14:18:38 +11:00
parent 12864c49a5
commit f2c55dd79e
3 changed files with 10 additions and 5 deletions

View File

@@ -118,7 +118,7 @@ if ( class_exists( 'WP_Importer' ) ) {
list( $name, $leagues, $seasons ) = $row;
$team_object = get_page_by_path( $name, OBJECT, 'sp_team' );
$team_object = get_page_by_title( $name, OBJECT, 'sp_team' );
if ( ! $name || $team_object ):
$this->skipped++;