Tagged: Custom Post Type, masonry, taxonomy
-
AuthorPosts
-
November 11, 2013 at 5:54 pm #186931
I want to use the masonry view for my custom post types, and want to create a specific template for it. can you send me the code of the masonry, so that i can implement it for use it in my custom loops?
(i dont want to custom code a seperate own masonry code, cause it could mess up the site then, and i want to use inbuilt codes of the enfold theme)
thanks
November 11, 2013 at 6:04 pm #186934Hey neotemplates!
You can look at and pull from the config-templatebuilder>avia-shortcodes>masonry_entries.php file but that fullwidth masonry element already supports custom post types by default from the advanced layout builder.
Cheers!
DevinNovember 11, 2013 at 6:07 pm #186936ok i wil check, thanks.
yes i know, but if i use it from the layout builder, than i can not put costum data in it like “event-date” or event time or so.. know what i mean?
November 11, 2013 at 6:13 pm #186938i checked, its a lot of code, can you help me what code i need to extract to put in my template file?
November 11, 2013 at 6:21 pm #186943If you aren’t able to pull the query from the class then your best bet would be to try using do_shortcode with the masonry shortcode that gets generated from the advanced layout builder.
You can see content with debug mode by adding the following to your functions.php:
//set builder mode to debug add_action('avia_builder_mode', "builder_set_debug"); function builder_set_debug() { return "debug"; }
The new field under the advanced layout builder will get populated with whatever content is created with the advanced layout editor and you can use that to fill out the shortcode.
November 11, 2013 at 6:25 pm #186948Hey!
There’s no general answer to this question and it depends on various things: the template you use, the way how the event data is saved in the database and if the data is compatible with the default wordpress functions, etc.
We can’t help you with such a modification and depending on your php/wordpress coding skills I recommend to contact a freelancer for this task (i.e. here http://www.microlancer.com/ or here http://kriesi.at/contact/customization ).
Best regards,
PeterNovember 11, 2013 at 8:16 pm #186972ok thanks…. how can i make the masonry showing up in columsn? now i only can make full width, but i need it definitely with a sidebar….??? and in a 3/4 column
November 12, 2013 at 8:49 am #187148ok thanks…. how can i make the masonry showing up in columsn? now i only can make full width, but i need it definitely with a sidebar….??? and in a 3/4 column
November 13, 2013 at 3:15 pm #187779Hi!
Right now Enfold does not support such a masonry layout. You can suggest this feature here: https://kriesi.at/support/topic/enfold-feature-requests/ and if more users request it we’ll add it with one of the next theme updates.
Regards,
PeterNovember 15, 2013 at 5:09 pm #189286Devin:
that fullwidth masonry element already supports custom post types by default from the advanced layout builderI don’t see a way to select a custom post type in the masonry element dialog. I’m running the latest Enfold. The first field gives me these options: Category, Post Tag, Post Format, Portfolio Entries. And incidentally, I’m creating a page and using the advanced layout editor to add this element.
Do I need to do something in code or in the theme options to give me CPTs in the selection options for masonry? And what if I want to do the same for the Blog Grid layout?
Thanks!
- This reply was modified 11 years ago by jrevillini. Reason: added quote to which I was reponding
November 15, 2013 at 5:34 pm #189305You need to create a taxonomy that is attached to the custom post type and have at least one item within the taxonomy.
November 15, 2013 at 5:55 pm #189330Aha! Now that I look at that selection, I do see that all the options are subsets of some taxonomy.
As I think about what it would take to develop this dialog/shortcode/query/display code for this element, I think I understand the programming decision to use taxonomies. It makes the logic for everything else simpler.
Maybe in future iterations, it could be made a little more flexible by allowing selection of either multiple post types or multiple taxonomies, or both, but I realize what an undertaking it would be to make the UI intuitive. Maybe it is best left as is.
I think adding some notes to the documentation that address this scenario specifically would eliminate some support requests. Here’s what I’d put in a callout box or something. Feel free to use:
NOTE: A masonry layout element displays posts for selected taxonomy terms. Custom post types must have associated taxonomies in order to be configured to display within this type of layout.
Thank again!
November 15, 2013 at 7:24 pm #189370I have a new set of docs just about ready to release but its been busy and just keeps getting more busy. The december lull in support we usually get will probably be when we launch the new FAQ and online docs.
Glad we could help for now though :)
-
AuthorPosts
- The topic ‘Masonry code for custom loops’ is closed to new replies.