Setting the page title in a plugin, but not outside my plugin

1) I think I solved it: check if the content contains my shortcode: a) So set up in my top (outer) plugin file with: add_filter( ‘pre_get_document_title’, ‘dwnz_filter_pagetitle’, 20 ); b) plus later on in same file: function dwnz_filter_pagetitle ($title) { // get_post even works in my case when I am expecting a page, not a … Read more

Create different flavours of excerpt

Probably it’s not the best approach because it requires introducing a global variable but here’s the idea: In Posts_in_Page plugin there are 2 filters, one is fired before output of these items posts_in_page_pre_loop, and one after output end posts_in_page_post_loop. So the plan is to create global variable which will be set to true when you … Read more