WordPress.org

Ready to get started?Download WordPress

Forums

BizSphere
Add a link using child thene (2 posts)

  1. egger33
    Member
    Posted 5 months ago #

    In BizOne layout, the left section heading is a link. I want to add another link below it which I can do by replacing the link in index_bone.php by two new links left_section_headline1 and left_section_headline2 as follows:

    <a href="<?php if( of_get_option('left_section_link') )
     	{ echo esc_url( of_get_option('left_section_link') );}else { echo '#';}?>">
        <?php
        if( of_get_option('left_section_headline1') ){
            echo esc_html( of_get_option('left_section_headline1') );
        }else {
            _e('Design',  'BizSphere');
        }
        ?>
    </a>  
    
    <a href="<?php if( of_get_option('left_section_link') ){ echo esc_url( of_get_option('left_section_link') );}else { echo '#';}?>">
        <?php
        if( of_get_option('left_section_headline2') ){
            echo esc_html( of_get_option('left_section_headline2') );
        }else {
            _e('Design',  'BizSphere');
        }
        ?>
    </a>

    I then changed option.php as follows:

    $options[] = array( "name" => __("Headline", 'BizSphere' ),
    				"desc" => __("Enter the headline", 'BizSphere' ),
    				"id" => "left_section_headline1",
    				"type" => "text");		
    
    $options[] = array( "name" => __("Headline", 'BizSphere' ),
    				"desc" => __("Enter the headline", 'BizSphere' ),
    				"id" => "left_section_headline2",
    				"type" => "text");

    How can I do the same thing in my Child-Theme ?

  2. egger33
    Member
    Posted 5 months ago #

    OK - I found a way to solve my problem. I put all files back to the original condition, then I copied index_bone.php and option.php from the BizSphere Theme directory and pasted into my Child-theme directory, then made the above changes. But that seems a little awkward because if the Theme gets upgraded, the files index_bone.php and option.php in my Child-theme may be obsolete.

    Is there a better way to do this ?

    p.s. My website is andersonvalleyfire.org

Reply

You must log in to post.

About this Theme

About this Topic