Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Center area post/pages (http://forum.bytesforall.com/forumdisplay.php?f=32)
-   -   [SOLVED] Adding div's and classes to html in individual posts (http://forum.bytesforall.com/showthread.php?t=14847)

webgurl Jul 8, 2011 11:07 AM

[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.

juggledad Jul 8, 2011 11:28 AM

did you use the visual or html editor?

webgurl Jul 8, 2011 02:09 PM

HTML editor....should I be able to add elements in HTML editor?

juggledad Jul 8, 2011 08:26 PM

Yes you should, I just put a div in a post. Try disabling all your plugins

webgurl Jul 9, 2011 04:27 PM

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.

juggledad Jul 9, 2011 05:00 PM

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.

webgurl Jul 10, 2011 12:52 PM

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...:(

juggledad Jul 10, 2011 02:48 PM

what happens if you try the twenty ten theme? just temporally swap them.

webgurl Jul 10, 2011 06:50 PM

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.

juggledad Jul 11, 2011 03:56 AM

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'?

webgurl Jul 11, 2011 08:15 AM

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?

juggledad Jul 11, 2011 09:51 AM

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

webgurl Jul 11, 2011 04:54 PM

1 Attachment(s)
OK - here it is... thank you.

juggledad Jul 11, 2011 06:01 PM

go to ato->Configure EXCERPTS and press the Green SAVE button and see what happens

webgurl Jul 11, 2011 06:43 PM

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...

webgurl Jul 12, 2011 11:08 AM

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??

juggledad Jul 12, 2011 07:14 PM

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 08:46 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.