Disappeared overlay

Hello!

I used to have an overlay page that was appearing after clicking the logo of my website on the top left corner. Since one of the last updates it just stopped working… can you help me to recover it?

Thank you very much!!

Carlos

Hello Carlos,

Thanks for writing in! I have looked for any JS code that may add an overlay page. I could find any. There is also no plugin that adds the overlay page. Did you remove any plugin or any JS code? If you have added the overlay through your child theme’s modifications, please check out your code in the child theme instead.

Best Regards.

Hello Ruenel,

Thanks for you support! I had it developed through Theme Co, some years ago and unfortunately I have no idea how he made it… I think he used magnific popup but I am not sure what he did…! What was important for me was that I was able to edit the information in the pop up going to Pages / Popup content and editing that page with the Pro editor.

Screenshot 2021-03-19 at 10.30.37|690x304, 75%

Best!

Hello @carlosrodrigueztorre,

The issue occurred because you are using the legacy child theme. Here is what you need to do:
1.) In your child theme, create the following folder paths:

  • framework/legacy/cranium/headers/views/integrity/
  • framework/legacy/cranium/footers/views/integrity/

2.) Relocate the following files:

  • framework/views/integrity/wp-header.php move this one to framework/legacy/cranium/headers/views/integrity/wp-header.php
  • framework/views/integrity/wp-footer.php move this one to framework/legacy/cranium/footers/views/integrity/wp-footer.php

Kindly let us know how it goes.

Hello @ruenel!

Thank you, I tried your suggestion but nothing has changed…

Hello @carlosrodrigueztorre,

After further investigation, I’ve looked into the codes you have added in the wp-header.php file. As it turns out, it is not showing because of the given condition in your code:

	<?php if( !is_page() ) : ?>
	
	<div id="the-popup" class="white-popup mfp-hide">
		
		<div class="logo-in-popup"></div>
		
		<?php
			
			$args = array(
				//'name'           => 'sample-page',
				'name'           => 'popup-content',
				'post_type'      => 'page',
				'posts_per_page' => 1
			);
			
			$pages = get_posts( $args );
			
			if( $pages )
			{
				//echo $pages[0]->post_content;
				echo do_shortcode($pages[0]->post_content);
			}
		?>
		
	</div>
	
	<a href="#the-popup" class="popup-opener" style="display:none">Show inline popup</a>
	<?php endif; ?>

I have commented out the IF statement in your code and the overlay is now displaying.

Please check your site now.

Hey @Ruenel!

Thank you very much for your support, we are getting closer :slight_smile:
Now it appears but it does not show any information, the overlay should show a transparent grey layer covering the whole screen with the information from the page Popup content. Now it just show a grey overlay in the bottom of the screen. I tried to check the CSS but could no change much and it does not display the information from the page…
Maybe there is some better way to achieve what I want and we are trying to fix something that will break again in he next update? if it so and you know a better way please let me know.

Thanks!

Hi Carlos,

The condition mentioned by my colleague in his post actually implements the clause to show the popup except the page, whereas the Home Page or Landing Page are the page by nature. I have checked your blog page which does not come into this clause, and it shows the popup without content for now. If you want this popup to be shown on every page of your website, please remove the clause in header.

Hope it helps.
Thanks

Hello @tristup!

Thanks for you reply, To be honest I don’t really understand what you mean… The pop up was working independent of the page you where at.

Thanks!

Hi Carlos,

Sorry for the confusion, previously the popup was not appearing in the Home Page. Now I have checked and found the popup is coming in Home Page too.

Thanks

Hello @tristup !

Yes, its coming but not displaying correctly neither displaying the information… Could you help me here?-

Thank you!
Greeings

Hi Carlos,

I have tried to print a Test value through your code and it works, it seems that the issue is with the Content* you are trying to print or it is not able to parse the shortcode within the content.
I have commented out with the test code for your information.

Hope it helps.
Thanks

Thanks again! Before it was displaying the content from the page: “Popup content”, but then one day after one updated it stop working… How can I fix that?

Greetings!

Hi Carlos,

Can you please copy your live site to a staging server so we could troubleshoot freely without breaking your live site?
And give us access in the secure note including:

– WordPress Site URL & Login URL
– WordPress Admin username/password

To create a secure note, click the key icon underneath any of your posts.

Thanks

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.