262 comments found

jonta62 Purchased

Hi, I have some problems creating new page templates. I do everything the standard way. The file is named template-narrow-page.php and the content of the page is as below, just a copy of page.php

I get the same result on a web server and on a local installation using MAMP

<?php
/**
 * Template Name: Narrow Page
 * Description: A Template for displaying pages in a single page.
 *
 */

<?php get_header(); ?>
<main id="main" role="main">
<?php while ( have_posts() ) : the_post(); ?>
    <?php
        global $post;
        $bgcolor = get_post_meta( $post->ID, '_cmb_background_colorpicker', true );
        $bgimage = get_post_meta( $post->ID, '_cmb_background_image', true );
        $descriptiontext = get_post_meta( $post->ID, '_cmb_description_text', true );
        $headingstyle = get_post_meta( $post->ID, '_cmb_heading_style', true );
    ?>
    <div class="page" style="background-color:<?php echo $bgcolor ?>;<?php  if (!empty($bgimage)) { echo "background-image:url($bgimage);"; } ?>">
        <div class="grid">
                <div class="c12 end">
                    <?php if($headingstyle == "dropcap"){
                        echo "<p class="drop-cap zoo-page-title">" . get_the_title()."  - <span>$descriptiontext</span></p>";
                        }
                    elseif ($headingstyle == "standard") {
                        echo "<h1>" . get_the_title() . "</h1>";
                        echo "<p class="zoo-page-title"><span>$descriptiontext</span></p>";
                    }
                    elseif ($headingstyle == "noheading") {
                        echo "<p class="zoo-page-title"><span>$descriptiontext</span></p>";
                    }
                    ?>
                </div>
                <?php the_content(); ?>
        </div>
    </div>

<?php endwhile;  ?>
</main>    

<?php get_footer(); ?>

What changes would need to be made in the theme to allow portfolio links to open a page instead of the full-screen lightbox?

by
by
by
by
by
by