Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #429529

    Hi guys,

    I hope you can assist me with this. I’m developing an e-learning courses platform, and it makes use of custom post types.

    However it seems like Enfold is treating these custom posts, ie my courses, quizzes and modules the same way it treats blog posts in that it’s including the post meta info (author and category etc) and all the social sharing buttons and comments that come with the blog posts.

    How do I stop the theme from including all these unecessary elements?

    Courses for example can’t have sharing buttons because they’re behind a pay wall.

    Thank you.

    Brendon

    #430238

    Hi inMotionGraphics!

    you can hide post meta info using this code:

    .post-meta-infos {
    display: none;
    }
    

    To hide social share:

    .av-share-box {
    display: none;
    }
    

    Regards,
    Andy

    #430273

    Hi Andy,

    Thanks for getting back to me.

    However the code you provided is CSS code, and will hide it accross the entire site, including the blog.

    What I actually meant is how to stop the custom posts template from including all this info in the first place. We also don’t want the entire weight of the social sharing code to be loaded throughout our courses system, so just hiding it visually isn’t going to be an optimal solution.

    Something in the theme is causing the custom posts to be treated like blog posts, which is what we need to change.

    Thank you.

    Brendon

    #430822

    Hi!

    Add the custom post type’s class selector:

    .single-sfwd-courses .post-meta-infos {
    display: none;
    }

    Regards,
    Ismael

    #431173

    Hi Ismael,

    Thank you for your reply.

    Unfortunately this is still the exact same solution as Andy’s. Hiding the elements via CSS doesn’t address the issue we are having. The entire course system (custom posts) is still being treated like part of the blog, which is not correct. Another issue I didn’t mention is that throughout our courses system, the heading sections has the name of our blog in it: “The Real Estate Agent Blog”. This makes no sense and should rather say something like the title of our courses page or contain the current page title.

    I don’t want to just hide these elements via CSS, because it means they still have to be loaded, which adds unnecessary overhead to our entire courses platform. The shouldn’t be there at all if you know what I mean. As per my original question, how do I stop these custom post types from being treated like blog posts? Or how do I edit the custom posts template to not include all these elements we don’t need?

    I hope this makes more sense now.

    Thank you.

    Brendon

    #432404

    Hi Brendon!

    You’d need to create a single-courses.php template file so you can have full control over the structure of the single view of a Course, you can use the contents of Enfold single.php as a model.

    Cheers!
    Josue

    #433188

    Hi Josue,

    This worked out perfectly! Thank you very much for the tip.

    Brendon

    #433214

    You are welcome Brendon, glad to help :)

    Regards,
    Josue

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