Support » Theme: Singl » Files that contains specific code of Singl theme

  • Resolved FeliceAntonio

    (@antonio_09)


    Hi.
    I’m looking for the files that contain
    <h1 class="screen-reader-text">Post navigation</h1>
    and

    /* <![CDATA[ */
    var singl_background_image_vars = {"header_bg":""};
    var singl_script_vars = {"bg_image_url":"http:\/\/www.example.com\/wp-content\/themes\/singl\/images\/background.jpg"};
    /* ]]> */

    I tried to search without find its !!!
    I would to change h1 in h3 and the backgorund image’s url.

    Thanks and have a good time.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Moderator Kathryn

    (@zoonini)

    Automattic Happiness Engineer

    I used the multi-file search in my code editor to locate the code that generates:

    <h1 class="screen-reader-text">Post navigation</h1>

    You’ll find it in inc/template-tags.php:

    <h1 class="screen-reader-text"><?php _e( 'Post navigation', 'singl' ); ?></h1>

    The best way to make changes to a theme is to use a child theme, so your tweaks won’t be overwritten when updating the theme. Here are some guides in case you haven’t made one before:

    http://codex.wordpress.org/Child_Themes
    http://op111.net/53/
    http://vimeo.com/39023468

    /* <![CDATA[ */
    var singl_background_image_vars = {"header_bg":""};
    var singl_script_vars = {"bg_image_url":"http:\/\/www.example.com\/wp-content\/themes\/singl\/images\/background.jpg"};
    /* ]]> */

    The easiest way to change the background image is in the Customizer under “Background Image.” Is there a reason why you couldn’t go that route?

    Hi Kathryn,
    thanks.
    I use child theme, and I changed site’s url from http to https.
    Obviously I modified url in CMS general settings and all url are changed in https prefix (WordPress address: https:www.example.com).
    But the only url that did not modify (background image) is this that remains http instead https:
    {"bg_image_url":"http:\/\/www.example.com\/wp-content\/themes\/singl\/images\/background.jpg"};

    If I use Parent theme theme the url is right, with https prefix.

    If I use child theme the error returns.
    So I tried to delete all the files in child theme and let only style.css with the basic code:

    /*
    Theme Name:     Singl Child
    Theme URI:      https://www.example.com/
    Description:    Child theme for the singl theme
    Author:         Felice
    Author URI:     https://www.example.com/about/
    Template:       singl
    Version:        1.0.4
    */

    But the url did not change in https when I use child theme, even if the only file in use is style.css with code above.

    Thanks for your interest.

    Moderator Kathryn

    (@zoonini)

    Automattic Happiness Engineer

    Looking at the browser source for your site now, you seem to have the child theme active – https://www.apropositodi.it/wp-content/themes/singl-child/style.css – and the background image appears to be referencing an https URL:

    <style type=”text/css” id=”custom-background-css”>
    body.custom-background { background-image: url(‘https://www.apropositodi.it/wp-content/themes/singl/images/background.jpg&#8217;); background-repeat: repeat; background-position: top left; background-attachment: fixed; }
    </style>

    Could you please show me exactly where you’re seeing a reference to the http URL for the background image? In what file or in the source code of what page are you seeing it? Thanks.

    Yes, the url in code you cite is ok.
    In the bottom of page I have:

    /* <![CDATA[ */
    var singl_background_image_vars = {"header_bg":""};
    var singl_script_vars = {"bg_image_url":"http:\/\/www.apropositodi.it\/wp-content\/themes\/singl\/images\/background.jpg"};
    /* ]]> */

    Thanks.

    Moderator Kathryn

    (@zoonini)

    Automattic Happiness Engineer

    Ah, I see it now. That code is being generated dynamically by the theme’s functions. You’ll find references in functions.php and js/singl.js. I don’t think it’s possible to easily change it as it’s not a URL that’s hard-coded.

    Some thoughts:

    – is the URL in that code causing any harm since the actual URL that’s serving the image is an https one?
    – try downloading the image to your hard drive from here and re-uploading it through the Customizer

    Great Kathryn !!!
    With the upload of the same image I resolved.
    It did not cause error but was the only url remained without https prefix.
    Thanks s lot for your time.

    Moderator Kathryn

    (@zoonini)

    Automattic Happiness Engineer

    You’re very welcome, glad that worked. 🙂

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Files that contains specific code of Singl theme’ is closed to new replies.