• Is there a way to export all scategory permalinks-urls, for example together with post ids or “regular” post titles? Or in the regular wordpress export?

    I need this for a wordpress migration….

    I’ve been looking at the table, but the postmeta table doesn’t make me very happy…. i have to think hard about sql join statements…

    http://ww.wp.xz.cn/extend/plugins/scategory-permalink/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter eiland

    (@eiland)

    This goes a while, but needs to undouble:

    SELECT term3.slug, term2.slug, term1.slug, wp_terms.slug, wp_posts.post_name
    FROM wp_posts
    LEFT JOIN (
    wp_postmeta,
    wp_terms,
    wp_terms AS term1,
    wp_terms AS term2,
    wp_terms AS term3,
    
    wp_term_taxonomy,
    wp_term_taxonomy AS tax1,
    wp_term_taxonomy AS tax2,
    wp_term_taxonomy AS tax3
    
    ) ON (
    
    wp_posts.ID = wp_postmeta.post_id
    
    AND wp_terms.term_id = wp_postmeta.meta_value
    AND wp_postmeta.meta_key = "_category_permalink"
    AND wp_terms.term_id = wp_term_taxonomy.term_id
    AND wp_term_taxonomy.parent = term1.term_id
    AND term1.term_id = tax1.term_id
    AND tax1.parent = term2.term_id
    AND term2.term_id = tax2.term_id
    AND tax2.parent = term3.term_id
    )
    Thread Starter eiland

    (@eiland)

    sorry:

    SELECT DISTINCT wp_terms.term_id, wp_postmeta.post_id, term3.slug, term2.slug, term1.slug, wp_terms.slug, wp_posts.post_name, wp_posts.post_title
    
    FROM wp_postmeta
    
    LEFT JOIN wp_posts ON wp_postmeta.post_id=wp_posts.ID
    
    LEFT JOIN wp_terms ON wp_postmeta.meta_value=wp_terms.term_id
    
    LEFT JOIN wp_term_taxonomy ON wp_term_taxonomy.term_id = wp_terms.term_id
    
    LEFT JOIN wp_terms AS term1 ON term1.term_id = wp_term_taxonomy.parent
    
    LEFT JOIN wp_term_taxonomy AS tax1 ON tax1.term_id = term1.term_id
    
    LEFT JOIN wp_terms AS term2 ON term2.term_id = tax1.parent
    
    LEFT JOIN wp_term_taxonomy AS tax2 ON tax2.term_id = term2.term_id
    LEFT JOIN wp_terms AS term3 ON term3.term_id = tax2.parent
    
    WHERE wp_postmeta.meta_key = "_category_permalink"

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

The topic ‘[Plugin: sCategory Permalink] Export permalinks’ is closed to new replies.