• Experienced PHP programmer new to WordPress, so please bare with me. Love this theme and thanks for your hard work. I don’t have a link for a site as it’s not public yet, but I had a question about using the child theme. I have two simple changes so far that I haven’t figured out how to get around without placing the files in the child theme itself. I’d like to make the following two changes–

    in single.php I want to remove the “By <author>” and replace it with “Posted”–
    <p class="post-byline"><?php _e('by','hueman'); ?> <?php the_author_posts_link(); ?> · <?php the_time(get_option('date_format')); ?></p>

    I know I can place the single.php in the child theme and then just change “<?php _e('by','hueman'); ?> <?php the_author_posts_link(); ?> ·” to “Posted

    but I’d like to refrain from having the full page in the child theme with what seems to be such a small change. I’ve read all about overriding functions and understand that. But couldn’t find much on replacing simple content.

    Similarly, with sidebar.php, I wanted to remove the “FOLLOW:” text and just have the icons (removing “<?php _e(‘Follow:’,’hueman’); ?>”).

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi,
    hiding “FOLLOW” is pretty trivial – 1 line in child “style.css”:

    .s1 .sidebar-top p {display:none;}

    I’m not sure about your first question, PLS clarify, U are looking for a CSS solution?
    Regards,
    Mike

    Regarding CSS:
    -you can hide whole “.post-byline” with

    .post-byline {display:none;}

    -also hiding author:

    .post-byline a{display:none;}

    Playing with CSS “content” property and it’s “:before” and “:after” elements just inserts text in existing “.post-byline”, for example:

    .post-byline a:after {content:’xxxxxx’;}

    just ads ‘xxxxxx’ after author.
    So, for your first problem, the best solution is the one you proposed, with child theme PhP modifications.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to modify only certain parts of pages’ is closed to new replies.