ThemeShaper Forums » Thematic

Found an error in the thematic_page_title function for attachments

(3 posts)
  • Started 5 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.

    Example:

    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 5 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.

    Chris

    Posted 5 years ago #
  3. Awesome!

    Posted 4 years ago #

RSS feed for this topic

Reply

You must log in to post.