Topic RSS
I am attempting to redirect people trying to comment on articles to the linked blog posts. I am able to get the link correctly using this code
The problem is it puts the following link into <p> tags which screws up the single line page footer. Is there anyway to style the output to remove the <p> tag?
Secondly I'd really like to see some way to link blog posts to one forum and blog pages to another.
Also it would be nice to be able to, at the time of posting, be able to uncheck an option somewhere so that you can opt out of linking on that particular page/post.
- Actually SP does NOT place paragraph tags around the link and text. That is most likely WP doing that when it formats the display content. SP DOES place 'span' tags around the link and text using a class of 'sfforumlink' which you can style.
- No plans currently to separate posts and pages although if we get enough requests for this it will be considered in the future.
- You CAN turn the automatic creation of blog linking off for a specific post. The form is part of the write post/page – edit post/page display. Check you are showing it using the 'screen options' at the top.
hmmm well
in my case returns
<span class="sfforumlink">
<a href="http://www.pvpgamer.com/forum/news-discussion/spiffy-new-z-axis-shooter-firefall-announced/">
<p> Leave a comment</p></a>
</span>
</strong>
can you create original tags like <span> and <p> with css classes alone
not really sure what you are asking… you can of course have <span class='some-class'> or <span id='some-id'>
a class can be used many times on the same page, but an id can only be used once per page… is that what you are asking?
I am also trying to understand where those p tags are coming from… our code does not insert them (as andy mentions in his reply)
Yea I'm kind of clueless as to where they are getting spliced in. Don't even really know where to look. I've dumped a bunch of text into that same field trying to see if it is the theme that is appending them but that does not seem to be the case.
As far as I can see, the only thing I'm putting in is this function.
The actual value of %post-id% is a theme variable and is "358" without any formatting.
So with that input, the function is putting out:
</a></span>
So where the <p> tags are coming from is a mystery to me.
I wanted to point out also that the links inside the post that go to the forum that use the same function also put out code with <p> tags (here is the example from inside that post):
<span class="sfforumlink"><a href="http://www.pvpgamer.com/forum/news-discussion/spiffy-new-z-axis-shooter-firefall-announced/"><p><img src="http://www.pvpgamer.com/wp-content/plugins/simple-forum/styles/icons/default/bloglink.png" alt=""> Leave a comment</p>
</a></span>
You sure the formatting isn't buried in there somewhere?
Well I've gone through literally every <p> tag in your code and I can't find where it's being added.
I also was unable to find where the <p> tags are being added to the links inside blog posts that point to the forums. I'm assuming they are related, the fact that they exist means its happening SOMEWHERE but I am unable to track it down. I did notice that the filter functions will replace carriage returns with <p> (or was it the other way around?) so that's a fleeting possibility but I don't think it likely.
So I am totally and completely stumped. Got any suggestions for things I can do to diagnose the problem?
Yes and no.
What you have to remember is that WordPress applies it's filters to the entire page AFTER the content has been grabbed. The routine that adds paragraph tags to where it believes they are missing is called wpautop(). Although – sometimes themes and other plugins will also mess with the formatting and html tags. Especially anything with a link.
SP turns OFF the use of wpautop() because we filter the forum content dependent upon our own set of criteria. But wpautop() IS applied to the final forum page.
This does not effect normal post/page views however where wpautop() (or a theme/plugin imposed filter) will continue to operate. You could try turning it off in your theme (matbe in the functions.php file if you have one) to see what effect it might have. You shouldbe able to do that with the code:
remove_filter('the_content','wpautop');I disabled it and, as far as I can tell, nothing has changed. I am curious as to what circumstances would make WP "think" a paragraph is needed? Bunch of carriage returns or some such?
P.S. I have been attempting to run that function in different places in the posts hoping to get an instance that does not have <p> tags around the text. Whatever random event is sticking them in there, it's happening consistently. Even switched over to the Twenty Ten theme and it had the same behavior.
Just for grins I decided to test it in this format:
and this was what I got out:
<p><span class="sfforumlink"><a href="http://www.pvpgamer.com/forum/news-discussion/spiffy-new-z-axis-shooter-firefall-announced/"></a></span></p><a href="http://www.pvpgamer.com/forum/news-discussion/spiffy-new-z-axis-shooter-firefall-announced/"><p> Leave a comment</p>
</a><p></p>
Crazy.
Most Users Ever Online: 444
Currently Online: Yellow Swordfish, SPQC, steve.engelking, irlandes1, MacBravO
55 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
-Radio-: 1251
Lee H: 606
Luffer: 535
Conrad_Farlow: 502
jim: 478
neon: 263
ovizii: 240
Tal: 240
Member Stats:
Guest Posters: 2626
Members: 7363
Moderators: 1
Admins: 2
Forum Stats:
Groups: 5
Forums: 16
Topics: 10895
Posts: 79576
Newest Members: Rick Thomas, joelrob, ndc, MacBravO, irlandes1, triphop, betokan, Jonathan Yovani Muñoz, somosguatemala, ahcreate
Moderators: Brandon C (162)
Administrators: Yellow Swordfish (22236), Mr Papa (23688)
Log In
Register
Home
Add Reply
Add Topic
Offline
Quote
Online



Visit 
Privacy Policy



