Forum Replies Created
-
AuthorPosts
-
ira1974Member
Thank you again for your response. I am fairly new to WP development and your answers are certainly helping me gain a better understanding of its nuances.
Just for clarification I was simply using a constant to test. I've been using custom query_vars within my plugin to pass data around. I removed it here to eliminate that as a point of failure.
I believe you are correct in that the header has already been written.
Therefore my workaround is to simply pass the data I want to use in the request. Not the most elegant solution but should suffice for now.
ira1974MemberI am really at a loss here. I have defined a constant in my plugin's controller:
define("MYDOCTITLE","this is my new doc title");
I can echo it in my view:
echo constant("MYDOCTITLE");
But no matter what priority I set the new filter, it does not fire after my content:
remove_filter( 'wp_title', 'genesis_default_title', 10, 3 );
remove_action( 'genesis_site_title', 'genesis_seo_site_title' );
remove_action( 'genesis_site_description', 'genesis_seo_site_description' );add_filter( 'wp_title', 'genesis_default_title_new', 999, 3 );
function genesis_default_title_new() {$title = constant("MYDOCTITLE");
return $title;}
Error Message:
Warning: constant(): Couldn't find constant MYDOCTITLE
ira1974MemberThank you for the reply. How do I determine what priority I should use?
-
AuthorPosts