Home Forums Pro Themes Bizlight Pro Adding text, formatting for devices

Tagged: ,

This topic contains 13 replies, has 2 voices, and was last updated by  wensolutions 3 years, 2 months ago.

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #8351

    Logical Growth
    Participant

    Hello, excuse me if I’m asking very basic questions but Iv’e looked everywhere for information on this and it doesn’t seem to be anywhere.

    I’m having trouble with a few things, most of which seem to be able to be sorted by ‘coding’. One example of something I want to sort out is putting a phone number in the top right hand side, above my menu. This, I know, was covered in this thread this thread. The problem I have with the answer given is when you say ‘update the code from line 252’. I know where custom CSS codes are, I know where the editor is, but after looking around I have no idea what you mean by this, nor do I know how to get to these ‘lines’. Another answer to a lot of problems have seem to be to ‘put text into the file ‘whatever.php’. This, again is something I have absolutely no reference to.

    I’d love a step by step idiots guide to doing this as I have no clue what your’e talking abut in most of the answers here. The main things I need fixing are; clickable phone number and email in the top right, changing the pictures so that they format properly on other devices, changing the size of the features image as it is too short and changing the main slider text so that it formats correctly on a mobile.

    here is my website,

    thank you

    #8379

    wensolutions
    Keymaster

    Since the type of customization discussed in previous thread needs some technical idea of editing code to go with flow of our instruction. So if you do not feel safe doing this all we recommend you to Hire a Customizer .

    They can help you edit the things in more clean and safer way without any hassle.

    In the meanwhile, those steps are still tried to summarized below in hoping that you will have no problem following them through.

    1. Make Child Theme.
    2. Copy file inside inc/hooks/header.php from parent to the child theme with same folder structure
    3. In header.php before the start of nav tag paste the following phone HTML code.

    <div class="contact-num">
    <a href="callto:+123456789" class="call-us">Call Us : +123 456 7890</a>
    </div>

    4. To position this contact number to top right, paste the following CSS code in your child theme’s style.css file.

    .contact-num {
        float: right;
        padding-top: 17px;
        padding-right: 34px;
    }
    
    .contact-num a.call-us {
        color: #FFFFFF !important;
    }

    For rest of the process, you may need to play with custom css properties / values to adjust the element more accurately as per your requirements.

    Hope we were able to give you some ideas to achieve this requirement in easy way.

    #8696

    Logical Growth
    Participant

    I have found the file header.php, the problem I have with this is that I don’t know where I should be copying it to. You say copy to child theme, but how do I do this? I copy the file to a child theme folder? I dont think I have one. You go on to say ‘in header.php before the start of nav’. I again have trouble with this as I dont know how to get into header.php as windows doesnt know which program to open the file with.

    Thanks a lot for the help.

    #8728

    wensolutions
    Keymaster

    Hello @Logical Growth

    Ok since you are having trouble with many things we will try to explain our best from our side.
    Follow the steps carefully.

    First you need to create and activate child theme. Reference here for child theme.
    Reference here for child theme:

    https://codex.wordpress.org/Child_Themes
    https://premium.wpmudev.org/blog/how-to-create-wordpress-child-theme/

    After you have successfully created and activated child theme. The main files within you child theme folder will be functions.php file and style.css.
    Now in main theme’s folder inside inc/hooks you will see header.php file.
    Now you need to copy this file with similar folder structure in child theme like child theme’s folder/inc/hooks/header.php.
    Now you need to edit this header.php file in child theme’s folder.

    In this file in line no: 259, you will below line of code:

    
    <div class="col-xs-12 col-sm-9 col-md-8">
    

    Now just below this line copy and paste below code:

    
    <div class="contact-num">
        <a href="callto:+123456789" class="call-us">Call Us : +123 456 7890</a>
    </div>
    

    Again in style.css file of child theme copy and paste below CSS:

    
    .contact-num {
        float: right;
        padding-top: 17px;
        padding-right: 34px;
    }
    
    .contact-num a.call-us {
        color: #FFFFFF !important;
    }
    

    Note: If you having trouble in opening the files then you can download the editor from here:
    http://www.sublimetext.com/2

    Install the editor sublime text and you will be able to open the file with this.

    Again if you have having trouble manually creating the child theme then you can find plugin which will help you to create the child theme for you easily.

    Or here is the link for one of the plugin.
    https://wordpress.org/plugins/one-click-child-theme/

    Hope this will help you.

    Best Regards!!!

    #8874

    Logical Growth
    Participant

    Thank you for being patient with me, I have already made a child theme before this thread was made and have located the folder. It has four files, two of which are functions.php and style.css. I have also located the header.php file inside inc/hooks in the parent theme.

    Where I am now struggling is when you say “Now you need to copy this file with similar folder structure in child theme like child theme‚Äôs folder/inc/hooks/header.php.” I have tried to copy the file but it does not paste, or move to my child theme folder. When you say ‘similar folder structure’ what do you mean? Am I pasting the whole file? Should my child theme already have this file structure?

    Thanks again

    #8876

    wensolutions
    Keymaster

    Hello @Logical Growth

    What I meant was the child theme’s folder should contain the functions.php, style.css and a folder inc/hooks/header.php.
    The attachment shows the folder structure of the child theme’s folder.
    https://www.dropbox.com/s/o9thf412234cab4/a.PNG?dl=0

    Hope this will help you.

    Regards!!

    #8878

    Logical Growth
    Participant

    Hello, thanks! I actually figured that out, but now have a new problem!

    I pasted the code:
    <div class=”contact-num”>
    Call Us : +123 456 7890
    </div>
    Into the functions file on line 259 as asked and went to see if it had worked on my website. It didn’t work and shut my whole site down, so I changed the code back to exactly how it was before. Now http://www.logicalgrowth.com is still down and I can’t even access my wp-admin. It just tells me my ‘page is not working’

    #8879

    Logical Growth
    Participant

    Also, every time I open the header.php file, it downloads a new file to my hosting and then opens in sublime. Is this normal? How am I supposed to save the changes? Do they save to the desktop?

    #8889

    wensolutions
    Keymaster

    Actually your site appears down so you should talk to your hosting. It does not seem to relate with the code as you also said you undo the code changed in functions.php .

    Also to confirm this, you can restore the particular file to see if site goes up. If still not, it is related to the problem with your hosting.

    Let us know how it goes.

    #8900

    Logical Growth
    Participant

    Hello. My site was down because I was moving the header.php file from my parent folder into my child theme folder. Every time I move the file to my child theme, my website shuts down. Is this because I need to copy the file? Because when I copy the file it doesn’t work.

    I believe I may have downloaded the child theme incorrectly (before I started this thread) because I only have four files in my child theme folder.

    #8901

    wensolutions
    Keymaster

    As already stated in above step :

    2. Copy file inside inc/hooks/header.php from parent to the child theme with same folder structure

    Create same folders in similar nested path as mentioned above. Yes, you need to copy the file header.php from parent to your child theme folder and modify it there.

    It seems like you are having tough making changing and understanding the flow, so we advise you to take help of our customizer.

    #8902

    Logical Growth
    Participant

    It’s your grammar I’m having difficulty with. I can’t understand what your’e actually trying to say. The phrase “Create same folders in similar nested path” contradicts itself

    #8903

    Logical Growth
    Participant

    Okay. I have now figured out how to edit and add the code (finally!). However, the code does not work. You can check my website. I entered the code below 259 and exactly how you suggested, but still no changes

    #8910

    wensolutions
    Keymaster

    Hello @Logical Growth

    Hope you are now started to get what I meant but not enough though.
    You needn’t need to make any change to any of the files of parent theme.You need not need to delete or cut and paste the file.
    You just need to copy that file from parent theme and paste it in child theme’s folder.
    After you have finished copy that file now you need to make changes to the file that you have in child theme’s folder.
    And copy code as suggested in header.php file not in functions.php file.
    And in style.css(Of child theme) file do as suggested in above replies.

    Regards!!!

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

You must be logged in to reply to this topic.