Forum Replies Created
-
AuthorPosts
-
June 19, 2017 at 11:23 pm in reply to: Add alternate primary navigation menu just for home page? #207964okiemanMember
Thanks for that link!! I was trying to squeeze out information because I have a contract gig where about half the clients are on WordPress. I've been working with it about 2 years and before that a very different platform: ColdFusion. So I'm collecting ideas on how to handle challenges.
June 19, 2017 at 11:10 pm in reply to: Add alternate primary navigation menu just for home page? #207962okiemanMemberI really like options 1-3. Looks like #3 could all be done in the admin area? Do you have an opinion about pros/cons of #1 and #2?
okiemanMemberClosed
okiemanMemberIt wasn't until this past week that I realized our efforts to load custom CSS was in the category of a grand-child theme. Frustrating, because it could mean that we will have manually customize the Outreach Pro style sheet every time the theme is updated. I wish the vendor for this theme had let us know what we were getting into.
The site is stable now, after deleting the entire child (grandchild) directory via FTP. And manually inserting our own CSS in the style sheet located in the Outreach Pro directory. I have considered modifying the parent theme functions.php so that the correct paths for the two include files are hard coded. But even that is starting to look like experimentation.
Have searched the Web for other people using Outreach Pro, and any comments about how they achieved child theme functionality. So far, no solutions.
okiemanMemberSome preliminary research, from the error messages. For unknown reasons, activation of the child theme functions.php is causing PHP in the parent theme functions.php to attempt including files from the wrong locations.
wp-content/themes/outreach-pro-child/lib/theme-defaults.php
This part of the path is only accurate if you remove "-child"And the following init.php is actually located in the Genesis directory ...
wp-content/themes/outreach-pro/lib/init.php
But I don't yet know enough about PHP to revise the parent functions.php so that it looks for these in the correct locations??
okiemanMemberLinks in post above for Dropbox (errors in plain text) and zip file (child theme that crashed the site).
okiemanMemberI'm headed home for the evening. Will pick this up tomorrow. Also here is download of child theme as a zip ...
okiemanMemberEach time I drop the error message text between the "code" tic marks, and click Submit for the post, it shoots me back to the forum entry page. Tried logging out and back in, same problem. I think StudioPress chokes on some of the words in the error, like the one that starts with "f" ends in "atal"
The imgur embed code broke even worse. Please try right clicking to new tab on the above image load attempt.
okiemanMemberThe child theme installed fine then crashed our site on activation. Deleted it from server then re-installed Outreach Pro. Here are errors we saw instead of our site content.
okiemanMemberDNS went out at my ISP, and they want 24 hours to repair. I'll be back when they are done!
okiemanMemberI can install the functions file that was working six months ago. It will be this evening.
okiemanMemberChristoph, I used Chrome's F12 diagnostic tool to look at the navigation bar links. That told me the CSS was from the default style sheet, not the child theme CSS. That's when I started thinking that my functions.php within the child theme was no longer working. I thought one of the recent updates to Genesis might have caused a problem.
The link below goes to the page where I used PHP that generated fatal errors. In my research, I have seen some WordPress authors say that when they load a child theme, they replace some of this language with names that are specific to their own site.
okiemanMemberSolved.
Not a PHP problem. This turned out to be A) Exact wording of the child-theme CSS header, and B) Double-checking the admin dashboard to make sure there were no indications that the child-theme had been designated as "broken". (Or that the parent theme needed to be installed.)Thanks all!
okiemanMemberThe plugin makers have referred me back, since calling a child theme stylesheet is a function of the parent theme. They did at least suggest this cleaner version of my code, but again it is not working. I have tried putting this alone as the functions.php file in the child directory, and appending this snippet to the functions.php in the parent dir ...
function my_theme_child_style() {
wp_enqueue_style( 'parent-theme-style', get_template_directory_uri() . '/style.css', array() );
wp_enqueue_style( 'child-theme-style', get_stylesheet_directory_uri() . '/child-style.css', array( 'parent-theme-style' ) );
}
add_action('wp_enqueue_scripts', 'my_theme_child_style', 25 );okiemanMemberNote:
I have also now posed this question to the folks who make the plugin (Modern Tribe).okiemanMemberBrad, I like the simplicity of that idea. I tried it, and Google Chrome inspector tells me it is still getting the padding value from the plug CSS. Here's my custom CSS follow by the test page ...
#tribe-events-content{margin-bottom:48px;padding:2px 17px 2px 18px !important;position:relative}
okiemanMemberPartial progress. The child theme now loads, with a glitch regarding order. One of the items in the child CSS targets padding on a calendar plugin page. Somehow the calendar plugin's CSS supersedes my tweak despite the following effort to make mine load last:
function my_theme_child_style() { $base = get_stylesheet_directory_uri(); wp_enqueue_style('child-theme-style', get_bloginfo( 'stylesheet_directory' ) . '/outreach-pro-child/child-style.css', array(), CHILD_THEME_VERSION); } add_action('wp_enqueue_scripts', 'my_theme_child_style', 25 );
okiemanMemberVictor that's interesting. Although my css is already formatted like that, I had not known how get_template_directory works before you described it. I'll be testing revisions this week and will report on progress. Thanks.
okiemanMemberMy tests have appended code. I may be biased, but I don't believe the problem thus far has been lacking the sense to simply add one line of code. What has been frustrating is finding various plausible solutions posted by people who seem to know what they're talking about, and having their code not work for me.
So, before I test your recommendation, I have a question that may help me better understand this. I've been told the child theme directory must exist separate from the parent theme but inside the overall themes directory. Yet, I keep seeing recommended snippets which give a URL that simply says "'/child-style.css'" I'd very much like to know how this code is actually directing the server to go up one level (from the functions.php in the parent theme folder), then across to the child theme folder containing the custom CSS?
okiemanMemberI keep tinkering with this. If I use the Chrome Inspector (F12), it continues to indicate pulling CSS from the same old sources, not the child CSS. What is the recommended way to debug this?
-
AuthorPosts