ThemeShaper Forums » Travailler

[closed]

problem with 'thematic_content', 'childtheme_content'

(9 posts)
  • Started 5 years ago by guyk
  • Latest reply from helgatheviking
  • This topic is resolved
  1. guyk
    Member

    Hello

    excuse my poor english
    i try to do the following

    I implemented a new filter named thematic_content into the current SVN copy. You can return the following constants:
    - full : the full post content including .. More .. is displayed
- excerpt : the excerpt of the post is displayed
- none : nothing will be displayed
    You could use the following code snippet in your child theme's functions.php to display the full post instead of the excerpt on a category page:
    function childtheme_content($content) {
    if (is_category()) {
    $content= 'full';}
    return $content;
    }
    add_filter('thematic_content', 'childtheme_content');

    and i get

    Warning: Missing argument 2 for add_filter() in /homez.34/autoport/mesites/vousgagnezaetreconnu/wordpress/wp-includes/plugin.php on line 65

    you can see the result at
    http://www.vousgagnezaetreconnu.com/

    the only thing i want to do is going directly to the entire content of archive
    fhanks if you can help me

    guyk

    Posted 5 years ago #
  2. Hi,

    sorry .. don't know what caused this error. I tested the original code in my child theme's functions.php without any problems.

    You might want to change the above mentioned code to:

    function childtheme_content($content) {
    	if (is_archive()) {
    		$content= 'full';}
    	return $content;
    }
    add_filter('thematic_content', 'childtheme_content');

    Cheers,

    Chris

    Posted 5 years ago #
  3. guyk
    Member

    Hello

    Now is OK,
    i dont understand what im doing the first time
    i thank you a lot

    guyk

    Posted 5 years ago #
  4. askgreve
    Member

    Thanks, it worked for me too.

    Ask

    Posted 5 years ago #
  5. And me too! Thanks! Just wanted to make the Homepage to display excerpts only..

    function childtheme_content($content) {
    	if (is_home() || is_front_page()) {
    		$content= 'excerpt';}
    	return $content;
    }
    add_filter('thematic_content', 'childtheme_content');

    and this is what I used based on Chris' answer.

    Thanks Chris!

    Posted 4 years ago #
  6. iCristiano
    Member

    In case I don´t want any content for "tax" for exemple... What should I use?

    function childtheme_content($content) {
    	if (is_tax()) {
    		$content= '??????';}
    	return $content;
    }
    add_filter('thematic_content', 'childtheme_content');

    Thanks!!

    Posted 2 years ago #
  7. instead of bumping a year-old thread, please create a new thread that specifically details what you are trying to do. i think i understand the q, and will answer in the new thread. i just want a thread with a better title so people can find it should they have the same question instead of burying it here.

    Posted 2 years ago #
  8. iCristiano
    Member

    Sorry Helga, I thought it was about the same subject, a "problem with thematic-content"...
    I will create a new thread right now.
    Thanks!

    Posted 2 years ago #
  9. similar maybe, but i think it is different enough to warrant its own thread. plus this one is so old.

    Posted 2 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.