• Resolved KACramer

    (@kacramer)


    Hi! I am trying to edit this plugin so that I can have it pull the content from the “Photo Album” page only if the user is on the first page of the Photo Album/Photo Gallery (if the current URL is “sciotomile.com/photo-ablum/” and nothing else)… I am trying to edit the wppa-breadcrumbs.php file to do this… So I would like assign the html content from the Photo Album page to string variable by doing something like this:

    $photopage = "/photo-albums/";
    	$currentpage = $_SERVER['REQUEST_URI'];
    	if($photopage==$currentpage) {
    		$wppa_pageIntro=the_post();
    	}
    	$wppa['out'] .= wppa_nltab('-').'</div>'.$wppa_pageIntro;

    I need this content to appear in between the breadcrumbs and the thumbnails or album covers. The above tactic doesn’t work obviously. Currently I am generating the intro copy on the site by hard coding the content into the plugin file, as follows:

    $photopage = "/photo-albums/";
    	$currentpage = $_SERVER['REQUEST_URI'];
    	if($photopage==$currentpage) {
    		$wppa_pageIntro='<br /><h1>Visual Gallery</h1><p>Check out our different photo albums showcasing recent events, happenings, and features around the Mile! Click on an album to see more images.</p>';
    	}
    	$wppa['out'] .= wppa_nltab('-').'</div>'.$wppa_pageIntro;

    This is functional, but not really ideal. I would like to make this copy easier for the client to edit. Is such a thing possible?

    Here is the site: http://www.sciotomile.com/photo-albums/

    P.S. The site will look better once I upload more albums. I am just working on getting the structure up and running for the moment.

    https://wordpress.org/plugins/wp-photo-album-plus/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter KACramer

    (@kacramer)

    Okay I sort of figured it out… I did this:

    $photopage = "/photo-albums/";
    	$currentpage = $_SERVER['REQUEST_URI'];
    	if($photopage==$currentpage) {
    		$wppa_pagetitle=get_the_title();
    		$wppa_PageContentText=get_the_content();
    	}
    	$wppa['out'] .= wppa_nltab('-').'</div><h1>'.$wppa_pagetitle.'</h1><p>'.$wppa_PageContentText.'</p>';
    }

    But it’s not formating the title with the h1 information from my css… Any idea why?

    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    I even do not see a <h1> on the page source… Is there some content formatting plugin acitve?

    Thread Starter KACramer

    (@kacramer)

    Sorry… yeah… I fiqured it out last night. The h1 in the theme’s css was tied to the content div… so anyway, added css for new div id called “photoAlbum_pageTitle” and used it instead of h1… So I am good now. Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Modifying wppa-breadcrumbs.php to render page content?’ is closed to new replies.