-
AuthorPosts
-
May 10, 2022 at 7:26 pm #1351265
Hi,
Like in my other threads already told i added a CPT: “Classes”
I created a page called “Classes” with a masonry.
This is the place where customers can get an overview about the classes we offer.
So far, so good.When a user cklicks on one of the classes he sees the usual (images, text, booking form)
What he should also see is:
A preview/announcement of the other courses – a little bit like “What else do we offer”.
Now i checked the options of Enfold and i find dozens of ways to do this if i had posts – but i dont see even one way to do it with pages.
Remember: I use CPT that has the same capabilities like your portfolio-CPT.So how can i either….
– create a sidebar that shows something like “latest posts” – just with my CPT
– create some content-Element that does something similar?Expected amount:
All in all we are talking about 20 classes, divided in about 5 or 6 categories.What could be a possible way to get that done with Enfold?
kind regards
EviMay 12, 2022 at 7:32 am #1351479Hey InSilentio,
Thank you for the inquiry.
You may need to use a plugin to display related posts from a certain custom post type. Please check the link below.
// https://wordpress.org/plugins/custom-post-type-widgets/
You may also find this plugin useful.
// https://wordpress.org/plugins/widget-options/
Best regards,
IsmaelJuly 8, 2022 at 1:54 pm #1357708Hi,
there is a widget called “Enfold latest Portfolio”.
“Portfolio” is a custom post type.
So there must be a simple way to either change the code somewehere so that this widget shows “classes” instead of “portfolio” or duplicate the widget.
Please tell me at least where i find the code that is responsible for echoing the “latest portfolio elements”or, better, the code for the functions.php that adds a widget “showing latest classes”.ADD:
How do i give the CPT called “classes” the same capabilities as “portfolio”?
Specially: Ajax-functionalitythanks
elviraIMPORTANT
There is also a breadcrumb issue.
The breadcrumb for the post from the CPT “classes” should be like this:
Home–>classes–> name of the lecture
But it only shows:
Home–>name of the lectureI guess there needs to be some lines for the functions.php like there is for the well known “double breadcrumb”-issue.
The issue is not about the CPT-Settings – they are correct:
name: kurs
label: Kurse
singular_label: Kurs
description: Unsere Kurse
public: true
publicly_queryable: true
show_ui: true
show_in_nav_menus: true
delete_with_user: false
show_in_rest: false
rest_base: “”
rest_controller_class: “”
has_archive: false
has_archive_string: “”
exclude_from_search: false
capability_type: post
hierarchical: true
can_export: false
rewrite: true
rewrite_slug: kurs-workshop
rewrite_withfront: true
query_var: true
query_var_slug: “”
menu_position: “”
show_in_menu: true
show_in_menu_string: “”
menu_icon: “”
custom_supports: “”
enter_title_here: “”- This reply was modified 2 years, 5 months ago by InSilentio. Reason: added something
- This reply was modified 2 years, 5 months ago by InSilentio. Reason: added something
July 10, 2022 at 8:34 pm #1357891Hi,
The code for the widget called “Enfold latest Portfolio” is at:
\enfold\framework\php\widgets\widget-classes\class-avia-portfoliobox.php
I’m not sure if there are any dependencies that would also need to be adjusted to change this to your CPT.
Please note that files in the \framework\php\ directory can not be included in a child theme, so any changes you make will need to be done for each theme update.Best regards,
Mike -
AuthorPosts
- You must be logged in to reply to this topic.