1
vote
1answer
53 views

How to ensure “the_content” filter runs only for the main displayed content?

I have a plugin which adds the method to "the_content" filter. add_filter('the_content', 'myFilteringFunction', 10000); Within that function I want to add some links on the beginning and the end of ...
0
votes
2answers
202 views

How to filter the_content() & include content from template

I am trying to filter the_content() on single page, but it looks like it is creating an infinite loop. I want to know how to fix this. I want to override the_content(). Is there any other way to ...
1
vote
2answers
164 views

Filter to change the content of 404 page

I have created custom rewrite rules. These rules now go to 404 page as expected. I can use action hook template_redirect to change the template matching query_var. But I don't want to create separate ...
0
votes
1answer
46 views

What happens when two or more plugins use the same hook?

Two of my plugins use the same filter hook: the_content. What happens in this case? Is there a priority handler, like which plugin will be served first? I would like to use both of the plugins. I ...
0
votes
1answer
162 views

filter the_content, custom post type, and wp_query

I thought this was going to be quick and easy, but naturally it's turning out to be more complicated. I'm writing a simple plugin that creates a custom post type "Ad", and then puts a random ad at ...
0
votes
1answer
155 views

Is it possible to remove next-post / previous-post with out creating a custom template?

I'm creating a plugin that uses a custom post type. I do not want to make a custom template for viewing the posts and discovered I can add a filter for the_content to include my custom fields, this ...
0
votes
1answer
74 views

Can / should a widget plugin define its own Widget Area?

Should a plugin be able to add a widget area above the_content? (Without requiring template/theme changes.) What would be the best way to do this? Doubts: widgets typically echo output to the screen; ...
3
votes
1answer
426 views

WordPress adding <br> tags into plugin content

We've written a plugin that shows reviews upon usage of a shortcode. On some sites, Wordpress is adding <br> tags throughout the shortcode content, and others it does not. The shortcode works ...
0
votes
2answers
259 views

Inserted double quote when prepending to the_content

I am trying to write a plug-in to display the RunKeeper Healthy button on single posts, but my output has an extra space and double-quote when I look at the page source. What I'm trying to do with the ...
0
votes
1answer
96 views

How to parse without changing the characters case (lower and upper) in wordpress the_content?

I made a custom parse function for my plugin and this one works great. I just have a little problem ! Here is my function : public function ys_glossary_parse( $text ) { // Get all the ...
1
vote
3answers
640 views

Finding the paragraphs in content

I am trying to create two functions, one that catches the first paragraph of some content, and one that catches the rest, but I have hit a bit of a conundrum. I have this in my single.php: <div ...