Site logo

Archived topic

Auto Refresh Page

3 replies · Started by Alberto on July 9, 2020

Viewing posts 1–4 of 4

Hi everybody.
My intent is to set a page reload on a site.
I found that code:

<?php

if(is_page( PageID ))

{

echo ‘<META HTTP-EQUIV=”REFRESH” CONTENT=”23″>’ ;

}

?>

I tried to create a hook element, set HEADER in the hook, flagged PHP and set the page where to execute.
But the page appears "empty".
where I'm wrong?

Thanks in advance.

Hi there,

Are you using a Hook Element:

https://docs.generatepress.com/article/hooks-element-overview/

If so you only need to add what you want to ouput in the Hook element eg.

<META HTTP-EQUIV="REFRESH" CONTENT="23">

Then select WP_Head from the Hook list.
Then set your display rules for the post you want it on.

Great!
Once understood the way... it's pretty simple.

Many thanks David!

Case closed!

Glad to be of help.

This archived topic is closed to new replies.