Support » Theme: Customizr » Change the location of tags

Viewing 13 replies - 1 through 13 (of 13 total)
  • Try this snippet

    Tried it and an error message
    “Parse error: syntax error, unexpected ‘}’… “

    is pointing to line 355 which in my code is the second to last line of this code:

    ?>
                <hr/>
            <?php
        }
    }

    I tried deleting one }, adding ?>… hasn’t worked.

    Both } are needed if I look at the Snippet. But not sure what else you have in your functions.php which would cause the problem – may be a missing { or } somewhere else?

    Hummm… Just tried it again. Haven’t changed a thing with the rest of the functions.php code and just added this code to the bottom.

    Can you post your functions.php code here for review, and add the link in this post.

    See here for more details

    That was easy! Here it is:
    http://pastebin.com/Axck5iGh

    Oh dear. It looks like you’ve been pasting into the theme’s functions.php file and not your child theme’s functions.php. You need to:

    1. Restore the original functions.php for your Customizr version
    2. Set up a functions.php file in your child theme and
    3. Add your extras to the child theme’s functions.php
    4. .

    Let us know what help you need with any of those steps.

    Are you sure? I am working in my child theme exclusively.
    This is what comes up when I open my editor:
    customizr-child: Theme Functions (functions.php)

    OK. Here’s the fuller analysis.

    The header of that file has copied parts from the theme’s header and contains some core theme functions, such as function tc__, which is now badly out of date in your version.

    It also contains some snippets that are working code.

    It contains one snippet that has just been pasted in with no modification where modification is needed:

    add_action ('__after_header', 'accordion_slider');
    function accordion_slider() {
    //checks that we display the home page
    if ( !tc__f('__is_home') )
    return;
    
    //renders the new slider
    <strong>YOUR_SLIDER_RENDERING_FUNCTION()</strong>//if it is a shortcode, then use the do_shortcode() function
    }

    The YOUR_SLIDER_RENDERING_FUNCTION() is meant to be replaced with your own function, not simply pasted as-is. This was explained to you in this post. You then added the slider function that your developer gave you, but rather than inserting it, you added it later on in the file.

    I would suggest that you follow the steps I outlined above, but that you ask your developer to help you out in rebuilding the new functions.php.

    Ignore the <strong> tag in the above code. I was simply trying to emphasise the erroneous line.

    Forgot to add: the reason you file is breaking short-term is that you have two “* /“s (with an extra space) which should be “*/“s. Then, later on (around line 280) you have an extraneous “?>“.

    Use an editor like Sublime Text to pick up syntax errors like this.

    Thanks Electric Feet. I am the developer, so I’ll have to find someone to help me!
    Thanks for the tip on Sublime Text.

    ST was one of the best investments I made when I started, and you can even use it for free to prove its’ usefulness.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Change the location of tags’ is closed to new replies.