This is searchable archive of our old support forums, which operated from 2012 - 2016. To find out how to get support for your current theme, please visit our support page.

Changing the words 'No Comments' to 'Please add your comment'

  • Creator
    Topic
  • #8731
    pynto
    Member

    Hi Theme Blvd

    I am using the swagger theme and under a post title I have the line with author, date etc followed by number of comments.
    When there have been no comments posted yet it says ‘no comments’. I would really like to change this to say something like ‘Please add your comment’ or ‘click here to comment’.

    Can you advise me of the best way to do this?

    Thanks

    Tamsin

Viewing 7 replies - 1 through 7 (of 7 total)
  • Author
    Replies
  • #8736
    Jason Bobich
    Keymaster

    Hello Tamsin,

    You can find this in the function called “swagger_blog_meta” in /includes/theme-functions.php. This is a pluggable function and can be edited from your Child theme’s functions.php —

    http://dev.themeblvd.com/tutorial/editing-framework-functions/

    If you want to be a little more organized, and you understand how action hooks work, you can unhook the “swagger_blog_meta” function from the action “themeblvd_blog_meta” and hook on your own function, maybe copying swagger_blog_meta as a starting point and changing its name.

    http://dev.themeblvd.com/tutorial/actions/

    http://dev.themeblvd.com/tutorial/primary-framework-action-hooks/

    #8781
    pynto
    Member

    Hi

    Thank you for your reply. I cannot find ‘swagger_blog_meta’ in any functions file, swagger or child.

    I did find themeblvd_blog_meta in this section below:

    However I cannot see where to change the words ‘no comment’. Can you help me a bit more with that please.

    Thanks

    Tamsin

    if( ! function_exists( 'swagger_featured_single_within_post' ) ) {
    	function swagger_featured_single_within_post() {
    		global $post;
    		
    		// Determine if meta info should show
    		$show_meta = true;
    		if( themeblvd_get_option( 'single_meta' ) == 'hide' )
    			$show_meta = false;
    		if( get_post_meta( $post->ID, '_tb_meta', true ) == 'hide' )
    			$show_meta = false;
    		else if( get_post_meta( $post->ID, '_tb_meta', true ) == 'show' )
    			$show_meta = true;
    		if( is_attachment() )
    			$show_meta = false;
    		
    		?>
    		
    			
    			
    		<!-- .element (end) -->
    		<?php
    	}
    }
    #8784
    Jason Bobich
    Keymaster

    What version of Swagger are you using?

    #8831
    pynto
    Member

    I looked at the changelog and it says 1.0.7 at the top.

    I am reluctant to update as have just built 2 sites, one of which is fairly large and I don’t want to break it now.

    I have another question which is:

    I want to customise the sidebar of one of the author pages but can only see the choice to set up a widget area for all author pages – is there a way to select just one of them?

    Thanks

    Tamsin

    #8832
    pynto
    Member

    The alternative, which might be better, for the custom author sidebar is to be able to add html content to the author profile. I found this advice in a forum:

    I modified wp-includes/default-filters.php as follows; I believe it has the effect of formatting a user's profile description just like a post (but ignoring smilies):
    
    Remove the line add_filter('pre_user_description', 'wp_filter_kses');
    
    Add the lines:
    add_filter('pre_user_description', 'wp_filter_post_kses');
    add_filter('pre_user_description', 'wptexturize');
    add_filter('pre_user_description', 'wpautop');
    add_filter('pre_user_description', 'convert_chars');
    add_filter('pre_user_description', 'balanceTags', 50);
    
    The wp_filter_post_kses filter removes HTML prohibited in posts---it is less restrictive than wp_filter_kses.

    But wasn’t sure how to add this to swagger? Should I add this to my child functions file? and if so do I just paste it in or do I need some code to relate it to author profiles?

    Thanks so much.

    Tamsin

    #8839
    Jason Bobich
    Keymaster

    I looked at the changelog and it says 1.0.7 at the top.

    Ok, so you’re using using v1.0.7. Note you can always see the version for every theme by going to Appearance > Themes and clicking to view the details for any of the themes.

    In this version, you’ll find the text you want to change in the function themeblvd_blog_meta_default found in /framework/frontend/functions/display.php.

    I want to customise the sidebar of one of the author pages but can only see the choice to set up a widget area for all author pages – is there a way to select just one of them?

    No, I apologize, but there is no feature for this. You’ll want to look into some other method like using the Widget Logic widget perhaps. With this plugin you can easily target a specific widget to an author page.

    http://wordpress.org/plugins/widget-logic/

    http://codex.wordpress.org/Conditional_Tags#An_Author_Page

    #8859
    pynto
    Member

    Great, the no comment bit was easy once I found that file – thank you.

    The other bit I can work around.

    Thanks for your help.

    Tamsin

Viewing 7 replies - 1 through 7 (of 7 total)
  • The forum ‘Swagger Responsive WordPress Theme’ is closed to new topics and replies.