WordPress.org

Ready to get started?Download WordPress

Forums

Mon Cahier
child theme doest read /inc (8 posts)

  1. Josh
    Member
    Posted 7 months ago #

    Hello,

    I was wondering if anyone could tell me why my child theme isn't reading the inc folder? I added the folder to my mon-cahier-child folder and copied template-tags.php so I could remove the "by <author>" data under the post title. If I delete this information in my main mon cahier theme it works, but when I try to do it in the child theme, the edit to the file has no effect on the theme.

    any suggestions?

    Thanks.

  2. Christine Rondeau
    WP Yogi & Forum Moderator
    Theme Author

    Posted 7 months ago #

    I just tested this out myself and it doesn't seem to work.

    A better idea might be to simply hide that info using the following CSS:

    .byline {display: none;}

  3. Josh
    Member
    Posted 7 months ago #

    Christine,

    Thanks for the quick reply. That worked, but in the page source you still see all the code that if you just deleted the vcard stuff from the template-tags.php, it would completely disappear. Let me know if you ever figure out the issue, but in the meantime, this is a good fix.

    BTW, I really like the theme! Thanks for your work on it.

    Josh

  4. Josh
    Member
    Posted 7 months ago #

    Christine,

    Sorry, I just noticed that this didn't work completely. While it hides the author on the main site and in lists by categories and tags, if I click on the title of a post and view the single post, it still has the author's name under the title.

    Thanks,

    Josh

  5. Christine Rondeau
    WP Yogi & Forum Moderator
    Theme Author

    Posted 7 months ago #

    Hi Josh,

    You're right. The single post uses a different class.
    Try using this instead of what I gave you above.

    .single .byline,
    .byline {
    display: none;
    }

    I'll look into why the modifying the template doesn't work as well. But this is much quicker for now.

    Thanks for the compliment. Glad you like the theme.

  6. Josh
    Member
    Posted 7 months ago #

    that did it. Thanks. Do let me know if you figure out the other issue.

    Josh

  7. Christine Rondeau
    WP Yogi & Forum Moderator
    Theme Author

    Posted 6 months ago #

    Hi Josh,

    I finally got my head out of the Christmas haze and looked at this.
    I think that what you want to do, is in your child theme, if you have a functions.php file, just add this to it:

    function mon_cahier_posted_on( ) {
    	printf( __( '<time class="entry-date updated" datetime="%3$s" pubdate>%4$s</time>', 'mon_cahier' ),
    		esc_url( get_permalink() ),
    		esc_attr( get_the_time() ),
    		esc_attr( get_the_date( 'c' ) ),
    		esc_html( get_the_date() )
    	);
    }

    The parent theme has a call that checks to see if that function isn't called, so the child theme can just have it's own function and override the parent.

    I found the answer thanks to this thread - http://wordpress.org/support/topic/can-i-create-child-functionsphp-file-for-twentyten?replies=26

  8. Josh
    Member
    Posted 6 months ago #

    Sorry for the delay.

    Unfortunately, the function.php didn't work. But I updated to v2.8, and now the byline code in the style file works perfectly.

Reply

You must log in to post.

About this Theme

About this Topic