Pre-apologizing for what may be an unbearably-long post.
I'm using Atahualpa 3.4.9 at http://www.roncrocker.com.
3 questions:
a) How do I make a CSS class for special paragraph formatting work in atahualpa (or wordpress or whatever may be at the root of the problem I describe below)?
b) How do I make child themes work with atahualpa, particularly on the PHP side?
c) What is the right way for me to do what I want to do?
Given those questions, here is the context:
I'm working on the next monthly report from the beer dinner - here's an example page. I have various section header-like things that I drop in the report and indented paragraphs for which the HTML code looks like:
Code:
<p><strong>Pregame Festivities: <em><span style="color: #339966; background: yellow;"> B </span></em></strong></p> <p style="padding-left: 30px;"><em>These dinners tend to open with a complimentary pint of beer from the guest brewery. It’s not like you don’t get enough beer throughout the evening, but it’s a nice ice breaker.</em></p>
Code:
<p>[course name="Pregame Festivities" grade="B"]</p> <p class="beer"><em>These dinners tend to open with a complimentary pint of beer from the guest brewery. It’s not like you don’t get enough beer throughout the evening, but it’s a nice ice breaker.</em></p>
I tried adding the CSS to the amazingly-sparse atahualpa style.css file. I'm not a CSS expert (heck, I'm not even a novice - I'm more like primordial), so I popped over to http://www.w3schools.com/css to read a little bit. Here's what I came up with:
p.beer {padding-left: 30px;}
I've tried adding that to the style.css file and as part of the atahualpa options (in Atahualapa Options>Add HTML/CSS inserts in either the HTML Inserts: Body Tag or the CSS Inserts sections). No joy in either case, so I'm thinking I'm not using the right CSS. Once I have the right CSS (which may be now, but I'm not so sure), where do I stick that CSS? Which brings us to Question 1.
Question 1: How do I make this work in atahualpa (or wordpress or whatever happens to be at fault)?
Now let's talk about the shortcode. I have PHP code for this. This PHP code works fine, but I don't know how to get it to work in the child theme. I know it works fine because I took the nuclear option - hack it into the atahualpa functions.php file. I think this is better done in either a child theme or a plugin. Plugins are too much work (though I'll go there if that's the answer to question 3), so I started with the child theme approach.
Using a child theme, the CSS stuff then should go into the child theme style.css, and the I've tried to write a functions.php in the child theme that pulls in the base theme functions.php and then adds the shortcode handling code. That didn't seem to work. The styles don't work and the functions.php of the child theme doesn't seem to work either - I may have simply botched it and should try it again. If that's the answer, then I'll go do that and report back.
Question 2: How do I make child themes work with atahualpa, particularly on the PHP side?
Aside from questioning my sanity, the reason I did this is it seemed like the right way to do it. I don't know if it was the right way to do it or even the preferred way. This site is a hobby right now, but it may grow up. I'd rather start doing it the recommended way but I don't know what that is, leading to Question 3.
Question 3: What is the right way for me to do what I want to do?
Sorry for the long post, but thanks for your help.
Ron