Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter Bittencourt

    (@bittencourt)

    Hello, Amim…
    Do I need to create a child theme to insert this code?

    Can’t update the theme with this social media, which is so widely used today?

    Yes, you need to use the oceanwp child theme to add the code.
    https://docs.oceanwp.org/article/90-sample-child-theme

    Thread Starter Bittencourt

    (@bittencourt)

    Amin,

    Functions.php would be like this?

    <?php
    /**
     * Child theme functions
     *
     * When using a child theme (see http://codex.wordpress.org/Theme_Development
     * and http://codex.wordpress.org/Child_Themes), you can override certain
     * functions (those wrapped in a function_exists() call) by defining them first
     * in your child theme's functions.php file. The child theme's functions.php
     * file is included before the parent theme's file, so the child theme
     * functions would be used.
     *
     * Text Domain: oceanwp
     * @link http://codex.wordpress.org/Plugin_API
     *
     */
    
    /**
     * Load the parent style.css file
     *
     * @link http://codex.wordpress.org/Child_Themes
     */
    function oceanwp_child_enqueue_parent_style() {
    	// Dynamically get version number of the parent stylesheet (lets browsers re-cache your stylesheet when you update your theme)
    	$theme   = wp_get_theme( 'OceanWP' );
    	$version = $theme->get( 'Version' );
    	// Load the stylesheet
    	wp_enqueue_style( 'child-style', get_stylesheet_directory_uri() . '/style.css', array( 'oceanwp-style' ), $version );
    	
    }
    add_action( 'wp_enqueue_scripts', 'oceanwp_child_enqueue_parent_style' );
    
    /**
     * Add new social options in the Customizer
     */
    function my_ocean_social_options( $array ) {
    
    	// Whatsapp icon
    	$array['whatsapp'] = array(
    		'label' => 'Whatsapp',
    		'icon_class' => 'fa fa-whatsapp',
    	);
    
    	// Return
    	return $array;
    
    }
    add_filter( 'ocean_social_options', 'my_ocean_social_options' );

    Yes, it is correct.

    Thread Starter Bittencourt

    (@bittencourt)

    Amim,
    With the functions.php of the child theme, my Menu is unconfigured as below image. What would it be?

    Image

    Have you imported the oceanwp settings into the child theme? Follow the documentation to fix it – https://docs.oceanwp.org/article/505-import-the-parent-theme-customizer-settings-into-your-child-theme

    Thread Starter Bittencourt

    (@bittencourt)

    Hi Amim!
    I understood that by creating the child theme and activating it, wordpress would be accessing the extra settings I had placed in the files plus the standard oceanwp files.

    So I have to import all oceanwp into the child theme and then include the extra configuration I want to make it work correctly? If there is an update on Oceanwp will I ever have to do this?

    Yes, import all the oceanwp settings into the child theme. If you are using the child theme, then no issue. Just update the theme if an update is available, nothing will be lost. But remember, all the modification should be done via child theme. don’t edit the parent theme file.

    Thread Starter Bittencourt

    (@bittencourt)

    Hello
    I returned to work on my site again due to past issues. I stopped at the child theme again when importing settings from the parent theme to the child theme. See if I’m on the correct screen to import (file attached). I put to export all content but generates an .xml file. I have to rename the extension to .dat. Was this it?

    image

    Thread Starter Bittencourt

    (@bittencourt)

    Hello,
    I found the import / export. Now everything went well. Thanks.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Icon Whatsapp in Social Menu’ is closed to new replies.