Remove div class=”crp_title”
-
I’ve updated the plugin to the latest version (2.3.0) and I got some problems with the style…
In the previous version, when I use shortcode [crp] then the result for the list is
<li><a href>title</a></li>In this version, it is
<li><a href><div class="crp_title">title</a></li>How can I remove the div class crp title?
Thanks before…
-
This topic was modified 9 years, 8 months ago by
Si Retu.
-
This topic was modified 9 years, 8 months ago by
-
Earlier the crp_title used to sit within the
atag. It’s changed now to sit separately.
You can’t remove it automatically. Is there a reason you need to remove this?I think it is weird if there is a
<div>inside<li>what do you think? Should thedivsit there?I’ve been checking on this and it is valid to use a div inside an li. Potentially another option is to use a span
This is also giving me significant problems with formatting, as it appears to throw a newline before the list item. In other words, it used to look like this:
* Item 1 * Item 2 * Item 3But since the update, has become
* Item 1 * Item 2 * Item 3Removing the <div class=”crp_title”> from the custom field fixes the issue, which suggest this is not a theme problem but obviously it’s a far from ideal solution. Where about would I go to remove the new line?
This is not using a short code, it’s just the standard attachment to a post.
-
This reply was modified 9 years, 8 months ago by
girlswithguns.
I did some more playing around with this tonight, and it seems to be the result of an “a” element around a “div” but inside an “li” element, that causes the problem. I note the WordPress editor will filter this out. If you put in
<ul> <li><a href="http://google.com"><div>Item 1</div></a></li> </ul>In Text mode, then switch to visual and back, it will erase the “a” element, even though it is correctly nested and “valid”.
However, a “span” does not seem to have the same problem. Maybe the plugin can be changed to use that instead?
[Sorry for all the edits, the site seemed to try and interpret some of my text at HTML!]
-
This reply was modified 9 years, 8 months ago by
girlswithguns.
-
This reply was modified 9 years, 8 months ago by
girlswithguns.
-
This reply was modified 9 years, 8 months ago by
girlswithguns.
-
This reply was modified 9 years, 8 months ago by
girlswithguns.
-
This reply was modified 9 years, 8 months ago by
girlswithguns.
Nah, that’s what happens to me when I just want to display the shortcode as list…
Indeed, it is valid html5 but somehow doesn’t proper for my blog post…
Right now I create a new function that produces shortcode from crp function to be called in post and I think it’s not effecient but still the best solution for me..
Maybe in the next update you can consider our suggestion or give the user options either use div or span
@girlswithguns I have the same problem. It is not clear from the dialog here how did you solve the problem. How did you remove the <div class=”crp_title”> ?
@compukol, I can only explain how it worked on my site, so can’t say if this will necessarily work for you. But on my posts page, below the body, there is a block for ‘Custom Fields’. When I expand this, it contains an entry where the name is “crp_related_posts” and the “value” is the HTML code that will appear on the page in the “Related Posts” section. That’s where I found and could remove the “div” class which was causing my problem.
Hope this helps!
@girlswithguns So you have to do this for each post? We have over 1000 posts.
Fortunately, the change didn’t seem to break any of the existing posts for me (I’m in the same boat, over 1000 of those!). It’s only new ones, as they are created, that seem to use the “div” format, and so would need to be adjusted before publication.
Again, your experience may vary.
Ran into the same line break issue (and btw, for the next update, I vote for a non block element like ‘span’ instead of div as well).
My fix was to add the following to my css:
.crp_title {display: inline;}Should work on most themes.
Hi,
Thanks for all the responses. The quickest way to test would be to edit the ‘includes/output-generator.php’ file and change
divtospan. Could I request you to try this if you’re facing a problem.Additionally, also the fix as posted by @cparodi7 above with the CSS. This can be added under Custom Styles box.
You should clear the cache in all instances as the meta field @girlswithguns mentions above is the cached entry and gets erased with you resave the Settings page or manually clear it with the cache button.
I’ll issue a fix for the CSS issue if I can get some confirmation that this works.
Thank you. The CSS-fix worked for me.
.crp_title {display: inline;}
in the custom Styles box solved the issue on firefox an edge-browser. safari and chrome are as fine as before.
-
This reply was modified 9 years, 8 months ago by
wpger.
@ajay that little tweak works well for me. Thanks 😀
Thanks for confirming. Was it just the CSS that made the difference or the editing on the php file as well? i.e. replacing div with span?
I plan to do the div > span change as well.
-
This reply was modified 9 years, 8 months ago by
The topic ‘Remove div class=”crp_title”’ is closed to new replies.