[resolved] Polylang and Pitch theme (6 posts)

  1. miguelcortereal
    Posted 3 years ago #

    Pitch theme settings has fields to configure some default texts.

    These fields are in an array from a record with option_name "pitch_theme_settings at wp_options table.

    To get translation for some of these fields I've included them at wpml-config.xml file as shown below (I'm getting translation for a plugin too and works fine):

    		<key name="wp_cart_title" />
    		<key name="wp_cart_empty_text" />
    		<key name="wp_cart_visit_shop_text" />
    		<key name="plural_items_text" />
    		<key name="singular_items_text" />
    		<key name="shipping_text" />
    		<key name="item_name_text" />
    		<key name="price_text" />
    		<key name="remove_text" />
    		<key name="item_qty_string" />
    		<key name="no_item_in_cart_string" />
    		<key name="pitch_theme_settings">
    			<key name="front_page_cta_text" />
    			<key name="front_page_cta_button_text" />
    		       <keyname="front_page_home_title_latest_projects" />
    			<key name="front_page_home_title_blog" />
    			<key name="front_page_home_title_clients" />
    			<key name="project_archive_title" />
    			<key name="project_view_text" />
    			<key name="text_footer_text" />
    			<key name="text_search_placeholder" />
    			<key name="text_comments_closed" />
    			<key name="text_not_found" />

    For some reason these theme settings doesn't show at polylang settings for translation.

    From what I could understand this is dependent from get_option function to work.

    I've been looking for get_option function in my theme associated with 'pitch_theme_settings' record and this is all I could find at functions/settings.php file:

    $original = (array) get_option('pitch_theme_settings', array());
    	if(isset($original['search_input'])){ .... and so on ....

    If I'm right (I'm not a coder, I'm only learning to look at it), Pitch theme use another process to retrieve the information from wp_options table different from get_option function.

    Do I have alternatives?


  2. Chouby
    Plugin Author

    Posted 3 years ago #

    Could your problem come from

    <keyname="front_page_home_title_latest_projects" />

    which should be

    <key name="front_page_home_title_latest_projects" />

    You should also try with the current development version as I corrected a bug for wpml-config.xml

  3. miguelcortereal
    Posted 3 years ago #

    That lack of space is a typo here in the forum only.

    I'm using polylang 1.0.3, I guess the last version.

  4. Chouby
    Plugin Author

    Posted 3 years ago #

    The development version has some bugs corrected compared to the version 1.0.3.

  5. miguelcortereal
    Posted 3 years ago #

    ok, testing it.

  6. miguelcortereal
    Posted 3 years ago #

    It works.

    Thanks a lot Chouby, you just saved my day.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Polylang
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic