'wordpress' Category

  • Remove duplicate categories urls.

    January 13, 2011

    I’ve discovered that WordPress generates the same category page for http://exapmple.com/category/child and http://exapmple.com/category/parent/child which is not so good for SEO. The possible quick fix that worked for me – to add to the theme’s header.php the following code: if (is_category()) { list($dummy, $categoryRelative) = split(“category”, $_SERVER["REQUEST_URI"]); $category_id = get_cat_ID( single_cat_title(“”, false) ); $category_link = get_category_link( […]

  • wordpress: change rss feed order

    December 24, 2010

    For some reason I needed my rss feed to sorted not by post date, but by posts’ id as I could have newer post with not the latest post date (some future posts that stll had publish status). To change the rss feed’s order I’ve hooked pre_get_posts: add_action(‘pre_get_posts’, ‘sort_rss’ ); function sort_rss( $notused ) { […]

Powered by Wordpress and MySQL. Theme by Shlomi Noach, openark.org