30 thoughts on “Displaying the post metas on home page

  • Alex

    I’ve tried to to this, install the child theme.. and added some code to functions.php, however nothing works.. whatever I paste in functions.php seems like it doesent affect. What am I doing wrong? It only works if I enable metas trough customize

      • Giorgio25b

        Hey Alex,
        one more thing:
        This is the last version of the code I’m using… since this tread has become long and overwhelming

  • Giorgio Riccardi

    Hi Nik,
    following your suggestion on the forum (here) I’ve updated the snippet:

    Now, I know that this is a built in function of the new Customizr, but the problem is that if I select a different page to display my latest posts I don’t get the meta. No link or my site right now bec I’m working on a local server.

    • Nicolas Post author

      Hi Kris,
      Yes you should be able to manage these settings from Apperance > customizer in the latest version.
      Do you have the latests version installed ?

      Can you please verify that the Display posts metas option is checked in the customizer meta options ?
      Cheers

      • Giorgio Riccardi

        I checked and tested on 2 different test sites.: either custmizr latest version and customizr-pro latest vertsion!
        But maybe I did not make myself clear enough:
        when you have the home page selected for your latest post, all is fine, all the metas are there and also the categories.

        When another page is selected as blog page, the list is actually showing meta information but not categories. So this is what I was trying to say.

        Is this something that you wanted to happen or is an issue that has not been observed before? Shall we move this topic on the customizr-pro forum or on the support forum on wordpress?
        Thanks

        • Nicolas Post author

          Hi Georgio, thanks as usual for raising a interesting point!
          Let’s have a look at the latest code for post metas in TC_post_metas::tc_post_metas_controller.

          The post meta view is rendered if conditions defined in post metas controller are true. The default conditions to show the metas are the following (commented):

          What can we do then ?
          1) You can override the default with a filter on tc_show_post_metas returning a true value depending on the context,
          2) and / or adding your custom post type to the array of eligible post types.

          The second point will display metas for your custom post types in archive contexts for example.

          Here’s what I did for the code snippet section of this website :

          Note : those filters use anonymous functions introduced in php version >= 5.3

          Did this help ?
          Cheers

          • Giorgio Riccardi

            Thanks Nicholas,
            your snippet works great with CPT; I see that the metas are back again on the customizr snippet page.
            What I can’t make it working is this:
            Test site
            I’ve set this page as a default page for Posts and as you can see it does not show categories, though it shows partially metas information.

            Did you experienced anything like this before?
            Thanks

            • Nicolas Post author

              Hi Girogio,
              I am happy it helped.
              About your last issue, that’s hard to say whitout seeing your code. This can have various causes.
              Cheers

      • Giorgio Riccardi

        Actually I just noticed that also the categories and meta on the snippets list are gone:
        Customizr snippets

        Still wondering if there is a work around for the blog post page that is not the default home page

  • Anna

    hello Nicolas
    I set the home showing: no page or article
    because I like the clean home
    This poses a problem with Yoast that this setting does not allow you to enter the description of the home page to show in google search. In fact, the theme of the exhibition in a case like google content description.
    imposed if the home that shows: the latest articles in Yoast you can set the description of the home.

    I could use this option, but c’èun way to conceal the last post in home ???

    thanks
    Anna

  • Rezon

    Additional to above snippet. Display only date.

    • Rezon

      oops, wrond code above.

  • Kristina

    Hi!
    I think I just killed my website. 🙁

    I did exactly what you didn’t recommend, and tried to paste the code above in the functions.php-file (to get date/time for the posts to show on the home page). And now my whole site is now gone. I tried deleting the code to undo my mess, but it didn’t work. And now I can’t even access the admin panel.

    I have spent a few days making the site look nice with your theme and now I just want to know if I have done it all in vain. Is it lost forever? Can I even restart? Because I can’t login anymore. The browser window just goes white. Are all my posts gone?

    Please forgive me for being stupid! I hope you can help me!!
    /Kristina

      • Kristina

        Thank you for a super fast reply! I actually solved it on my own beofre I saw your answer. Using ftp I uploaded a clean functions.php-file and all is now well. 🙂

  • Rob

    I know how to set my blog as the frontpage, but i dont want it as such. The blog shows as a menu item.
    I’m afraid it’s just not possible… I hope you understand me well…

    Rob

  • Rob

    Argh… sorry sorry… posted the wrong links. This should work:

    In the give URL’s robbcoers should be robcoers

    Could you change that comment manually before publishing?

    • Nicolas Post author

      Hi Rob, in Customizr, you can set your blog page right from the customizer option panel under Front Page > Frontt Page displays.
      Hope this will help, and enjoy the theme!

  • Rob

    Hello Nicolas,
    I’m sorry to get back to this question, but maybe the following will clarify my question.

    For another site i am using the theme Fruitful. It’s a theme where i’ve set the home to show a slider and 3 featered pages. The page ‘Results’ page shows all blogposts from various categories.
    When you check the Settings > Reading you see that i can select what to show as HOME and select a page that shows all the blogposts.

    When i try to so the same with Customizr i dont get the same options on the settings page.

    Can you have another look?

    homepage
    Settings > Reading
    Results page with all posts

  • Rob

    Hi Nicolas,

    I saw that option, but its not what i want.
    Please go here: http://www.robcoers.nl/prezi
    and log in as: ##########

    The frontpage is fine like this, but the menuitem BLOG should present all blogposts. Now i can only show a category, as you can see.

    If anyone has an idea, a suggestion, please share.

    Rob

  • Rob

    Hi Nicolas,
    I can’t find how to post a new question, so i’m sorry to use it as a comment.

    I am using an frontpage with no blogposts. How do i make a menu item, that shows the blog, starting with the recents posts as normal.
    I have tried creating a custom menu, showing a certain category, but that is not exactly how i want it.

    Thanks and my compliments for the great works!
    Rob

    • Nicolas Post author

      Hi Rob,
      In the customizer options, open the Front Page accordion, then choose Front page displays : a static page.
      Then choose a page (that you’ve already created and named blog for example) for your posts.

      You can now use this page as an item in your menu.

      Thanks and I hope this will help!

Comments are closed.