• Resolved shackentertainment

    (@shackentertainment)


    Could anyone kindly help. I have created a child theme and find that the sidebar has moved to the bottom of the site and I cannot seem to find a way to put it back in it’s original position on the right of the screen.
    I have limited knowledge of css and php but I can certainly follow instructions.

    Many thanks

Viewing 10 replies - 1 through 10 (of 10 total)
  • Hey there,

    Please post a link to your site. Thanks!

    In the child theme did you import the parent theme styles?
    At the very beginning of the file you should have something like this:

    /*
    Theme Name: My Cool Child Theme
    Description: Some description here.
    Author: Joe Anybody
    Template: ParentThemeFolderName
    Version: 1.0
    */

    @import url(../parentThemeFolder/style.css);

    Are you able to give more detail about your child theme?

    wpismypuppet

    (@wordpressismypuppet)

    You should not use @import to get the parent stylesheet to your child theme. You should properly enqueue the style in the functions.php file:

    https://codex.www.ads-software.com/Child_Themes

    <?php
    function my_theme_enqueue_styles() {
    
        $parent_style = 'parent-style';
    
        wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );
        wp_enqueue_style( 'child-style',
            get_stylesheet_directory_uri() . '/style.css',
            array( $parent_style )
        );
    }
    add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );
    ?>

    Using wp_enqueue_style is the cleanest way to enqueue all styles as it has ways of checking for the existence of the file to be enqueued, and gracefully and silently fails in the event that it cannot find the file in question.

    Thread Starter shackentertainment

    (@shackentertainment)

    Hello WordPress superhero’s,

    I Popped out a while and returned to find your prompt responses to my shout for help. Thank you all.

    This is my first use of the support forum. The site in question is still under construction and as such was not live to for me to create a link to but a login to view/edit assist is created and available to whom ever I was going to lean on for help.

    I can however say thank you all and a special thank you to – wpismypuppet – I pasted the code in functions.php and it resolved the issue straight away. Genius….

    Again thank you all.

    As this is my first use of the support forum, I am writing a second assist request below before I cut and paste it on a new support ticket.

    My other query is how to make a permanent edit to the template I am working on, the main reason for the child theme in the first place.

    I need to edit a couple of elements in the text layout of the template to make it more suitable for my requirements, but I find that edits I have made with the editor do not appear on the front end of the site.

    I am squared eyed from sitting in front of this screen and
    now making silly mistakes and missing obvious things.

    What am I supposed to do? – What do I do? – where do I start?

    Many Thanks in advance

    Glad you got the style issue fixed.

    When you say template, is it a page or post type template?

    If it’s a page template, the template needs to be named in the comments at the top of the template file. Inside the administration area, in the page edit screen, select the template you created as the template to use for that page.

    If it’s a post type the template file needs to have a specific name. WordPress will then use it as the template for that post type.

    If it’s one of the template components, like header.php, the same naming rules apply as for the posts.

    This is a helpful diagram to help you decide what names you need for your template.

    Template Diagram

    Thread Starter shackentertainment

    (@shackentertainment)

    Hi jmag,

    Thanks for getting in touch. What I actually need to edit is the Theme template itself.
    A couple of the meta boxes in the main theme have text I want to change in the child theme – that had the sidebar issue…. I have tried the normal route of editing the css file, but my efforts do not seem to be working. To be truthful I don’t think I know what I am doing.

    Is there any advice you can give me on editing text that appears on the frontend using the editor and child theme.
    I am not sure if it is a style css or php thing.

    Many thanks

    What theme are you using? The parent theme may have some customizations that you are not aware of. Do you know the structure of the parent theme?

    Thread Starter shackentertainment

    (@shackentertainment)

    A theme called noise.
    Just realised I was a bit premature in my rejoicing.

    Can I send you some login details to view it. You might be able to assist better that way.
    Do I post it here or how do I get a username and password to you?…

    Definitely do not post your login details in a public forum like this and do not send your login details to anyone from this forum. It’s a violation of forum rules for anyone here to ask you for login details, as well. If you feel you need more help than this forum can provide, you should post at https://jobs.wordpress.net/ instead.

    Thread Starter shackentertainment

    (@shackentertainment)

    Hi Stephen,
    Thanks for the heads up and kind advice. First use of an open forum of this nature so I questioned the logic and thought I’d post a live ask first.

    Managed to resolve the problem with the template edit after trying a few options I came across in the documentation.
    Phew!

    Many thanks

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Child theme Sidebar has move to bottom of page’ is closed to new replies.