Okay
  Public Ticket #260338
Changing PHP for child theme
Closed

Comments

  • claire started the conversation

    Hi. I'm loving this theme!!!!
    Just have a few questions:

    I am using a child theme so I don't lose any CSS changes during theme updates. Probably a silly question, but if I need to make any PHP changes, should I also do that within the child theme? For example, I want to change the number of recent posts that show from 4 to 2 or 3. I found the answer how to do it in a previous post http://themenectar.ticksy.com/ticket/242204/searc... I found the php file in the parent theme. Should I copy that file to the child theme  putting into the same fold hierarchy and edit it there?

    I'm using a full screen Nectar slider on the home page and have included the down arrow. Is there a way to change this arrow to text, for example 'Read more'?

    I have also included 2 buttons in the slider. One links to another page and the other is to link further down the page. I've managed to get that to work but it jumps down. I would like it to work exactly as the arrow does. Moving down to the same point as the arrow moves to and shows the parallax effect. Is this possible?

    Sorry for the long questions. I appreciate any help.

    Claire



  •  1,070
    ThemeNectar replied

    Hey Claire! Really sorry for the delay -

    1. Yes - but you'd also need to change the path to the file so it reflects your child theme directory in the functions.php - so in your functions.php file add this with you path:

    function nectar_shortcode_processing(){
    	require_once ( 'nectar/tinymce/shortcode-processing.php' );
    }
    

    2. This would require modding the functions.php file at the nectar slider section :)

    3. In order to get an animated scrolling effect with anchor links you'd need to use a plugin like this http://wordpress.org/plugins/page-scroll-to-id/

    Cheers :)

  • claire replied

    Hello

    Thank you for your reply. 

    I've installed the plugin that you suggested and from the demo I can see that it does exactly what I need. Trouble is, for the life of me, I can't figure out how to use it. The instructions in the plugin are confusing and I can't find an answer that's easy to follow in their support either.

    On my home page I have a Nectar Slider with a button on it. I want to make that button work like the arrow. If you are familiar with using the plugin, please could you tell me exactly what I need to put in the Button Link box in the slider settings, and also how I should write the #id and where.

    I've tried the following:

    In Button Link box
    <a href="#first" rel="m_PageScroll2id"></a>
    (but this messes up the button)

    On Home page
    I want it to jump to the top of the first row, so in edit row I've added an extra class name of #first


    Also, how can I add some text above or in place of the down arrow?

    Thanks for your help

    Claire


  •  1,070
    ThemeNectar replied

    Hey again!

    Here's a ticket where I've covered a guide for using the plugin:  http://themenectar.ticksy.com/ticket/183626 - let me know if you still have questions :)

  • claire replied

    Thank you for your help. I've just about managed to figure it out. Just having one small issue with it that hopefully you can help with.

    I've added the following code into my CSS so that when the button is clicked it jumps to the same position that your arrow jumps to. It works perfectly in Firefox, but not in Safari or Chrome and I suspect, Internet Explorer, although I'm on a Mac so can't check. Do you by any chance know the fix for that or if there's a better way that I should be doing it.

    My site isn't quite finished. I still need to replace the main photos and finish some text, but I've disabled the landing page in case it helps for you to see it http://www.liquidmoon.co.uk

    /*---blue button position after smooth scroll---*/

    #position1 {
    transform: translate(0px, -100px);
    }

    @media (max-width: 1024px) {
    #position1 {
    transform: translate(0px, 0px);
    }
    }

    One other question whilst I'm here. On my home page I've shown 4 Recent Projects. I don't particularly want to show the carousel buttons above it, so I have switched them off. Trouble is in responsive sizes, it now only shows 3, 2 and then 1 project and the viewer can't then see the others. On you demo http://themeforest.net/item/salient-responsive-mu... as the window responds, it shows the projects in a column so it continues to show all of them. I can't figure out how to do this in mine. Can you help please.


    Absolutely love this theme!!!

    Thanks again for your help

    Claire

  •  1,070
    ThemeNectar replied

    Hey again!

    1. I can't see any anchor links on your home page - if you've disabled them is there any way I could see so I coudl assist?

    2. I'm not actually using a recent projects element which is why the functionality is different. If you want that look - just use an actual portfolio element with the constrain max columns to 4 option selected :)

    Cheers

  • claire replied

    Hi

    Thank you. I'll try that with the portfolio.

    The button was only active on the first slide. I've now activated on the other slides. They jump to div id "position1" located before the first row in the main content area however it's empty so not visible.

    In the code it's here (in bold at the end):

    <div class="container-wrap" style="padding-bottom: 0px;">

        <div class="container main-content">

            <div class="row">

                <div id="fws_53fe8c3268c26" class="wpb_row vc_row-fluid full-width-section standard_section " style="background-color: rgb(255, 255, 255); padding: 0px 186px; margin-left: -186px; visibility: visible;">

                <div class="col span_12 dark left">

                <div class="vc_span12 wpb_column column_container col no-extra-padding" data-delay="0" data-animation="" data-hover-bg="">

                <div class="wpb_wrapper">

                <div class="wpb_raw_code wpb_content_element wpb_raw_html">

                <div class="wpb_wrapper">

                <div id="position1" class="_mPS2id-t mPS2id-target mPS2id-target-first"></div>

    Thank you

    Claire

  •  1,070
    ThemeNectar replied

    Hey Claire! This should work in all browsers

    #position1 {
      position: absolute;
      top: -50px;
    }
    
    The reason you're seeing it scroll to different places with your current code is because of the admin bar difference from when you're logged in on one browser and out on the rest. The snippet I gave you will line up when the users are not logged in which will be the case with most I assume
  • claire replied

    That works perfectly. Thank you.

    Claire