• Hello everyone,

    I’m looking foward to change some theme string located in different pages of my website.
    As an information, my website will be in spanish so, many labels are not translated properly.

    An example of one of the labels I want to change is the string which appears as an input in the search bar. Another example could be the “continue reading” located in the search result page.

    Is there any plugin I should install?
    I also have installed CodeSnippet plugin, so if necessary I’m able to add PHP code.

    Thanks in advance!

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • Shahin

    (@skalanter)

    Hello @nicotrombin,

    Thank you for reaching out,

    There are three ways to change strings or translate content:

    1. You can use Loco Translate plugin: https://www.ads-software.com/plugins/loco-translate/ to translate all strings on your website for all plugins and the theme.

    2. Or use these plugins:
    https://www.ads-software.com/plugins/say-what/
    https://www.ads-software.com/plugins/string-locator/
    These are for when you have translation purposes.

    3. Also, you can get in touch with your locale translation team in WordPress via this link: https://translate.www.ads-software.com/projects/wp-themes/oceanwp/.
    Or in https://wp.org > Plugin Page > Development Tab > The Translators.

    Please let me know if you have any questions about the above steps.

    I hope it helps.
    Best Regards

    Thread Starter nicotrombin

    (@nicotrombin)

    Thank you so much for your quick response.

    I finally solved with Loco Translator.
    I’d also like to ask another thing as I would like to change a part of the search results page.

    I currently have something like this: https://ibb.co/rmH8STm

    And I’d like to have something like this: https://ibb.co/F79TFXh

    Thanks!

    Shahin

    (@skalanter)

    Hello @nicotrombin,

    Thank you for reaching out,

    This is a customization that can be achieved in several methods, but I will explain the simplest way below:

    So, the solution to achieve it is customization, and it needs familiarity with PHP, if you are unfamiliar with PHP, you can contact a PHP expert. To do this, first, you need to use the child theme. You can copy the metafile from the partials folder in the child theme following the same path and then make the necessary changes.

    For more information about that, please follow the steps below:

    By using FTP or cPanel access (if didn’t use the localhost), Go to this directory:
    Wp-content\themes\oceanwp\partials
    Find your template which you want to customize and copy that template file(in your case, for example, you need to change the date on the blog page, so you need to use the blog template(s): https://i.postimg.cc/brv9gn9s/image.png).

    Then head over to the same path on the child theme. There isn’t an entry folder as a default on your child theme, so you need to create a new one(one time).

    Example: If you want to change the HTML tags structure in the single blog post featured image for standard post format, all you need in this step is the following:

    1. Head over to your WP root > wp-content > themes > oceanwp > partials> single > media path.
    2. Then, find the “blog-single.php” file and copy this file.
    3. After that, go back to the themes folder (wp root > wp-content > themes) and go to the oceanwp-child-theme-master folder.
    4. Create a new folder with the “partials” name in the child theme.
    5. Go to the /partials/ folder and create a new folder with the “single” name.
    6. Go to the /single/ folder and create a new folder with the “media” name.
    7. Go to the /media/ folder and paste the “blog-single.php” file here.

    * Please check this screenshot: https://i.postimg.cc/sxjYTWyt/image.png.
    * Download child theme: https://docs.oceanwp.org/article/90-sample-child-theme.
    * Developer docs: https://docs.oceanwp.org/collection/19-developer-doc.

    Note 1: It’s working with the /woocommerce/ folder or root of the theme files and the search.php file is in the site’s root, so all you need is put that file in the root of the child theme and then modify it.

    Note 2: Get a full backup from your website and try the above steps on the staging website, then move your changes to the production site.

    Please let me know if you have any questions about the above steps.

    I hope it helps.
    Best Regards

    Thread Starter nicotrombin

    (@nicotrombin)

    Hello @skalanter,

    Thank you so much for the provided information.
    I’m quite familiar with PHP so it won’t be a problem coding side. Is it possible to make the customization?with the plugin “CodeSnippets” or I will have to bring my project into Visual Studio Code?

    Another thing that it wasn’t very clear for me is, which files do I have to modify in order to customize the Search Result Page? Because I do not need to change the date on the blog page as you said but, I need to modify the UI of the Search Results Page.

    Thanks!

    Shahin

    (@skalanter)

    Hello @nicotrombin,

    Thank you for reaching out,

    Customizations are not included in support according to the rules.
    However, yes you can find a way to add a section before the content or after the header, etc, but only on the search page.

    It can be a designed HTML, or a shortcode, or etc. So, you must find the correct hook and use the correct conditional on the snippet code, you can start from here: https://docs.oceanwp.org/collection/19-developer-doc and here: https://developer.www.ads-software.com/reference/hooks/

    Regarding your second question, here I’ve already mentioned it:
    https://www.ads-software.com/support/topic/how-to-change-theme-strings/#:~:text=the%20search.php%20file%20is%20in%20the%20site%E2%80%99s%20root%2C%20so%20all%20you%20need%20is%20put%20that%20file%20in%20the%20root%20of%20the%20child%20theme%20and%20then%20modify%20it.

    You can choose any method you like to achieve it.

    I hope it helps.
    Best Regards

    • This reply was modified 2 weeks ago by Shahin.
Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.