• Resolved btomo

    (@btomo)


    Howdy,

    According to the codex the <!–more–> cutoff will always be utilized in the loop generated pages, but I wanted to override this functionality.

    The example is my front page will have 2-3 full articles but the archives will have just the excerpts on their listings.

    Is there a way to override the behavior generated by the_content() on certain pages?

    Re,

    Tomo.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Well if you are using the_excerpt for everything else, you could just not use the more tag at all. It’s never automatically placed, so as long as you aren’t using it the posts will always display full.

    Thread Starter btomo

    (@btomo)

    Mark,

    Yeah, was thinking along those lines as well. Would probably be cleaner for what I have in mind. Creates a semi-compatibility issue though, if you are customizing the content to suit a specific configuration / theme / behaviour.

    Re,

    Tomo

    Thread Starter btomo

    (@btomo)

    Very ironic:

    https://www.ads-software.com/support/topic/123114

    If they find the root cause of this problem then I’m set. I have the feeling that if you don’t specify parms for the_content() it defaults to full output?

    I have the feeling that if you don’t specify parms for the_content() it defaults to full output?

    If you use the_content with no parameters, then use of the <!--more--> will result in a link like this (more…). Meaning the code <?php the_content() ?> will honor the <!--more--> quicktag. To see this in action, view any Category or Archive link using the WordPress Default 1.6 theme.

    But, the <!--more--> quicktag will not be honored when posts are displayed on Pages.

    Thread Starter btomo

    (@btomo)

    Michael,

    Cheers for the info, I’ll build a page / page template and use it as the front page, that should get me exactly what I’m looking for here. Much appreciated.

    Tomo.

    Michael just said above: it will NOT work in any Page or Page template ??

    Thread Starter btomo

    (@btomo)

    Moshu: Exactly! That’s what I’m looking for – to have a frontpage that dishonours the more tags.

    So the overall site has / will have –

    i) A page utilised as the front page that queries for a single post and displays it in full, excluding content in the “News” category for the site. Previous to this help post, content was as described above but was cutting at <!–more–>.

    ii) custom archive page which is segregated post listings per category that shows excerpts, which I’m doing via some hacking of a template from plaintxt.org.

    I think I just confused the issue with bad nomenclature. Apologies!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Override <!–more–> function in the_content() in non single / perma.’ is closed to new replies.