Link project/categories for a better storage ? Help !!!
-
Hy again.
I need a confirm. There is something I 'm not sure to understand.
I'm going to make a front page will all my projects page.
But sometimes a project is in many categories, sometimes a project is in two or three categories...Then, here is my problem.
I wanted to make a menu with "Projects" and when you click on it : you'll have like this example (this is why i want) : https://demo.kaliumtheme.com/architecture/our-projects/#exterior
all projects with "categories". You can clik on a category and you will have one or two or... projects.Because, if I have not that, I have to put a project three times (three differents categories) on my website.
Am I Wrong ? (please tell me i'm wrong cause it's lot of taff and heavy for the website...)
There is maybe another solution (plugin, code css or html...... I'll take iiiit) but i don't see it right now. And I really hope cause I love Lay theme.
Thank you a lot for your help and response.
-
Dear @Helena
Unfortunately at this time, it cannot be easily done in the way the example presents.
However Lay Theme does provide you the ability to add Custom Code for purposes like this.
This could be achieved through some simple CSS & Javascript.
The way i would approach it:
-
Create a page with all categories shown
-
Create a custom Menu within the Gridder ( no Links, just text - or intentionally turn off the the current menu's ability to link to other pages).
-
Use Custom CSS to have all categories not shown - 'display:none'
-
Use jQuery to say: ' If ' you click on this Menu Link - ' then' these projects get the Class or Id added: 'active' or 'Show'
-
Add Custom CSS that relates to this new class or Id - 'active' or 'show'
-
'active' gets 'display:block' for example
This means that when you click on one of your menu items, only the projects that relate to that Category get the class 'active' and therefore are shown to the viewer.
If you dont wish to add the categories to the jQuery manually you could use the 'data-title' information already there:
Say: If the Menu item matches the 'data-title' Then add the class or ID 'active'
You will need to remove the class 'active' from the past/current shown projects when clicking a new menu point. This way they wont all be shown after a few menu choices.
https://laytheme.com/documentation.html#custom-javascript
https://laytheme.com/documentation.html#custom-css-styling
I apologise Helena that i am unable to help you in a more detailed Tutorial, but dont give up as there is so much information online with these topics, Google is your best Friend :)
You may wish to seek the Aid of a developer if this suits you, or seek the advice of the many lovely people on this forum.
Let me know if i can be of more help in this capacity and i will do my best!Hope you have a wonderful day and best wishes.
Richard
-
Before you post:
- When using a WordPress Cache plugin, disable it or clear your cache.
- Update Lay Theme and all Lay Theme Addons
- Disable all Plugins
- Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"
This often solves issues you might run into
When you post:
- Post a link to where the problem is
- Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
- If the problem is difficult to explain, post screenshots / link to a video to explain it