0
Welcome Guest! Login
0 items Join Now

SOLVED No metadata with CPT and single-CPT.php

  • SOLVED No metadata with CPT and single-CPT.php

    Posted 12 years 2 weeks ago
    • Hello

      I have custom post type and wordpress built-in posst

      - post from wp --> assigned with an override (example1)
      - custompost type --> assigned with another override (example2)

      the two of them call single.php, works fine.
      but my single.php 's going a little mess, that's why I create a second single.php for my custom post type
      --> single-example2.php

      the post are well dispatched but with the custom type, all the settings choosen (post view) from the override (example2) like :
      Post category ---> On
      Author MetaData --> On
      etc

      aren't shown up (the single-example2.php is a copy on the original single.php without any modification)

      Don't understand ;-), if someone have tips !!


      Thanks for reading me

      Dimitri
    • Last Edit: 12 years 1 week ago by dimitrilongo.
    • Shazdeh's Avatar
    • Shazdeh
    • Elite Rocketeer
    • Posts: 4984
    • Thanks: 29

    Re: SOLVED No metadata with CPT and single-CPT.php

    Posted 12 years 2 weeks ago
    • Hi,
      please PM me login details for the admin area so I can take a look at your setup.
    • Please don't PM unless requested ;)
      Consider using the custom stylesheet for all your CSS customizations: gantry-framework.org/documentation/wordp...custom_stylesheet.md .
      Please provide the URL to the issue.
      And please mark the thread as solved if the issue is resolved.
  • Re: SOLVED No metadata with CPT and single-CPT.php

    Posted 12 years 2 weeks ago
    • thanks Shazdeh :)

      it works, i dit a reinstall, no problem at all

      But now i'm trying to do the same with archive.php

      i copy archive.php to archive-example2.php (example2 = CPT name)

      and made an override with for instance author page and category archive page in the assignment

      but not working, still on archive.php

      there s something different to do compared to single-cpt.php ?

      Best regards

      Dimitri
    • Shazdeh's Avatar
    • Shazdeh
    • Elite Rocketeer
    • Posts: 4984
    • Thanks: 29

    Re: SOLVED No metadata with CPT and single-CPT.php

    Posted 12 years 2 weeks ago
    • Hi,
      the syntax is "archive-{CPT}.php" (for example archive-movies.php) so for the custom post type this would load instead of the default archive.php file. Please make sure the file name is correct and it matches the ID of the registered custom post type.
    • Please don't PM unless requested ;)
      Consider using the custom stylesheet for all your CSS customizations: gantry-framework.org/documentation/wordp...custom_stylesheet.md .
      Please provide the URL to the issue.
      And please mark the thread as solved if the issue is resolved.
  • Re: SOLVED No metadata with CPT and single-CPT.php

    Posted 12 years 1 week ago
    • Shazdeh wrote:
      Hi,
      the syntax is "archive-{CPT}.php" (for example archive-movies.php) so for the custom post type this would load instead of the default archive.php file. Please make sure the file name is correct and it matches the ID of the registered custom post type.

      hi

      thanks a lot, was a syntax error, works fine now, but I have another issue, i open a new thread

Time to create page: 0.071 seconds