the_excerpt stop working on plugin activation
-
Hi! I wrote a WordPress plugin that saves short Version of post-titles in an extra db. And always I activate it. The excerpts are not displayed any more. I found out that not the code in my front end function is the problem but the function itself. I didn’t use a hook for that function, I just load it.
function shortTitle(){ global $wpdb; $mytitle=$wpdb->query("SELECT short_title FROM short_title WHERE post_ID = ".get_the_ID().";"); }
Is there any known Problem with functions within the loop?
I call it within the post by shortTitle();
I get my excerpts working by calling them with the_excerpt(get_the_content()); but that feels more like a dirty hack to me.
- The topic ‘the_excerpt stop working on plugin activation’ is closed to new replies.