Tagged: 

Viewing 5 reply threads
  • Author
    Posts
    • #4362
      bows3r
      Member

      Hello,

      I have a problem. I want to display metaboxes on page edit on a certain template only. Let’s say that I have a template called page-templates/front-page.php. Then I have a piklist metabox that works fine with this code:

      /*
      Title: Front Page Info Boxes:
      Description: The four info boxes in the front page
      Post Type: page
      Order: 2
      */

      But when I try this it won’t display the metaboxes:
      /*
      Title: Front Page Info Boxes:
      Description: The four info boxes in the front page
      Post Type: page
      Template: page-templates/front-page
      Order: 2
      */

      The page I’m editing has been assigned to use front-page template and it is saved.
      This is what the page edit looks like (other metabox is not using the “Template: page-templates/front-page tag”

      Why isn’t it working?

      Yours,

      Mika

      Attachments:
      You must be logged in to view attached files.
    • #4364
      Steve
      Keymaster

      @bows3r– Welcome to the Piklist community!

      Is the file front-page.php located in the folder page-templates?

      If not then it should look like this:
      Template: front-page

      Let us know if that fixes the problem.

    • #4366
      bows3r
      Member

      Yes, the file is on page-templates folder.

    • #4367
      Steve
      Keymaster

      Can you zip up your theme and email to [email protected]? We can help you faster if we have access to your code.

    • #4368
      bows3r
      Member

      Sent you the theme zipped.

    • #4375
      Steve
      Keymaster

      Resolving this issue after discussing with you.

      Your code works if you remove the folder: Template: front-page, HOWEVER, this is really a bug. In the next version of Piklist your original code will work: Template: page-templates/front-page

Viewing 5 reply threads
  • The topic ‘Meta-boxes for template’ is closed to new replies.