Custom page template struggles

Homepage Community Forums Epik Theme Support Custom page template struggles

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #9719
    scottpruett
    Customer

      Hi Wes,

      I’m building a site on Genesis w/ the Epik child theme, and need a custom page template to support this plugin:

      http://codecanyon.net/item/team-showcase-wordpress-plugin/4936368

      Basically, it creates individual pages for team members and then provides shortcodes for displaying a grid or table of said team members, which can be created based on categories and used anywhere. I’m mentioning this because it solves a problem and I want to use the plugin instead of creating pages for each individual team member.

      The issue is that the instructions say to duplicate page.php and rename the copy to single-tshowcase.php. I’ve created a single-tshowcase.php in the child theme folder, and it works, but I can’t figure out how to remove the post info, specifically the date/author.

      The page template doesn’t get selected [in the dashboard] for use by the plugin’s pages; it just gets called based on the filename. Here’s what’s in the new page template file. What am I missing?

      <?php
      
      remove_action( 'genesis_before_post_content', 'genesis_post_info' );
      
      genesis();

      Thanks!
      Scott

      #9726
      scottpruett
      Customer
        #9738
        Wes
        Moderator

          To create a Page Template, the first thing you would need to do is add the Template part right under the first <?php like this –

          <?php
          
          // Template Name: Portfolio

          Then you can add any other code you need under that.

          You can look at the other page templates in the theme to see what I’m referring to (page_portfolio, and page_landing.php)

          #9740
          scottpruett
          Customer

            Thanks Wes. I actually have a template name in it & it still doesn’t work – the template itself does, but I can’t get the dang post info to disappear. Here’s the full code in the template file, which is in the epik folder:

            <?php
            
            /* Template Name: Team Showcase */
            
            remove_action( 'genesis_entry_header', 'genesis_post_info', 5 );
            
            remove_action( 'genesis_before_post_content', 'genesis_post_info' );
            
            genesis(); 
            
            ?>

            The first action was recommended by a guy on the Studiopress forum: http://www.studiopress.com/forums/topic/custom-page-template-struggles/

            It’s still not doing the trick. I’m a little perplexed. Any other thoughts are welcome!

            Scott

            #9743
            Wes
            Moderator

              Try taking a look here – http://my.studiopress.com/snippets/ and make sure to use the code that is labeled for HTML5.

              There is also this – http://my.studiopress.com/tutorials/ but the snippets may be all that you need to figure out how to remove certain things.

              #9755
              scottpruett
              Customer

                Alrighty… turns out it works by adding the snippet in functions.php, not the custom page template.

                This affects the blog too, which isn’t ideal, but at least it fixes the problem for now.

                Thanks Wes.

                #9759
                scottpruett
                Customer

                  Update: editing the page template file works now. I’m not sure what happened, but relaunching the FTP client (Yummy FTP, mac) and the text editor (TextWrangler, which loads/edits/saves through Yummy FTP) seemed to fix the problem. I was editing function.php through the dashboard and thecustom page template through FTP.

                  #frustrating

                  #9761
                  Wes
                  Moderator

                    That’s weird, you should be able to add it in the Custom template, so whatever you’re needing to show or remove will only affect that particular page (rather than the functions file, which affects all pages). You can check out the portfolio template to see what I mean.

                  Viewing 8 posts - 1 through 8 (of 8 total)
                  • You must be logged in to reply to this topic.