ThemeShaper Forums » Thematic

Found an error in the thematic_page_title function for attachments

(3 posts)
  • Started 11 years ago by allancole
  • Latest reply from allancole
  • This topic is resolved
  1. So it looks like the thematic_page_title function is adding the wrong permalink for the attachment.php template. Basically, the link in the .page-title of an attachment page points to the current page instead of it’s parent page.

    I’m not sure if this is the best way to fix this, but when I go to content-extensions.php and add global $post; to the beginning of the thematic_page_title function, it fixes the permalink.


    function thematic_page_title() {
    		global $post;
    		$content = '';
    		if (is_attachment()) {
    				$content .= '<h2 class="page-title"><a href="';
    				$content .= get_permalink($post->post_parent);
    				$content .= '" rev="attachment"><span class="meta-nav">&laquo; </span>';
    				$content .= get_the_title($post->post_parent);
    				$content .= '</a></h2>';
    Posted 11 years ago #
  2. Hi Allan,

    thanks a lot for your help .. this is the correct way to solve this problem. Will send the fix to the SVN.


    Posted 11 years ago #
  3. Awesome!

    Posted 11 years ago #

RSS feed for this topic


You must log in to post.