1. PROMO Subscribe our All Access Pass @ 75% OFF & access all our 16+ premium Divi extensions: Divi Block Pro, Carousel Toolkit, etc.LEARN MORE
Dismiss Notice
NEW Divi.Help Pro Carousel AI Toolkit - Magically turn your Divi design into carousel, simply by using our online toolkit. No plugins needed. Now it works with Divi 5 as well!Try our carousel AI toolkit
BEST Divi Block - A revolutionary drag & drop tool to easily mix & match 960+ premade blocks (Light & Dark) to kick start your Divi site design. Special module designs are included as well. Also newly added AI generator & color. Now it works with Divi 5 as well!
Learn More About Divi BlockFree Version ~ 340+ Free Blocks

Display Custom Field Date (for Event) Instead of Date Posted

Discussion in 'Basic Support Forum' started by Don Johnson, Nov 7, 2018.

  1. Don Johnson

    Don Johnson Member
    Pro Member (Support Expired)

    Ok, this is likely something that will require customization, but I wanted to ask. I am using Divi Ultimate on an Event Site. And the Blog Posts are about Events of different categories. I was wondering if I created a Custom Field with the Event's Date could that be displayed in the Blog Modules instead of the Date the Blog was Posted?
     
    1. PRO MEMBER PERKS Custom Color Scheme + Premade Layouts - A perfect combination to boost productivity:Try Now
  2. Divi.Help Pro Support

    Divi.Help Pro Support Administrator
    Staff Member

    Custom coding is required for that. Easiest way is to find a plugin with a custom module that do that.

    If you wish to do it by custom coding, I can roughly point you to a right direction: The code below is the one that render Divi post meta. Do note that if you change it, it will affect the post meta globally. You just need to post the code in your child theme functions.php & tweak it to show your custom field. That's all I can say. Can't advice you much further, as this is not related to our child theme.

    Code:
    Log In or Sign Up to view this code.
     
  3. Don Johnson

    Don Johnson Member
    Pro Member (Support Expired)

    Thanks. I added the Advanced Custom Fields Pro plugin to make it easier and it generated the following


    Code:
    Log In or Sign Up to view this code.
    Now I just have to piece it all together.
     
    1. PRO MEMBER PERKS Divi Ultimate Header Plugin - Add custom vertical navigation for your Divi site. Turns into slide in menu on mobile:Learn More
  4. Don Johnson

    Don Johnson Member
    Pro Member (Support Expired)

    Trying a different angle. I am trying to add the Events Calendar Event Posts to the Blog Loop.

    However, every time I add the following code to functions.php it breaks the site.


    Code:
    Log In or Sign Up to view this code.
    Any advice?
     
  5. Divi.Help Pro Support

    Divi.Help Pro Support Administrator
    Staff Member

    Not sure what that code do, but you have 2 extra closing brackets at the bottom. You should remove those 2 closing bracket.
     
    1. PRO MEMBER PERKS Divi Ultimate Archive Plugin - Replace the default archive "Older Entries" with beautiful pagination:Learn More
  6. Don Johnson

    Don Johnson Member
    Pro Member (Support Expired)

    Yes I finally figured that out, thanks.

    The purpose of the code is supposed to create a category so that events from The Event Calendar can be added to the Blog Loop. I removed the closing brackets, but the code didn't do anything that I can tell.

    At this point I think the easiest way to do what I want to do is to find a way for the Events to be Shown in the Blog Module along side the blog posts. That code was supposed to do that, but did not.

    So let me ask a different question. Do you know of a way to get the Event Posts to show up in the Blog Module for Divi Ultimate?
     
  7. Divi.Help Pro Support

    Divi.Help Pro Support Administrator
    Staff Member

    Sorry to say that we don't know how to do that as well. Your best bet is to find a custom Divi module plugin that works with CPT. You may try to ask it in Divi Facebook group for recommendation.
     
    1. PRO MEMBER PERKS Divi Ultimate Blog Plugin - Easily set awesome default design for your Divi single blog page:Learn More
  8. Don Johnson

    Don Johnson Member
    Pro Member (Support Expired)

    Thanks for the advice. I found a CPT Plugin that displays CPT in Blog Module and I was able to use the CSS Classes to make everything match up.

    I really appreciate your help, and despite all my questions I love this theme.

    I do have one more question. The Events Calendar Events are considered Custom Post Types, and they have the identifier 'tribe_events'.

    What would it take to apply the Blog Post Styling that I have for normal posts onto the Events Calendar CPT's? Mainly I just want to copy the Blog Post Header settings with the Large Header Image from Featured Image and the Meta.
     
  9. Divi.Help Pro Support

    Divi.Help Pro Support Administrator
    Staff Member

    You will need to create a custom single php for the event post type. Below is the HTML code for the blog header. Plus, you still need to add CSS class free-du-blog-1 to the main-content DIV: <div id="main-content" class="free-du-blog-1">
    Code:
    Log In or Sign Up to view this code.
     
    1. PRO MEMBER PERKS Divi Block Pro - Premade gradient text design for your Divi site without using any plugins:View Demo