• Hi all, I am trying to find out if its possible to get the gallery title in PHP from within say a template file.

    Currently I am trying to get a breadcrumb working for gallery pages and the only way I have managed to do it thus far is:

    <div class="breadcrumbs">
                <a href="<?php echo get_bloginfo('url') ?>">Home</a>
                >
                <?php if($url == "www.manorproperty.info/build/gallery/"){ ?>
    			<span class="current">Gallery</span>		
    
    			<?php } else { ?>
                <a href="<?php echo get_bloginfo('url') ?>/gallery/">Gallery</a>
    			>
                <span class="current">
                <?php
    				$pieces = explode("/", $url);
    				$num = (substr_count($url, "/") - 1);
    				$string = $pieces[$num];
    				$string = str_replace("-"," ",$string);
    
    				echo ucwords($string);
    			?>
                </span>
                <?php } ?>
            </div>

    Now this works to some extend but when I have galleries with names that contain things like & and , because the SEO friendly link wont have these in its causing me big hassle.

    So I really need to try to find a way of getting the actual gallery name to make my breadcrumb but I don’t know how to get it from outside the nextgen plugin files.

    http://wordpress.org/extend/plugins/nextgen-gallery/

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Gallery Title / PHP’ is closed to new replies.