In reference to the flexiable content field:
What I need to happen is basically output the HTML/content of a layout using a plugin within a custom template of the active theme.
So the code below will be in a custom template file in the active theme.
Looking at this simple example loop:
// loop through the rows of data
while ( have_rows('flexible_content_field_name') ) : the_row();
//is there a some hook i can attach to in here that the plugin can get invoked based on either the_row, get_row_layout etc or anything else where i can get in this loop match the layout name and output the relevant html ?
I am trying to avoid using shortcodes with do_shortcode() based on the layout name/plugin name match, so if there is another way that would be great.
There are no filters/actions or hooks that fire here.
You would need to
- use a shortcode as you describe
- Call a function
- Create your own action/filter hook
Edit: What you are asking for would be the equivalent of a WP hook that you could use here
// there is not WP hook that fires here
Thanks for the reply. I think a action/filter hook inside the loop might not be a bad idea. I tested the process out and it worked great.
You can close this query.