-
eluyawi
Now, I know what you means.
I want the block Elementos appear here (where is the arrow in the screenshot). (It would be the last block before to start te footer)
-
David
OK,
In the element list you can use either:
after_main_content
orbefore_footer
-
eluyawi
Ok,
I have used “
after_main_content
” in both Elements with the same priority. Yo can take a look to the screenshot.https://share.zight.com/GGuBD8l4
https://share.zight.com/wbux2rzxWill these elements change depending on the parameters defined in the snippet I have created?
add_filter( ‘generate_element_display’, function( $display, $element_id ) { if (function_exists(‘rcp_count_memberships’)) { $total_suscriptores = rcp_count_memberships(array(‘status’ => ‘active’)); $total_suscriptores = 101; //101 if($total_suscriptores <= 100 && 3474 === $element_id){ $display=false; }elseif( $total_suscriptores > 100 && 3492 === $element_id) { $display=false; }//fin_else } return $display; }, 10, 2 );
-
David
Yes, that Snippet should now work.
Have you tried adding it ? -
eluyawi
Yes, but for example when I change the parameter “total_suscriptores” to “0” or “101”, a lot of times Doesn’t show the block at the moment, Could it be the server cache? or what do you think it could be.
-
David
It could be a caching issue.
Does the problem go away if you disable all caching ? -
eluyawi
Exactly.
I have deactivated the LiteSpeed Cache plugin and the change are made immediately.
Any suggest or idea? -
David
You will need to ask LiteSpeed support on how to eliminate that as I have no idea how their page caching works.
- You must be logged in to reply to this topic.