mixing newsgirl and project thumbnails
-
Hey @arminunruh,
we are looking for a solution to combine NEWS and PROJECT THUMBNAILS in one grid (ordered by their publication date). Unfortunately it's not possible to combine them using the element gird (because you can't choose single NEWS).
Alternatively I´m looking for a code that mixes up the content of a news grid and a thumbnail grid (ordered by their publication date). I played around with some custom code using .append() to move the elements but I can't find the right parameter to sort them correctly.
Do you guys maybe have a solution for that problem?
Best, Daniel
-
ooh, lay theme doesnt support that sorry! :/
basically you want to put news post thumbnails into an elementgrid, and also put project thumbnails into an elementgrid?
so basically here, you want to have a +news button?
i would need to code that, but this solution wouldn't automatically make it sorted by date
-
@arminunruh Thanks for your reply. Having a +news button within the Element Grid would be a sweet alternative. Would that be easy for you to implement?
-
this would take some time, i added it to my todolist, but im not sure when i would have time for this
-
@arminunruh
thanks, I found a way to mix and reorganize both elements with a custom jQuery. Unfortunately when using "newpageshown" the script only fires after the page has rendered. So there is a short moment where the elements jump from one state to the other.Is there another way to make a custom code fire, before the page has rendered?
Thanks, Daniel
-
you can try the event 'newpage'
or the event 'before_content_replacement'not sure if it will work
maybe this
window.laytheme.on('before_content_replacement', function(){ setTimeout(function(){ console.log('hi') // your code here }, 0) })
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