Home>Support>Categories and Search name change

Categories and Search name change

Notice: This thread is over two years old; the information may be outdated. Please consider creating a new thread if you require free support. If you have an active SiteOrigin Premium license, you can email our premium support desk at [email protected].

Hello, can you please help me out in changing the name “Categories” and “search”. Where should I look for them in php code?

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 11 years, 2 months ago Andrew Misplon
    Hi, I Work Here

    Hi Piter. I’ve taken a look at this before and it would need to be developed in an update unfortunately. If you’d like you can suggest it as a future feature, sorry I don’t have better news: https://siteorigin.com/suggest-feature/.

  2. 11 years, 2 months ago Piter Pietrzak

    Alright, my suggestion is that this tag looks like this Categories, so all I need to do is to find it written in a php code. So far, Ive gone through all of them but somehow I cannot find it, can you give me a hand in finding that line in a code Sir ?
    Thank you
    Piter

  3. 11 years, 2 months ago Piter Pietrzak

    Categories – it diddnt paste last time

  4. 11 years, 2 months ago Piter Pietrzak

    Now it didnt either, please go into my site http://webtestyonline.pl/posrednictwo/ and hover over “categories” element with firebug, it shows a tag h3 with a widget class, and all I need to do is to find this class and rename it content. Guess it is somewhere in php code.

  5. 11 years, 2 months ago Andrew Misplon
    Hi, I Work Here

    Hi Piter. I think my reply to you was meant to go in another thread. I can help with this.

    You’ll need a child theme: http://codex.wordpress.org/Child_Themes. This is how your style.css should/could look:

    /*
     Theme Name:   Vantage Child
     Author:       SiteOrgin
     Template:     vantage
     Version:      1.0.0
    */
    
    @import url("../vantage/style.css");

    Within your child theme create a functions.php file and insert the following:

    <?
    
    // Make the theme translatable
    //load_theme_textdomain( 'vantage', get_stylesheet_directory() . '/languages' );
    
    function vantage_child_set_text_domain(){
    load_theme_textdomain( 'vantage', get_stylesheet_directory() . '/languages' );
    }
    add_action('after_setup_theme', 'vantage_child_set_text_domain', 15);

    Additionally create a folder in your child theme called “languages”. Now we’re ready.

    Download this program: http://poedit.net/ and use it to open the vantage.pot file found in the languages folder in your main vantage folder. Assuming you’re running an English site create a translation and save it as en_US Poedit will automatically save two files with that file name, one with a .po and one with a .mo extension. Upload both to the languages folder in your child theme and you should be done.

  6. 11 years, 2 months ago Piter Pietrzak

    Sir, I appreciate it a lot, your help is really useful :) Im sory to continue that threat but it’s really important for me to fulfill what I was asked to do. I have done everything what you told me to do, but unfortunately the “category” word is not in that file, so it sholud be elswhere, maybe I should try to go through WP files because it is depended on them ?

  7. 11 years, 2 months ago Andrew Misplon
    Hi, I Work Here

    Apologies for wasting your time there. Please paste the following into your functions.php file under the function we created for the translation files and edit as required:

    if( !function_exists( 'vantage_get_archive_title' ) ) :
    /**
     * Return the archive title depending on which page is being displayed.
     * 
     * @since vantage 1.0
     */
    function vantage_get_archive_title(){
    	$title = '';
    	if ( is_category() ) {
    		$title = sprintf( __( 'Category Archives: %s', 'vantage' ), '<span>' . single_cat_title( '', false ) . '</span>' );
    
    	}
    	elseif ( is_tag() ) {
    		$title = sprintf( __( 'Tag Archives: %s', 'vantage' ), '<span>' . single_tag_title( '', false ) . '</span>' );
    
    	}
    	elseif ( is_author() ) {
    		the_post();
    		$title = sprintf( __( 'Author Archives: %s', 'vantage' ), '<span class="vcard"><a class="url fn n" href="' . esc_url( get_author_posts_url( get_the_author_meta( "ID" ) ) ) . '" title="' . esc_attr( get_the_author() ) . '" rel="me">' . get_the_author() . '</a></span>' );
    		rewind_posts();
    
    	}
    	elseif ( is_day() ) {
    		$title = sprintf( __( 'Daily Archives: %s', 'vantage' ), '<span>' . get_the_date() . '</span>' );
    
    	}
    	elseif ( is_month() ) {
    		$title = sprintf( __( 'Monthly Archives: %s', 'vantage' ), '<span>' . get_the_date( 'F Y' ) . '</span>' );
    
    	}
    	elseif ( is_year() ) {
    		$title = sprintf( __( 'Yearly Archives: %s', 'vantage' ), '<span>' . get_the_date( 'Y' ) . '</span>' );
    
    	}
    	else {
    		$title = __( 'Archives', 'vantage' );
    	}
    	
    	return apply_filters('vantage_archive_title', $title);
    }
    endif;
  8. 11 years, 2 months ago Piter Pietrzak

    Sir, first of all I’d like to thank you for your help, it’s really helpful. The next time I’d be doing html site using your theme I’ll upgrade it to Premium to honor your work, really efficient. But again it’s not what I was looking form, the code above I changed on my own a while ago to rename other site elements. The one I’m looking for is here:
    http://s1283.photobucket.com/user/Piter_Pietrzak/media/1_zps8b5b2629.jpg.html
    but I reckon it’s not dependent on your theme but WP configuration, so thanks a lot for your input in my project, it’s priceless. The next I’m planing to do is searching WP files (there are milions of files) and maybe it’s somewhere there, so I won’t prolong this thread any further.
    Cheers
    Piter

  9. 11 years, 2 months ago Andrew Misplon
    Hi, I Work Here

    No problem.

    If you have changed “Category Archives” etc. then rather do it in the way I indicated using functions.php in a child theme as this will make your change safe during theme upgrade. Without a child theme the change will be lost.

    The item you want to change is actually quite easy. Head to Appearance > Widgets > Sidebar, find the Categories widget and change the title of that widget.

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More