Exclude snippets from individual posts
-
Hello,
I have created snippets to supplement my posts with certain information. Is it possible to disable these snippets for individual posts in the Generate Press theme? Is there a code for this?
The code looks like this:
add_action('generate_after_entry_title', function(){ if(is_single()){ // Nur in Beitr?gen zu sehen echo do_shortcode('Anzeige/Werbung'); } }); add_action('generate_after_entry_title', function(){ if(is_front_page()){ // Nur auf übersichtsseiten zu sehen echo do_shortcode('Anzeige/Werbung'); } }); add_action('generate_after_entry_title', function(){ if(is_category()){ // Nur auf Kategorieseiten echo do_shortcode('Anzeige/Werbung'); } }); add_action('generate_after_entry_title', function(){ if(is_search()){ // Nur auf Suchseite (Seiten über Editor ausgeschlossen) echo do_shortcode('Anzeige/Werbung'); } });
I would simply like to exclude individual targeted contributions.
Thx in advance.
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘Exclude snippets from individual posts’ is closed to new replies.