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?
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 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Exclude snippets from individual posts’ is closed to new replies.