Perfect…. That will work a treat. Not sure why I didn’t think of that.
Thanks @elliot, you da man!
@Cloud9 … sorry to be a pest, but I was wondering how I can limit the search of my flexible content content to only search certain flexible content items?
eg: If my flexible content items include a text box, a gallery, a banner layout, etc… how can I limit the searching to ONLY look at the text in the Text Box modules?
As I have relevanssi set to search all “visible”, it is seeing every custom field I have on the page, most of which should not be searchable.
Hop this makes sense. It’s all a bit above my coding level.
Appreciate your help mate, Sam.
Never mind… missed the setting for Custom Indexing. Set it to ‘visible’ and is working a treat.
Thanks for the code Cloud9 🙂
I have installed Relevanssi but I am still not getting any results for pages that use my Flexible layout that I have templated.
eg: add a text area as a flexible content item, displays fine, but when searching for words in the text area, nothing shows up.
Is there a setting in Relevanssi that I am missing?
It is the first time I have used the Relevanssi plugin.
Thanks, Sam
Hi Elliot, I have all my layouts working fine and use the get_row_layout()
to retrieve the corresponding layout file with no dramas.
What I am after is a unique identifier for each layout module.
For example, if I have two Gallery modules on the same flexible content area, I assume each one has a different ID of some kind so that the images from Gallery A are not mixed with images from Gallery B.
So when looping over the modules, is there an ID associated with each module added in the back end?
something like this….
if( get_row_layout() == 'paragraph' ):
key_id = ??????
the_sub_field('text');
elseif( get_row_layout() == 'download' ):
key_id = ??????
$file = get_sub_field('file');
endif;
Hence, each Paragraph added to the page with have unique KEY for it.
I hope I am making sense and not missing something that is easy 🙂
Thanks, Sam
Oops… just fond this post. Same issue as my post. Sorry for the double up.
Just updated to 1.2.0 and same issue…
Advanced Custom Fields: Options Page
You have version 1.2.0 installed. Update to 1.2.0. View version 1.2.0 details.
Compatibility with WordPress 3.5.2: Unknown
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.