Digital experiences for all disciplines
New Landing › How can we help? › Themeforest Theme Support › Pinpoint › Child Theme
New Landing › How can we help? › Themeforest Theme Support › Pinpoint › Child Theme
- This topic has 25 replies, 6 voices, and was last updated 11 years by
AuthenticUK.
-
Posted in: Pinpoint
-
April 19, 2013 at 1:10 am #2166
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?
April 19, 2013 at 4:38 pm #2215Hey,
Please refer to this article: http://support.swiftideas.net/knowledgebase/how-to-create-child-themes/
Regards,
————————————————————————————————————Cosmin
Support AssistantApril 20, 2013 at 3:05 am #2280Thank 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
April 20, 2013 at 3:14 am #2281Update:
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
April 22, 2013 at 7:44 pm #2474Hi,
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 AssistantApril 24, 2013 at 3:09 am #2738Hi, 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.phpApril 26, 2013 at 6:46 pm #3098Hi there,
I’ve attached the zip for a ready-made child theme for you. Hope that helps.
– Ed
April 27, 2013 at 12:04 am #3116Hi, 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.
April 27, 2013 at 6:24 am #3120The 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
April 27, 2013 at 12:30 pm #3131Lost 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.
April 27, 2013 at 8:51 pm #3173Ahh, that happens when you enable a child theme – you just have to go to Appearance > Menus and set it again in the dropdown 🙂
– Ed
April 27, 2013 at 10:16 pm #3184No – once the http 500 comes up there is no access to the site.
April 30, 2013 at 1:12 am #3355Thanks, 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.May 1, 2013 at 10:56 pm #3629@AuthenticUK – We’ve included a pre-built child theme in the latest version, can you try downloading that and go from there?
– Ed
May 3, 2013 at 5:19 pm #3847What 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
-
Posted in: Pinpoint
You must be logged in and have valid license to reply to this topic.