Skip to main content
added 1205 characters in body
Source Link
mathiregister
  • 1.5k
  • 13
  • 55
  • 78

I couldn't find anything on the web. Is it possible to have custom template for the image attachement page. I wonder if it is possible to add a navigation to the image attachement page so people can easily navigate through a gallery.

Maybe it's even possible to add comments to each image?

edit: Moreover is it also possible to query if I'm currently on an attachement page? E.g. for breadcrumbs I want to insert something like "home > back to post > current_image.jpg"

edit/update:

function breadcrumbs() {
    if (!is_home()) {
        echo "<a href='" . get_bloginfo('home') . "' title='Home'>Home</a> &rang; ";
        if (is_category()) {
            $category = get_the_category(); 
            echo $category[0]->cat_name;
        } else if (is_single()) {
            the_category('title_li=');
            echo " &rang; ";
            the_title();
        } else if (is_page()) {
            $ancestors = get_post_ancestors($post);
            // echo ancestors
            foreach($ancestors as $id) {
                echo "<a href='" . get_permalink( $id ) . "' title='" . get_the_title( $id ) . "'>" . get_the_title( $id ) . "</a> &rang; ";
            }
        } else if (is_tag()) {
            global $wp_query;
            $tag = get_term( $wp_query->queried_object_id, 'post_tag');
            echo "Tag &rang; " . $tag->name;
        } else if (is_search()) {
            echo " Searchresults &rang; " . get_search_query();
        } else if (is_404()) {
            echo "Not found";
        //} else if ( is_attachment() ) {
        } else if ($post->post_type == 'attachment') {
            //echo "<a href='" . get_permalink() . "'>" . get_the_title() . "</a>";
            echo "doesn't work?";
        }
    }
}

I couldn't find anything on the web. Is it possible to have custom template for the image attachement page. I wonder if it is possible to add a navigation to the image attachement page so people can easily navigate through a gallery.

Maybe it's even possible to add comments to each image?

edit: Moreover is it also possible to query if I'm currently on an attachement page? E.g. for breadcrumbs I want to insert something like "home > back to post > current_image.jpg"

I couldn't find anything on the web. Is it possible to have custom template for the image attachement page. I wonder if it is possible to add a navigation to the image attachement page so people can easily navigate through a gallery.

Maybe it's even possible to add comments to each image?

edit: Moreover is it also possible to query if I'm currently on an attachement page? E.g. for breadcrumbs I want to insert something like "home > back to post > current_image.jpg"

edit/update:

function breadcrumbs() {
    if (!is_home()) {
        echo "<a href='" . get_bloginfo('home') . "' title='Home'>Home</a> &rang; ";
        if (is_category()) {
            $category = get_the_category(); 
            echo $category[0]->cat_name;
        } else if (is_single()) {
            the_category('title_li=');
            echo " &rang; ";
            the_title();
        } else if (is_page()) {
            $ancestors = get_post_ancestors($post);
            // echo ancestors
            foreach($ancestors as $id) {
                echo "<a href='" . get_permalink( $id ) . "' title='" . get_the_title( $id ) . "'>" . get_the_title( $id ) . "</a> &rang; ";
            }
        } else if (is_tag()) {
            global $wp_query;
            $tag = get_term( $wp_query->queried_object_id, 'post_tag');
            echo "Tag &rang; " . $tag->name;
        } else if (is_search()) {
            echo " Searchresults &rang; " . get_search_query();
        } else if (is_404()) {
            echo "Not found";
        //} else if ( is_attachment() ) {
        } else if ($post->post_type == 'attachment') {
            //echo "<a href='" . get_permalink() . "'>" . get_the_title() . "</a>";
            echo "doesn't work?";
        }
    }
}
added 731 characters in body; deleted 729 characters in body
Source Link
mathiregister
  • 1.5k
  • 13
  • 55
  • 78

I couldn't find anything on the web. Is it possible to have custom template for the image attachement page. I wonder if it is possible to add a navigation to the image attachement page so people can easily navigate through a gallery.

Maybe it's even possible to add comments to each image?

edit: Moreover is it also possible to query if I'm currently on an attachement page? E.g. for breadcrumbs I want to insert something like "home > back to post > current_image.jpg"

I couldn't find anything on the web. Is it possible to have custom template for the image attachement page. I wonder if it is possible to add a navigation to the image attachement page so people can easily navigate through a gallery.

Maybe it's even possible to add comments to each image?

edit: Moreover is it also possible to query if I'm currently on an attachement page? E.g. for breadcrumbs I want to insert something like "home > back to post > current_image.jpg"

I couldn't find anything on the web. Is it possible to have custom template for the image attachement page. I wonder if it is possible to add a navigation to the image attachement page so people can easily navigate through a gallery.

Maybe it's even possible to add comments to each image?

edit: Moreover is it also possible to query if I'm currently on an attachement page? E.g. for breadcrumbs I want to insert something like "home > back to post > current_image.jpg"

Tweeted twitter.com/#!/StackWordPress/status/55014055550791681
added 180 characters in body; added 1 characters in body
Source Link
mathiregister
  • 1.5k
  • 13
  • 55
  • 78

I couldn't find anything on the web. Is it possible to have custom template for the image attachement page. I wonder if it is possible to add a navigation to the image attachement page so people can easily navigate through a gallery.

Maybe it's even possible to add comments to each image?

edit: Moreover is it also possible to query if I'm currently on an attachement page? E.g. for breadcrumbs I want to insert something like "home > back to post > current_image.jpg"

I couldn't find anything on the web. Is it possible to have custom template for the image attachement page. I wonder if it is possible to add a navigation to the image attachement page so people can easily navigate through a gallery.

Maybe it's even possible to add comments to each image?

I couldn't find anything on the web. Is it possible to have custom template for the image attachement page. I wonder if it is possible to add a navigation to the image attachement page so people can easily navigate through a gallery.

Maybe it's even possible to add comments to each image?

edit: Moreover is it also possible to query if I'm currently on an attachement page? E.g. for breadcrumbs I want to insert something like "home > back to post > current_image.jpg"

Source Link
mathiregister
  • 1.5k
  • 13
  • 55
  • 78
Loading