Archived topic
adding widget area to 3rd paragraph in the single page
51 replies · Started by Patricia on November 18, 2022
Hi Patricia,
I tested the code here from my end: https://generatepress.com/forums/topic/adding-widget-area-to-3rd-paragraph-in-the-single-page/page/3/#post-2439298, and it's working as expected.
To clarify, can you check if the Display rule location and the Hook are set up properly? Example: https://share.getcloudapp.com/WnuZKO8O
If it is, can you try temporarily disabling all other PHP snippets to test?
Let us know how it goes.
HI guys sorry for the delay, I was dealing with security issues...I will test again and will get back to you thank you!
o
Did you get round to testing ?
Hi David Sorry for the delay!
I did another test and it didnt work...I guess it should be better to get code snippet plugin. that could do that for me. I installed WP code plugin which can place things like that between paragraphs but I don't really like how it does not work very well with generateblocks..do you have a suggestion of another plugin similar that will work in conjunction with generateblocks? thanks
HI guys, I'd like to say that this is working now. the problem was that in this line
return prefix_insert_after_paragraph( $inserted_hook, 7, $content );
Where there is 7, it was placing the box right after the box from the 3rd paragraph for some reason. I just had to change as the example below and the content was placed in the right place.
return prefix_insert_after_paragraph( $inserted_hook, 10, $content );
Thank you all :)
I wonder if the content in the 3rd paragraph hook wast getting counted in the 7th paragraph hook :)
Awesome - glad to hear it is now working.
