Hi GDF,
the only way to change the order is to set Optin Forms’ priority to a lower number. Right now, it’s set at the default 10, which means that the ET galleries are probably set at a lower number.
To change this, open the following file /wp-content/plugins/optin-forms/includes/functions-forms.php
Find on line 144:
add_filter( "the_content", "optinforms_insert_form_after_post" );
Change to:
add_filter( "the_content", "optinforms_insert_form_after_post", 999 );
Save file and re-upload.
Let me know if this fixed your issue! π
Boris, thanks for you help but it didnt work…
any other idea?
Is there a way I could check which is the priority of the ET gallery?
Thanks in advanced.
How is the gallery added to the page?
Is it by including a shortcode in the editor, or is it a custom field? Is the custom field included in the template file (probably single-gallery.php or something like that).
Let me know.
Boris,
As I dont know too much I will try to explain what I’ve seen.
I set up a PAGE in wordpress, and define teh page with a BLOG TEMPLATE.
When I edit the page, I can type some introductory text.
Then the optin for is display & then the blog posts are displayed.
This is the same behaviour as if I define the page with a GALLERY TEMPLATE.
As you said, I hape 2 php files that correspond to te BLOG TEMPLATE & another one to the GALLERY TEMPLATE.
In the php files, I arrive to a part where is a div class POSTCONTENT and inside thre is:
-MY TEXT I enter in the Page as introduction
-then the div optinform5 container
-then the et-pt-blog (that correspond to the Post I created & appear in the blog page…
so from what I understand, there should be a way to switch the order between the optin form & the blog posts/ gallery pictures?
Thanks!
Hi GDF,
from what you have described, it sounds that there are two components to your posts and pages:
- the introduction text
- the content
Optin Forms is hooking itself to the post content. Which means that if you select the form to be displayed AFTER the post content, it will do just that: append itself AFTER the post content.
Since your form appears after the introduction text, the only logical explanation is that the introduction text is the content, and the content which comes after the optin form is something like a custom field.
Another question.
Have you tried disabling the automatic placement in Optin Forms (selecting Don’t display on posts and custom post types) and going straight to the post itself and adding the shortcode [optinform] after the gallery (the et-pt-blog section)?
Let me know!
Boris,
if I disable the placement and add the [optinform] in the page its the same results. The optin form is below the text and before the gallery.
now if I want to edit the gallery page.php… how can I include it?
Because I tried to type only [optinform] and that same text is displayed…
at least the text is displayed after the gallery π so seems that the place is the good one.
I imagine I need to add some additional code to the line?
<?php [optinform] /> ????
Just guessing
Thanks!
Hi GDF,
this would be the correct code:
<?php if(function_exists('optinforms_create_form')) { echo optinforms_create_form(); } ?>
Let me know if you were able to fix it!
Yes!!!!
That worked!
thank you very much Boris!
Glad it worked, you’re welcome π