WordPress.org

Ready to get started?Download WordPress

Forums

Genesis Connect for WooCommerce
[resolved] Where to put code in functions.php ? (7 posts)

  1. RichardNJ
    Member
    Posted 1 year ago #

    I just installed the WooCommerce plugin successfully, then tried installing/activating this Genesis Connect plugin, however I get a screen with this message:
    ____
    Sorry! In order to use the Genesis Connect for WooCommerce plugin you need to do the following:

    Add this code to your child theme's functions.php:
    add_theme_support( 'genesis-connect-woocommerce' );
    ____
    Do I just put that code anywhere in the functions.php or a specific place?

    Thanks for any assistance

    http://wordpress.org/extend/plugins/genesis-connect-woocommerce/

  2. jeromeeee
    Member
    Posted 1 year ago #

    Hi! You can put the line of code anywhere between the <?php and ?> in the functions.php - At least that is how I got it to work.

  3. studiograsshopper
    Member
    Plugin Author

    Posted 1 year ago #

    Yes, jeromeeee is correct.

  4. YacineBaroudi
    Member
    Posted 1 year ago #

    studiograsshopper — unable to get passed this error screen >>http://j.mp/19a3Zvv although placed the code in functions.php >> http://j.mp/ZUWY1i
    Any screenshot of where this code goes exactly?

    Thanks!

  5. EnergizerGirl
    Member
    Posted 1 year ago #

    Yeah, could we get more specifics....of what EXACTLY should be added and WHERE and if there is anything else to add? every time I get one of these little instrutions it never works because there is some impleied prior knowledge!

    add_theme_support( 'genesis-connect-woocommerce' ); is the sentence, can you show us where in this mess we can plop it?

    not sure what all the line breaks and codes mean so telling us to insert it anywhere doesn't wok! thanks!

    ==============================================================

    Theme Name: Expose Child Theme
    Theme URL: http://www.studiopress.com/themes/expose
    Description: Expose is a 2 or 3-column Widget-ready child theme created for the Genesis Theme Framework.
    Author: StudioPress
    Author URI: http://www.studiopress.com
    Version: 1.0.1

    Template: genesis

    The CSS, XHTML and design is released under GPL:
    http://www.opensource.org/licenses/gpl-license.php
    */

    body {
    background: #D5D5D5;
    color: #555555;
    font-size: 12px;
    font-family: Arial, Tahoma, Verdana;
    margin: 0 auto 0;
    line-height: 20px;
    }

    /***** Hyperlinks ********************/

    a, a:visited {
    color: #0088B3;
    text-decoration: none;
    }

    a:hover {
    color: #0088B3;
    text-decoration: underline;
    }

    a img {
    border: none;
    }

    a:focus, a:hover, a:active {
    outline: none;
    }

    /***** Wrap ********************/

    #wrap {
    margin: 0 auto 0;
    position: relative;
    }

    /***** Header ********************/

    #header {
    background: url(images/header.png);
    width: 960px;
    height: 100px;
    margin: 10px auto 0;
    -moz-box-shadow: 0 0 3px #BBBBBB;
    -webkit-box-shadow: 0 0 3px #BBBBBB;
    }

    #title-area {
    width: 460px;
    float: left;
    margin: 0;
    padding: 20px 0 0 0;
    overflow: hidden;
    }

    #title-area #title {
    color: #FFFFFF;
    font-size: 30px;
    font-family: Georgia, Times New Roman, Trebuchet MS;
    font-weight: normal;
    margin: 0;
    padding: 0 0 0 20px;
    text-decoration: none;
    line-height: 36px;
    }

    #title-area #title a, #title-area #title a:hover {
    color: #FFFFFF;
    text-decoration: none;
    }

    #title-area #description {
    color: #FFFFFF;
    font-size: 14px;
    font-style: italic;
    font-weight: normal;
    margin: 0;
    padding: 0 0 0 20px;
    }

    #header .widget-area {
    width: 488px;
    float: right;
    margin: 0;
    padding: 20px 0 0 0;
    }

    #header .widget-area p {
    margin: 0;
    padding: 0 0 5px 0;
    }

    /***** Image Header - Partial Width ********************/

    .header-image #title-area, .header-image #title-area #title, .header-image #title-area #title a {
    display: block;
    float: left;
    width: 460px;
    height: 100px;
    padding: 0;
    text-indent: -9999px;
    overflow: hidden;
    }

    .header-image #title-area #description {
    display: block;
    overflow: hidden;
    }

    /***** Image Header - Full Width ********************/

    .header-full-width #title-area, .header-full-width #title-area #title, .header-full-width #title-area #title a {
    width: 960px;
    }

    /***** Header Right Navigation ********************/

    #header ul.nav, #header ul.menu {
    width: auto;
    float: right;
    list-style: none;
    color: #FFFFFF;
    text-transform: uppercase;
    }

    #header ul.nav li, #header ul.menu li {
    float: left;
    list-style: none;
    margin: 0;
    padding: 0;
    }

    #header ul.nav li a, #header ul.menu li a {
    background: #333333;
    color: #FFFFFF;
    display: block;
    font-size: 12px;
    margin: 0;
    padding: 6px 10px 5px 10px;
    text-decoration: none;
    border-right: 1px solid #666666;
    position: relative;
    }

  6. EagleEye9055
    Member
    Posted 10 months ago #

    Ok, here's an example of where you can put the snippet.

    In your functions.php file, you will already likely find add_theme_support function calls.

    In my original functions.php file, I have the following starting after line 20 in the file:

    /** Add support for custom background */
    add_theme_support( 'custom-background' );
    
    /** Sets Content Width */
    $content_width = apply_filters( 'content_width', 680, 680, 1020 );

    I added the genesis-connect-woocommerce line after the add_theme_support line. So now my functions.php file has this:

    /** Add support for custom background */
    add_theme_support( 'custom-background' );
    
    /**Add support for genesis-connect-woocommerce plugin */
    add_theme_support( 'genesis-connect-woocommerce' );
    
    /** Sets Content Width */
    $content_width = apply_filters( 'content_width', 680, 680, 1020 );

    As other users have said, when they say anywhere, it is really anywhere. But if you are totally new to php and have no idea where a statement ends and where another starts, a good idea is to add your line after a blank line in the functions.php file.

  7. studiograsshopper
    Member
    Plugin Author

    Posted 10 months ago #

    As EagleEye9055 says, it can go anywhere.

    However, just one proviso - if your functions.php file ends with a closing php tag, ie:
    ?>
    make sure sure you add the code BEFORE this closing tag.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.