Forum Replies Created

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • widespread
    Member

    Hey @Sakin, you only had missed the theme name key, it should have been like this:

    <wpml-config>
      <admin-texts>
        <key name="theme_mods_catch-base-child">
          <key name="catchbase_theme_options">
            <key name="featured_content_headline" />
            <key name="featured_content_subheadline" />
          </key>
        </key>
      </admin-texts>
    </wpml-config>

    Now it works! Thanks for your support!
    Where can I donate you a beer?
    Cheers.

    widespread
    Member

    try adding xml file in your parent theme

    tried that, did not work..

    Here is complete list of XML file https://gist.github.com/sakinshrestha/6cc4ba393ade041c16ae#file-wpml-config-xml

    Ok, but isn’t it a description of text strings for the admin interface only, anyway?

    I understand you’re not familiar with Polylang, but then what was the reason for for creating that .xml file in the theme folder (or child-theme folder) ?
    Thanks

    widespread
    Member

    @Sakin: yes that’s the settings I’m talking about: in that page I can’t see “featured content title” and “featured content description” strings fields.

    I saved this in public_html/wp-content/themes/catch-base-child/wpml-config.xml

    <wpml-config>
        <admin-texts>
            <key name="catchbase_options">
    			<key name="featured_content_headline"/>
                <key name="featured_content_subheadline"/>	
            </key>
        </admin-texts>
    </wpml-config>

    and this in public_html/wp-content/themes/catch-base-child/functions.php

    function catchbase_wpml_invalidcache() {
    	delete_transient( 'catchbase_featured_content' );
    
    } // catchbase_wpml_invalidcache
    /* endif; */
    
    add_action( 'after_setup_theme', 'catchbase_wpml_invalidcache' );

    before the last ?> PHP closing tag.

    At what stage is “after_setup_theme” being triggered though? Maybe it’s not ?
    I’ll also try to post in Polylang forum, but being the setup of additional content to be translated that easy, I think there must be some step that we’re missing?

    If you got something else let me know please, I’ll get back with news from Polylang too.

    Cheers and thanks 🙂

    widespread
    Member

    Thanks, I tried changing the code, no errors now, but in Polylang settings I can’t see the text fields for translating Featured Content Title and Description.

    What am I missing? Again, I’ve saved the wpml-config.xml in catch-base-child-theme folder, and edited functions.php in catch-base-child-theme folder and also removed that “endif;” from your code.
    Is this all correct?

    What else could it be that I am missing?

    widespread
    Member

    Thanks! And I really hope things will slowly get better there. My heart is with you guys.

    About the code you provided, after making the changes I get this:

    Warning: array() expects parameter 1 to be a valid callback, function ‘catchbase_featured_content’ not found or invalid function name in /home/my_website/public_html/wp-includes/plugin.php on line 496

    I’m using a child theme for catch base so I put both the xml and the functions.php code in the child theme folder and child theme functions.php, is that ok?

    Also I deleted that “endif” after the function.

    Thanks again.

    in reply to: problems in catchbase-featured-content.php #53669
    widespread
    Member

    I “fixed” it! It was not at all a issue with catch-base “catchbase-featured-content.php” but it’s just how Polylang works instead! What it does is that it will display the featured content posts for a translated page, only if the relevant translated version of the featured content posts exists too.

    So for example if I am in the Spanish version of my front-page, the featured-content loop will only be able to fetch those posts which also have a Spanish translation!

    So again nothing to do with Catch Base which perfectly does its job.
    It was only confusing me that on the front-page the slideshow could still show the non-translated posts’ images, so I erroneously suspected that there was a problem in the featured-content query code.

    All working now, but I think Polylang developer should read this and made it more clear how his plugin modifies the query system, because without knowing that one could easily spend hours after hours of hair pulling…

    Thanks, I hope I did not make you waste time. You can mark this as solved.

    in reply to: Width of page with "No Sidebar (Content Width)" #53657
    widespread
    Member

    I think you can fix it in CSS with

    
    .no-sidebar.content-width #main {
     width: 100%; // original is 820px
    }
    

    but you could also have to take into account how it will display on smaller screens (I think responsive.css is responsible to set a width for every different screen size …)

Viewing 7 posts - 1 through 7 (of 7 total)