Use hooks one time
-
Hi Tom, I like use hook, but want appear only one time, for exp.
in the home I have 3 entries, and appear 3 times, I just like use the hook in the first entry.add_action( ‘generate_after_entry_content’,’example_function_name’ );
function example_function_name() {
if( ! is_single()) {
?>
<p>My content once time appear</p>
<?php
}
}I find one good plugin for generatepress and hooks you can share:
https://es.www.ads-software.com/plugins/hooks-visualizer/
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Use hooks one time’ is closed to new replies.