Support Forum

Blog Post Linking plugin add link text before the beginning of the page

BB Bruce Brown
Bruce Brown
Member

I installed the Blog Post Linking plugin and it does exactly what I want it to do, but it also does something I don’t want it to do.

The link from the Post to the Forums appears twice on the Post’s screen – once where it should, but also above the top of the page, in the left-hand corner.

When I change the settings so that the Forum link is no longer attached to the Post – either by de-activating the plugin or by disabling the plugin’s Post-to-Forum link – the problem goes away.

It looks like there is some kind of php miscommunication between my theme (WP Look’s “Daily Post”) and the Blog Post Linking plugin, but I do not know nearly enough about php to try to figure it out myself.

Can you help?

http://www.commonsensereview.com/fifth-forum-test-post/

24 Answers

New Answer

BR Brandon
Brandon
Member

In the Forum admin – Components – Blog Linking do you have the ‘Display blog post link above post content’ turned on? Might try turning off if so and see if that takes care of it.

BB Bruce Brown
Bruce Brown
Member

I’ve tried it both ways – link at the top, link at the bottom. No luck.

YS Yellow Swordfish
Yellow Swordfish
Member

It rather sounds like your WP theme is making two calls to the WP content function (the_content) which would cause the filter on that function to be run twice. Do you know if this is the case?
It makes it a bit difficult as the blog linking routine checks the post ID so it is clearly receiving that twice.
I am going to need to think about this one as I don’t see any obvious solution. Going to have to try and think of a devious one.

BB Bruce Brown
Bruce Brown
Member

I really don’t know enough about php to even completely understand your question, let alone answer it.smile

In a couple hours, when my son gets home, he might know what you’re talking about, so I’ll ask him.

Devious is fine with me.wink

MP Mr Papa
Mr Papa
Member

it might be worth a try also to go to forum – integration – page and permalink and play with the options for displaying multiple and within the loop and see if some combination gets you going…

BB Bruce Brown
Bruce Brown
Member

My son is at his house right now checking out the lead that Swordfish gave us. If he’s not able to fix it, I’ll try the integration settings. I’ll let you know.

BB Bruce Brown
Bruce Brown
Member

OK, my son messed with our php files for about an hour and couldn’t come up with a fix.

So I tried every possible combination in the Integration settings. No luck there either.

Then I temporarily installed a different WP theme (Twenty Eleven) and the problem did not show up in that theme.

So it must be, like Swordfish said, that our theme is making two calls and we just can’t find where that’s happening.

I really don’t want to go to a different theme, because I spent a lot of time tweaking the css on this one to make it like I want it.

I’m probably not asking this right, but do you know the name of the WP command for “remove filter”? Or do you have a guess what php file(s) we need to mess with and what messing we need to do?

MP Mr Papa
Mr Papa
Member

first see if you can find the theme using ‘the_filter’ without quotes in an apply_filters function call…

if you want to remove a filter, just call remove_filter(‘filter_name’, ‘callback’, $priority)  where priority if the priority of the filter being removed… if its default priority, ie 10, you can just omit the third argument…

BB Bruce Brown
Bruce Brown
Member

I JUST EDITED MY QUESTION:

Do happen to know what the ‘callback’ is?

(trying to relay between my son and the forum, and I don’t even know the meanings of the questions I’m asking.

Sorry… embarassed

MP Mr Papa
Mr Papa
Member

yes its generic and needs to be the name of the filter you want to remove?  not entirely sure what you are trying to do… but perhaps ‘the_content’…

BB Bruce Brown
Bruce Brown
Member

Oops, I was too slow with my edit. Please see above…

MP Mr Papa
Mr Papa
Member

the callback is the routine or function you are calling when the filter is run…  I cannot predict what that is as it will be done by your theme…

so back to my point, have you looked or usage of the_content within an apply_fillters() function call within the theme?

BB Bruce Brown
Bruce Brown
Member

Thanks for the replies. I am the guy that is actually trying to fix the problem (Bruce’s son).

I have been trying to figure out how to formulate a remove_filter() call to solve the problem. I thought I had a pretty good understanding of how to do that but you’ve stumped me with “the callback is the routine or function you are calling when the filter is run…  I cannot predict what that is as it will be done by your theme…”  I was operating under the assumption that the callback was determined by the plugin author, not the theme.

I have tried several variations of the following: remove_filter(‘the_content’, ‘foo’, 20) “foo” being a number of filters found in the sp-linking-plugin.php file. But I am blindley guessing as to what the correct foo might be.

And now you tell me that foo is determined by my theme? Hmmmm…..

You’re not entirely sure what we are trying to do? We are trying to fix the hinky forum/blog integration link found here:

http://www.commonsensereview.com/fifth-forum-test-post/

The link is being created twice (which is why Swordfish’s initial response (and my gut feeling)) seemed most likely, but I have yet to find the duplicated the_content call that may be the problem.

Perhaps it’s not a the_content that is the issue but some other filter call, or maybe I just haven’t looked in all the right places yet.

And this sentence makes no sense to me: “have you looked or usage of the_content within an apply_fillters() function call within the theme?” Sorry.