[SOLVED] Adding div's and classes to html in individual posts
Greetings! After quite a bit of try and try again I managed to find the precise element attributes I needed to use in ATO>CSS & HTML Inserts section to affect a specific post. The post is the newest one at [url="http://www.ezw123.com"[/URL]
However, the div, class and span elements I inserted into the post using Add Post and the HTML tab do not remain in the the code when I Publish it. Therefore, the additional styling I am trying to add as div's and classes in ATO>Add CSS is ignored. These are the element attributes I saw in Firebug relating to this post: id=post-232 class=post-232 post type-post status-publish format-standard hentry category-offthewall odd So I tried to wrap the entire post text in a div called "ss" for basic formatting, and tried to use span class=phone around the phone number and span class=upper around the first sentence, as I was creating the post. Then I added this code to ATO>Add HTML CSS Inserts>CSS Inserts: } div.post-232 post type-post status-publish format-standard hentry category-offthewall odd, #post-232, #ss{ font-family: Tahoma, Arial, Helvetica, sans-serif; font-size: medium; font-weight: bold; text-align: center; line-height: 20px; background-color: #FFFFCC; border: thin inset #000000; padding: 15px; margin: auto; } div.post-232 post type-post status-publish format-standard hentry category-offthewall odd, #post-232.phone{ font-family: Tahoma, Arial, Helvetica, sans-serif; font-size: medium; font-weight: bold; color: #FF0000; } .upper { text-transform: uppercase; text-decoration: underline; } Firefox shows the CSS as I added it in ATO>Add CSS, but since none of the divs and classes I tried to add to the HTML remained, the only formatting that shows is on the div post itself. I guess this was a drawn out way of asking - How do you add elements like div, class and span to the HTML text of a post? Thanks for your help. |
did you use the visual or html editor?
|
HTML editor....should I be able to add elements in HTML editor?
|
Yes you should, I just put a div in a post. Try disabling all your plugins
|
I tried disabling all the plug-ins, but elements I put in the post text are still not showing up. Could it have anything to do with the fact that I write the article/post in MS Word and then use the 'copy and paste from Word' option in the "Kitchen Sink" to insert the text? I add the elements after the basic text is inserted.
|
it shouldn't matter. If you are using the HTML editor, you should be able to put in the html into the post. To see if it is a theme issue swap to twenty-ten and try it.
|
I just don't get it. I went to another site I am developing with ATAhualpa theme, and was able to insert HTML code into the posts without any problem.
I have deactivated all my plugins, and I am still not able to enter HTML code into posts on the www.ezw123.com site. It's driving me crazy!! I've been going through all the HTML code and all the ATO options, and cannot for the life of me figure this out. How can I add TEXT to the posts, but when I add HTML code to the posts it doesn't show up and is completely ignored?????? It doesn't make sense! The span tags that WP or Atahualpa adds to the "read more" at the end of posts shows up, why would HTML code be completely ignored? Someone a lot smarter than me has to figure this one out...:( |
what happens if you try the twenty ten theme? just temporally swap them.
|
While waiting for your reply I tried a few things and made an interesting discovery.
On the two sites that are running the ATA theme and have had several plug-ins running on them for quite some time, (which I have deactivated while troubleshooting) I am able to insert and see HTML tags in the text of all PAGES I created, but not in the POSTS page running the WP loop. Also, if I click on the "View Post" button next to the permalink at the top of the post after inserting HTML tags, I can see all of the style changes I made to the text. But the changes are not there looking at the post outside of the admin panel. (And after clicking on update, of course) I will swap the themes and let you know what the result is. It must be one of the plug-ins, since, as I said before, I can see HTML changes to posts on a wordpress/atahualpa site that I have not developed yet. (www.edatajobs.com) But they are all deactivated and I am not sure which one did what. Thanks for your help. I'm sure someone else must have run into this problem - I cannot find any matches in a search though. |
Are you perchance, displaying your posts on the home page as 'excerpts'...which by default strip all HTML from the post unless you set use the 'Don't strip these tags'?
|
No, I haven't started to use excerpts yet on any of my sites.
Q: Does "swapping" the themes pose any risk of the inability to swap back to original theme? ..... I just made another discovery while testing new posts with HTML style elements - the reason I can see the changes if I click on "View Post" button while creating a post, is because the changes can be seen on all single post pages. If you click on Read More or Leave Comment to go to single post view, you can see all of the style changes I have made to the newest 4 or 5 posts. I'm about as close to being a WP expert as I am a millionaire, (although I've spent countless hours on both :) ) so I don't really know what this narrows the problem down to. Does that mean one template is affected by something that the other template isn't being affected by? |
I discovered that also which is why I asked about excerpts.
go to ato->export/import settings and export your settings and attach them to a reply |
1 Attachment(s)
OK - here it is... thank you.
|
go to ato->Configure EXCERPTS and press the Green SAVE button and see what happens
|
I did that and nothing changed, and then I went back to Configure Excerpts and changed everything that said "excerpts" to "full posts". It looks to me like that fixed the problem, although I wish I understood why. I sure don't remember changing any options in ATO>configure excerpts.
Thank you though, and I will test it more thoroughly tomorrow. Thanks for hanging in there and following this through. Resolution without reason is not the greatest possible outcome, but resolution feels great on any terms. Thanks for your help... |
I checked the other site I was having the same problem with, and it too says "Only Excerpts" under Posts or Excerpts on Home Page. I have never configured this option. Is it possible that a plug-in changed it??
|
I don't think it is a plugin, more likely something that was added didn't completely update the at a database record
|
All times are GMT -6. The time now is 01:58 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.