1. Custom ACF field in accordion:
I want an image of a little arrow (wich must only be visible if ACF-field checkbox 'aanvullende_informatie_toevoegen' is checked on the backend) to be clicked and then ACF-field 'aanvullende_tekst' (https://ibb.co/r5dRbCs) has to fold out.
I tried different ways, but: - It seems the plugin doesn't support an 'OnCLick' function within an <A> of <DIV> (item layout). - I had a solution without using OnClick. I pasted this JS Code in both Custom JS Fields (the one of the Layout's custom code and the Grid's custom code), but no succes:
JS:
var show = function (elem) {
elem.style.display = 'block';
};
var hide = function (elem) {
elem.style.display = 'none';
};
var toggle = function (elem) {
// If the element is visible, hide it
if (window.getComputedStyle(elem).display === 'block') {
hide(elem);
return;
}
// Otherwise, show it
show(elem);
};
// Listen for click events
document.addEventListener('click', function (event) {
// Make sure clicked element is our toggle
if (!event.target.classList.contains('toggle')) return;
// Prevent default link behavior
event.preventDefault();
// Get the content
var content = document.querySelector(event.target.hash);
if (!content) return;
// Toggle the content
toggle(content);
}, false);
And I made an HTML element and pasted this code in it:
<a class="toggle" href="#example">Toggle Div</a>
<div id="example" class="toggle-content">Here's some text we want to toggle visibility of. Let's do it!</div>
These are the items right now:
https://ibb.co/zbhhY5s
https://ibb.co/nk8yqnq (all items expanded) ACF Fields: https://ibb.co/m5YsHzy\ Link to page: https://www.clap.nl/abc/ Is there a way to fix this?
2. Change position filter field "Alles":
I want to change the position of the "Alles"-button (https://ibb.co/c8sLCmv), but none of the DIV's have a CLASS or ID. I want the position of the "Alles"-button (Dutch for 'All') at the end of the alphabet (check screenshot) Beneath the "Alles"-button (reset) I made the filters myself using the custom filter option of the plugin (https://ibb.co/NKjQPFW) How to fix this?
..And one bug: When I tried to accomplish an accordion for the ACF text-field (1), I did paste JS-code in the custom JS code field (within the layout options). That gave no problem. But when (since I am no programmer) I pasted another piece of code and saved it, I couldn't get back to the custom code section. The page was entirely grey!! (https://ibb.co/Q6TLdBd)
The best option I had was to deactivate an re-activate the Post Grid Pro Plugin. When I did, almost all of my lay-out items where gone and I needed 3 hours to rebuild everything! Not a pleasant work haha. Maybe you can try to recreate the problem (to solve it) by pasting 2 of the same pieces of code beneath each other in the Custom JS Code (within the layout options).