[wp-hackers] Can't seem to override more link

Mike Little wordpress at zed1.com
Fri Aug 31 19:55:13 UTC 2012


On 31 August 2012 19:48, Micky Hulse <mickyhulse.lists at gmail.com> wrote:

> To give ya'll the full story, I'm trying to determine if it's worth my
> time to try and override ALL of the built-in WP dynamically generated
> CSS ids/classes; I really want to add a pseudo namespace to the
> class/id names that WP generates.
>
> I'm kinda wondering if it will be more trouble that it's worth to do
> this... It's looking like I'll have to override one function at a time
> in order to change CSS class/id names. Maybe it's just not worth my
> time?
>
> I assume there's not one global place/method that I can override to
> tweak dynamically generated CSS names?
>
> Thanks for listening.
>
>
Mickey,

The filter for the '(more...)' link created by the use of the <!--more-->
tag is 'the_content_more_link'.  Internally, the part of a post before the
<!--more--> tag is called the teaser (and this leads to a flag in the code
called $stripteaser which always amuses me), it has nothing to do with
excerpts.

The filters for the excerpt are a different set: 'excerpt_more' - used on
auto generated excerpts, and 'get_the_excerpt' used on manually created
excerpts.

As to overriding all the built-in classes and id's, I've got to ask why? To
what purpose? I would have thought the fact that all the container blocks
on a WordPress generated page are supplied by the theme, and thus can be
set up however you like. Anything inside those block is then effectively
namespaced.

For example: in Twenty Eleven you have paragraphs than can be selected as

.entry-content p where they occur in the entry blocks, and
.widget p where they occur in widget areas, and
.comment-entry p where they occur in comments,

and so on.

Is that not enough pseudo name spacing for you?


Mike
-- 
Mike Little
http://zed1.com/


More information about the wp-hackers mailing list