Divi WordPress Theme
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

WordPress fix Reply To: Can’t display my code in any widget

Discussion in 'Misc WordPress Requests' started by sounds, Feb 1, 2018.

  1. sounds

    Guest

    Reply To: Can’t display my code in any widget, by sounds

    There is a php file for displaying the app.
    That’s what I pasted into the PHP Code widget.
    This is how it looks in the theme sidebar area.

    Actually I’m using a shorter version of the above document for the widget area.

    I’m not sure how to create a function for that,
    But I get the idea of calling it externally rather than
    pasting the code for each app into a widget area.

    I see this enqueue function in my functions.php

    /**
    * Enqueue the css and js files in child theme
    *
    */

    function child_enqueue_scripts( $file_dir,$file_url ){
    $child_style = str_replace( get_template_directory(),get_stylesheet_directory(),$file_dir);
    if(file_exists($child_style)){
    return str_replace( get_template_directory_uri(),get_stylesheet_directory_uri(),$file_url);
    }else{
    return $file_url;
    }
    }

    Reply To: Can’t display my code in any widget
     
    #1

Share This Page

Monarch Social Sharing Plugin