hi
try this:
1) open your theme’s header.php file
Find
<body>
and replace it with
<body <?php body_class($class); ?>>
use copy and paste so there are no typos
Then save the header.php file.
2) add this to your stylesheet:
.home .value { display: none; }
See if that does what you want. There is no reason to remove step 1 even if step 2 doesn’t work.
Thread Starter
dados
(@dados)
yes thank you it help me a lot, and for other stuff…
Glad to hear it!
Note to anyone reading this later: The CSS added to the stylesheet was specific to this user’s theme. Each theme likely requires its own version of the line of CSS.
Adding the body_class call in the BODY tag adds a number of classes to the BODY tag. We then use those classes to apply CSS to only a specific page or page type.
Thread Starter
dados
(@dados)
only problem is when you use excerpt function everything in post transform in <p>Some text ….</p> Before was <span class=”value”>Some text …. </span>
the_excerpt() strips out all HTML tags. that is how it works. it is because since the excerpts are automatically generated and are XX words long, a tag could have been opened within xx words that had not yet been closed, which would generate invalid HTML. so it strips out all tags.
If you want HTML in the excerpt you can create a custom excerpt on the post edit page. Those do not strip HTML tags out.
Thread Starter
dados
(@dados)
Thank you.. I will use now plugin for this.. But I will try like you say..