Support » Theme: Ignite » Child Theme questions: hide subtitle + “says:” + …

  • Resolved ArnoAnou

    (@arnoanou)


    Dear Ben,

    I’m re-designing our blog and creating a new child theme and have one general and several specific questions.

    The general one, a question I have always wondered about: If I preserve for example the current Ignite’s content.php-code in a child theme file, and you update Ignite’s content.php my child theme file doesn’t get updated, too. That’s the purpose, I don’t want my changes overwritten by your update. But: What if it was for example an important security update? Doesn’t a child theme defy the idea of updating?

    The more specific questions: I want to hide the blog’s subtitle in the header, how do I do this? + While the usual Ignite has title + subtitle + menu in the same line, I think I changed it years ago for the menu to be in a second line below title + subtitle. I want to redo this, what should I do?

    Behind every commenter’s name it says “sagt:” (German, “says:”) in the comment section. I want to erase this term and just have the commenter’s name. How should I proceed?

    + is this: https://wordpress.org/support/topic/child-theme-questions-pro/#post-6681148 still correct?

    Thank you very much! We are using your theme for more than three years (+ pro for two years, but with an expired license since April, it’s a non-profit blog) and it has been a delight.

    The page I need help with: [log in to see the link]

Viewing 11 replies - 1 through 11 (of 11 total)
  • Theme Author Ben Sibley

    (@bensibley)

    That’s so cool. Thanks for using Ignite for all these years!

    That’s a very good question. If there was a security issue in an update, I would post here and depending on the severity of it, I would redirect users to a message about it in the dashboard when they updated. Ignite also has a commit history on Github you can review with each update. In general, themes are mostly presentation so there are fewer opportunities for malicious code than plugins and most likely those breaches would occur due to code in the functions.php file which child themes do not override. Content.php and other template files mostly just output content using built-in WP functions, so they offer little opportunity for hackers.

    The tagline/subtitle is in the menu-primary.php file (Lines 4-6). You can copy that file into your child theme and then delete those lines to remove the tagline.

    For the comments, copy the “ct_ignite_customize_comments” function and paste it into your child theme’s functions.php file. Then you can delete this line from the function:

    <span> <?php _ex( 'said:', 'COMMENTER said:', 'ignite' ); ?></span>

    The rules I shared in the other forum thread still apply to working with child themes (with Ignite and Ignite Plus).

    Dear Ben,

    thank you for your fast answer. I successfully deleted the tagline. However, I can’t seem to solve this:

    * I can’t find the “ct_ignite_customize_comments” function. There’s a “link” to it in the comments.php but no function in the functions.php. I guess I’m searching in the wrong files? Also I have no search results for the code I want to delete there. I also searched the ignite support pages but didn’t see something similar there, too.
    * As for changing the “Published” text (s. old thread): My content.php file doesn’t have a line 89 (it just has 45) and line 16 is just “/article”.
    * Also, I want again to change the “Write a comment” and while it seems that I did this by myself 2 years ago I fail to find the file and line to do this again.

    Thank you for your help!

    Theme Author Ben Sibley

    (@bensibley)

    The “ct_ignite_customize_comments” function should be on line 75 of Ignite’s functions.php file. Do you see it there? If not, could you let me know the version of Ignite you’re using?

    I was wrong about the content.php file – that has changed in newer versions. You can find that text in the entry-meta-top.php file in the “content” folder. If you create an empty file called “content” in your child theme, you can copy over the entry-meta-top.php file and edit it there.

    Is “Write a comment” the text being output above the comment form?

    Oh, I didn’t think of this. It’s ignite 1.76 instead of 1.80. I’ll be talking to my co-bloggers to renew the license (since one of them is planning on setting up a new blog, we will possibly consider the VIP package.) I come back to this when a decision was made. Thank you so much for your help.

    About the technical stuff: Should the empty file be called just content without a file ending or content.php? / Yes, you’re right: “Write a comment” (re-translated from German “Schreibe einen Kommentar”) is the text just above the comment form.

    Theme Author Ben Sibley

    (@bensibley)

    Oops I meant an empty folder. Ignite has a folder called “content” that contains a few files. The entry-meta-top.php file needs to be inside the content folder in order to be loaded.

    I think the comment text may have changed between versions too. The phrase “Be First to Comment” appears on lines 22, 43, and 66 in comments.php inside the comments_number() function. Changing it in those places should work.

    We updated but some questions remain. Sorry!

    * I still can’t find the “ct_ignite_customize_comments” function in the functions.php. If I search for the name of the function or the code I’m supposed to delete there are still no results. Line 75 reads: “‘name’ => esc_html__( ‘After Page Content’, ‘ignite-plus’ ),”.

    * To change the “Published” text I now have the right file but don’t know the lines to change and how to do this (Sorry, still a php noob).

    * To change the “Write a comment” text I too have the right file and don’t know how to proceed. In line 20 (not 22?) in the comments.php it reads “<?php comments_number( __( ‘Be First to Comment’, ‘ignite-plus’ ), __( ‘One Comment’, ‘ignite-plus’ ), _x( ‘% Comments’, ‘noun: 5 comments’, ‘ignite-plus’ ) ); ?>”. Can I just put it like this: “<?php comments_number( __( ‘CUSTOM TEXT’, ‘ignite-plus’ ), __( ‘One Comment’, ‘ignite-plus’ ), _x( ‘% Comments’, ‘noun: 5 comments’, ‘ignite-plus’ ) ); ?>” ?
    Line 43-45 and 65-67 reads “

      <?php wp_list_comments( array( ‘callback’ => ‘ct_ignite_customize_comments’) ); ?>

    “, I don’t know what to change here.

    Sorry, I don’t know if it’s right to come here with such specific questions and requests. You’re doing some fine work on some very fine themes and I probably shouldn’t be tying your time to this. But since you keep on giving . . . I can’t help but ask again. Thank you so much for the support you gave, just tell me when it gets exhausting (I can’t tell) and I should start find a php course and su. 🙂

    Best,
    Arno

    Theme Author Ben Sibley

    (@bensibley)

    Haha no it’s not problem 🙂

    The comments function

    I’m not sure why it shouldn’t show up in functions.php. I’m going to add the complete function here. Can you use this to check for it in your theme?

    if ( ! function_exists( 'ct_ignite_customize_comments' ) ) {
    	function ct_ignite_customize_comments( $comment, $args, $depth ) {
    		$GLOBALS['comment'] = $comment;
    		global $post;
    		?>
    		<li <?php comment_class(); ?> id="li-comment-<?php comment_ID(); ?>">
    		<article id="comment-<?php comment_ID(); ?>" class="comment">
    			<div class="comment-author">
    				<?php
    				echo get_avatar( get_comment_author_email(), 48 );
    				?>
    				<span class="author-name"><?php comment_author_link(); ?></span>
    				<span> <?php echo esc_html_x( 'said:', 'COMMENTER said:', 'ignite-plus' ); ?></span>
    			</div>
    			<div class="comment-content">
    				<?php if ( $comment->comment_approved == '0' ) : ?>
    					<em><?php esc_html_e( 'Your comment is awaiting moderation.', 'ignite-plus' ) ?></em>
    					<br/>
    				<?php endif; ?>
    				<?php comment_text(); ?>
    			</div>
    			<div class="comment-meta">
    				<div class="comment-date"><?php comment_date(); ?></div>
    				<?php edit_comment_link( _x( 'Edit', 'Edit this comment', 'ignite-plus' ) ); ?>
    				<?php comment_reply_link( array_merge( $args, array(
    					'reply_text' => _x( 'Reply', 'Reply to this comment', 'ignite-plus' ),
    					'depth'      => $depth,
    					'max_depth'  => $args['max_depth']
    				) ) ); ?>
    			</div>
    		</article>
    		<?php
    	}
    }

    Changing the “Published” text

    This text should show on line 10 of entry-meta-top.php.

    echo _x( 'Published', 'Published DATE', 'ignite-plus' ) . " " . date_i18n( get_option( 'date_format' ), strtotime( get_the_date( 'r' ) ) );

    I’m adding “My New Text” as an example of how it can be updated:

    echo _x( 'My New Text', 'Published DATE', 'ignite-plus' ) . " " . date_i18n( get_option( 'date_format' ), strtotime( get_the_date( 'r' ) ) );

    Make sure to keep it within single quotes and it will work great.

    Write a Comment

    I just realized the text is slightly different between English vs German – I’ve been looking at the title above all the comments not the title above the comment form.

    Your example will work great for changing the title above the comments. To change the title above the comment form which is the “Write a Comment” text, locate line 33:

    <?php comment_form(); ?>

    And update it like this:

    <?php comment_form( array(
      'title_reply' => 'New Title Text'
    )); ?>

    You can change that to whatever you want the title to say.

    ArnoAnou

    (@arnoanou)

    Okay, the problem was me the whole time. Looks like the Firefox page search doesn’t search in scrollable windows or something and it never occurred to me to think I could search this code better than the software.

    I have the function from line 105 onwards. On line 117 it says:
    <span> <?php echo esc_html_x( 'said:', 'COMMENTER said:', 'ignite-plus' ); ?></span>
    Is this the line I want to delete?

    Everything else worked just fine. Thank you very much!

    Theme Author Ben Sibley

    (@bensibley)

    Ah okay that makes sense. Yea that’s the line you want to delete. Make sure to remove the entire <span> element and it will work great.

    ArnoAnou

    (@arnoanou)

    Everything works just fine! Thank you so much for your help! That’s some A+++ service. Thank you Ben!

    • This reply was modified 5 months ago by  ArnoAnou.
    Theme Author Ben Sibley

    (@bensibley)

    Happy to help!

Viewing 11 replies - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.