Viewing 15 posts - 1 through 15 (of 26 total)
  • Posted in: Pinpoint
  • #2166
    oskar
    Member
    Post count: 6

    I created a child theme but the child’s sytle.css isn’t loaded.  Is there something in the php I need to change as well?

    #2215
    Cosmin – SUPPORT
    Member
    Post count: 3851

    Hey,

    Please refer to this article: http://support.swiftideas.net/knowledgebase/how-to-create-child-themes/

    Regards,
    ————————————————————————————————————

    Cosmin
    Support Assistant

    #2280
    oskar
    Member
    Post count: 6

    Thank you for the quick response.   Is there another way to include the file?  The code
    require_once(get_stylesheet_directory_uri().’/includes/sf-options.php’);
    resulted in an error and I can’t change allow_url_include on the shared server.  Here’s the error:

    Warning: require_once() [function.require-once]: http:// wrapper is disabled in the server configuration by allow_url_include=0 in /home/content/59/9840059/html/wordpress/wp-content/themes/pinpoint-child/functions.php on line 64

    Warning: require_once(http://mysite.org/wordpress/wp-content/themes/pinpoint-child/includes/sf-options.php) [function.require-once]: failed to open stream: no suitable wrapper could be found in /home/content/59/9840059/html/wordpress/wp-content/themes/pinpoint-child/functions.php on line 64

    Fatal error: require_once() [function.require]: Failed opening required ‘http://mysiteorg/wordpress/wp-content/themes/pinpoint-child/includes/sf-options.php’ (include_path=’.:/usr/local/php5_3/lib/php’) in /home/content/59/9840059/html/wordpress/wp-content/themes/pinpoint-child/functions.php on line 64

    #2281
    oskar
    Member
    Post count: 6

    Update:

    Changing the code to

    require_once($_SERVER[‘DOCUMENT_ROOT’] . ‘/wordpress/wp-content/themes/pinpoint-child/includes/sf-options.php’);

    gave this error:

    Fatal error: Cannot redeclare sf_enqueue_styles() (previously declared in /home/content/59/9840059/html/wordpress/wp-content/themes/pinpoint-child/functions.php:114) in /home/content/59/9840059/html/wordpress/wp-content/themes/pinpoint/functions.php on line 128

    #2474
    Cosmin – SUPPORT
    Member
    Post count: 3851

    Hi,

    get_stylesheet_directory_uri() is a recommended WordPress core function for getting that path, it’s not something our theme does.

    Maybe try with get_bloginfo( ‘stylesheet_directory’ ) instead.

    Or, if you don’t plan on moving the site anytime soon or often, you can always hardcode the path to the file :

    require_once('http://mysite.org/wordpress/wp-content/themes/pinpoint/includes/sf-options.php');

    Regards,

    ————————————————————————————————————

    Cosmin
    Support Assistant

    #2738
    oskar
    Member
    Post count: 6

    Hi, thanks again for the quick response.

    I got around the path problem but now error is that it cannot re-declare classes.  Child theme sets something via child functions.php then parent function.php tries to re-write it and fails …

    “Cannot redeclare sf_enqueue_styles() (previously declared in child …. in parent …

    Can you confirm the original instructions:

    1. From the original theme, copy these files&folders to your child theme:

    – functions.php
    – /includes/options/
    – /includes/sf-options.php

    #3098
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    Hi there,

    I’ve attached the zip for a ready-made child theme for you. Hope that helps.

    – Ed

    #3116
    oskar
    Member
    Post count: 6

    Hi, thanks again for the quick reply and I appreciate your support.

    I already have a child theme set up.  The original problem was that the child’s style.css file isn’t loaded or is ignored.  Changes to the child’s header.php do work so it’s just the stylesheet that is the problem.

    As a workaround I will continue to put custom styles in the custom css box on the pinpoint general options page.

    #3120
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    The only line you need to ensure is set for the child theme css to work is in the parent’s theme functions.php file, make sure line 113 is set to:

    wp_register_style('main-css', get_stylesheet_directory_uri() . '/style.css', array(), '1.0', 'screen');  
    

    This is within the sf_enqueue_styles() function.

    – Ed

    #3131
    AuthenticUK
    Member
    Post count: 29

    Lost the menu navigation when creating a child theme on our development site. Hope a fix to this can be found – thought it was an easy WP path according to the documentation. There was another patch in the forum suggesting copying files… but this completely broke our dev site with a 500 error. Had to retrace & delete files on the server to restore.

    #3173
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    Ahh, that happens when you enable a child theme – you just have to go to Appearance > Menus and set it again in the dropdown 🙂

    – Ed

    #3184
    AuthenticUK
    Member
    Post count: 29

    No – once the http 500 comes up there is no access to the site.

    #3355
    oskar
    Member
    Post count: 6

    Thanks, this worked!
    wp_register_style(‘main-css’, get_stylesheet_directory_uri() . ‘/style.css’, array(), ‘1.0’, ‘screen’);
    It looks like you’d also need to rework the order the stylesheets are loaded in (parent style.css, custom-styles.css, child style.css) so I’m sticking with just using the custom css box on the pinpoint general options page.

    #3629
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    @AuthenticUK – We’ve included a pre-built child theme in the latest version, can you try downloading that and go from there?

    – Ed

    #3847
    allanrd
    Member
    Post count: 12

    What is the name and location of the child theme in 1.4.

    Also, If I started customizing in 1.4 will I still lose my customization is I

    update to 1.5  Pinpoint.  I have two folders  Pinpoint 1.4  and pinpoint.

     

    Allan

Viewing 15 posts - 1 through 15 (of 26 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register