mennake / thematic

Automatically exported from code.google.com/p/thematic
0 stars 0 forks source link

Tidy link structure for custom post type archives link in post footer #125

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The link to the custom post type archives in the post footer - 'Browse the 
MyCustomPostType archive.' is currently example.com/?post_type=mycustomposttype.

?post_type= is unnecessary if pretty permalinks are active and not ideal from 
an SEO point of view. 

Simple fix suggested in patch

Original issue reported on code.google.com by umbert...@gmail.com on 15 Jan 2012 at 3:43

Attachments:

GoogleCodeExporter commented 9 years ago
(The patch doesn't address the situation where pretty permalinks are not active 
however...)

Original comment by umbert...@gmail.com on 15 Jan 2012 at 4:08

GoogleCodeExporter commented 9 years ago
Ah... At the time there was no core function for this, WP3.1 now gives us: 
get_archive_link($type)

Thanks

Original comment by eugene.m...@gmail.com on 17 Jan 2012 at 2:41

GoogleCodeExporter commented 9 years ago
Having googled get_archive_link() there also seems to be 
get_post_type_archive_link()
- Go WP :) 

Original comment by umbert...@gmail.com on 17 Jan 2012 at 7:12

GoogleCodeExporter commented 9 years ago
Issue 127 has been merged into this issue.

Original comment by eugene.m...@gmail.com on 17 Jan 2012 at 9:15

GoogleCodeExporter commented 9 years ago
Hi take a look at the merge of issue 127. I have not yet checked the patch on 
127 but if either of you could offer something up it'd be awesome. I'm moving 
on multiple issues currently any help is much appreciated.

Original comment by eugene.m...@gmail.com on 17 Jan 2012 at 9:18

GoogleCodeExporter commented 9 years ago
Gene - created patch using get_post_type_archive_link( $post_type ) 

Tested on WP3.3.1 / r790 

Issue 127 was mine also - not paying attn to what accnt I was logged into - 
still getting the hang of this :)

Rob

Original comment by umbert...@gmail.com on 17 Jan 2012 at 11:00

Attachments:

GoogleCodeExporter commented 9 years ago
I'll take a pass at providing a wp 3.0 backwards compatible approach.

Original comment by eugene.m...@gmail.com on 21 Jan 2012 at 4:42

GoogleCodeExporter commented 9 years ago
Check out r793

I've made changes to thematic post footer and thematic_postmeta_authorlink

The issue with the author link is WordPress only lists "Post" post types in 
author archives. So I took the link away from the author attribution of custom 
post types. It can be added back by adding theme support in a child theme via:
add_theme_support( 'thematic_support_post_type_author_link')

Original comment by eugene.m...@gmail.com on 21 Jan 2012 at 7:52

GoogleCodeExporter commented 9 years ago
typo on line 1417 & 1419 content-extensions: $post_tpye_archive_link

Original comment by umbert...@gmail.com on 26 Jan 2012 at 9:22

GoogleCodeExporter commented 9 years ago
Thank you! That'll get resolved. At least I was consistent in the misspelling 
when adding it to $postfooter ;)

Can you verify that the changes function properly?

Original comment by eugene.m...@gmail.com on 26 Jan 2012 at 9:31

GoogleCodeExporter commented 9 years ago
Tested on my local install and all good. 

Original comment by umbert...@gmail.com on 26 Jan 2012 at 9:41

GoogleCodeExporter commented 9 years ago
 r814

Original comment by eugene.m...@gmail.com on 26 Jan 2012 at 9:57