Jump to content
Sign in to follow this  

Turn Categories into Pages with WP+Genesis

Recommended Posts

Okay so, a lot of people will say when working with WP, not to use categories or tags, and only use pages. This resolves some duplicate content issues and it's definitely better for SEO.


I do use categories and I want my category pages to be more like landing pages, that link to the various content in the category and I want 100% complete control of the page. This way I'll actually have a chance at ranking the category pages as well.


This is actually really easy to do using Wordpress and the Genesis Framework.


Step #1 get the plugin "Category Tiny MCE" this will turn the category description into a simple editor.


Step #2 edit your child theme's functions.php, add

add_action( 'genesis_after_loop', 'rv_output_category_info' );
function rv_output_category_info() {
	if ( is_category() || is_tag() || is_tax() ) {
		//echo single_term_title();
		echo term_description();

Note, I commented out echoing the title, the way it's setup by default, it displays the title in the h1 tag, which is perfect, no reason to print it again. This will put the description below the loop, or at the bottom of the page before the footer.


Step #3 Turn the loop off for category pages. This gets rid of all the duplicate content.

add_action('genesis_before_content', 'genesis_archive_remove_loop');

function genesis_archive_remove_loop() {
   if ( is_category() and (get_query_var('cat') != 16))
     remove_action( 'genesis_loop', 'genesis_do_loop' );
   return; // do nothing unless it's a category

Note: I have category 16 ignored because I don't want that category to behave that way. I suggest leaving line #1 of this code commented out until you are done setting it up.


Step #4 Determine which layout you want to use (I'm probably going to use full width because I want it to look like a landing page) and fix any CSS issues.


I don't know if there's a way to add meta information and I don't care because it doesn't do anything.


Note: When you add content to the category, your category won't change at all, since it basically behaves like a page now and not like an archive would.


This effectively eliminates any posts vs pages and category/tag whatever conversations. If you turn the category/tag into a page with unique content, Google will rank it just like anything else.


Doing this with Genesis is about 10 times easier, I've never really been able to accomplish that without modding Wordpress or heavily modding the theme.


Other solution: add additional "description" and "alternate title" fields to each post and then mod the theme (see https://codex.wordpress.org/Custom_Fields) so that the archive pages have unique content and yeah screw that. So much jerking around ...

Share this post

Link to post
Share on other sites

SEOPress WordPress SEO plugin

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.