- This topic has 13 replies, 2 voices, and was last updated 11 years, 9 months ago by bobbafett.
-
AuthorPosts
-
February 9, 2013 at 2:22 pm #3769bobbafettMember
Hi,
A couple of minor issues
1. I’d like to be able to reduce the amount of padding between the top of the page content area and the post title and between the post title and date and the first element of the post like an image or text, can I do this via custom CSS? I’ve tied it already but ended up breaking the layout…
2. I’d like to be able to add a post title subheader like in use here http://winsupersite.com/windows-8/going-pro-day-one-surface-pro (not WordPress). I’ve tried the SubHeading plugin and configuring it within it’s own settings but instead of the expected result of….
POST TITLE
Sub heading
Posted on 9 February, 2013 by User — No Comments…I get this….
POST TITLE
Posted on 9 February, 2013 by User — No CommentsSub heading
…anyone know how to fix this?
Note:I would share a link to the blog in question except it’s not live yet.
I can add changes to a PHP file if someone can suggest which exact file and where and what change to add.
I understand the concept of child themes but right now I don’t have the time to create one so if someone has a quick fix for now I’d appreciate it.February 9, 2013 at 10:30 pm #3777SakinKeymaster@bobbafett: For padding, you can adjust the padding by adding the following css in your “Custom CSS” box in theme options. You can adjust the value as per your need.
/* You can decrease the padding top for #main wrap */
#main { padding-top: 2em; }
/* For post title padding */
.entry-header hgroup .entry-title { padding-top: 15px; padding-bottom: 10px; }
/* For content below the title */
.entry-content, .entry-summary { padding-top: 2em; }
For adding dynamic subtitle then you need to add plugin or build custom meta box and then add value in in content.php, content-single.php and content-page.php. So this one is quite complicate. You might need to find the theme which has this options.
February 13, 2013 at 7:02 pm #3927bobbafettMember@Sakin thanks for all the info!
In relation to adding a subheading element.
1. My WP install got the C Box 1.8 update so I’ve applied that.
2. It seems that the SubHeading Plugin used to work but a recent update to WP broke it which I discovered following checking that even WP’s own themes would not work with it.
3. There is a similar Plugin entitled “Subtitle 360” http://wordpress.org/extend/plugins/subtitle-360/ which I was able to get working by inserting the code below into content.php, content-single.php and content-page.php like you said. And by looking for “<h1 class=”entry-title”>” I was able to find the correct place ok without breaking the script.
<?php if (function_exists('the_subtitle')){ the_subtitle(); }?>
I assume that any updates to the them in future will remove the edits so I’ll have to add them again then.
Thanks again for the help!
February 13, 2013 at 7:11 pm #3929SakinKeymaster@bobbafett: That is why don’t edit any core theme files. Just build child theme and then add the files content.php, content-single.php and content-page.php in your child theme and edit there.
February 13, 2013 at 7:25 pm #3933bobbafettMemberok noted. How do I create a child theme and if I do and then the theme is updated later will the changes be replicated to the child theme?
February 13, 2013 at 7:28 pm #3935SakinKeymaster@bobbafett: I hope this tutorial will help you to create child theme http://wp.tutsplus.com/tutorials/theme-development/child-themes-basics-and-creating-child-themes-in-wordpress/
If you create the child theme then the theme update will not replace your child theme changes.
February 13, 2013 at 7:34 pm #3937bobbafettMemberOkay I’ll try that thanks!
February 15, 2013 at 3:31 am #3998bobbafettMemberHi,
I applied the Catch Box v 1.9 updated so now the changes made to content.php, content-single.php and content-page.php have been removed.
I have created a folder for a child them and was able to inherit the Catch Box template so all is working. A couple of quick questions though.
1. I don’t remember what I modified within Catch Box to reduce the padding in the header area (around the header image) and this change doesn’t seem to be inherited but the child theme so is there some file I should be copying over since the custom CSS added to the theme options for the child theme are identical.
2. Should I copy content.php, content-single.php and content-page.php to the child theme folder to apply the changes again? And if there are perhaps some updates to the original versions of those files are part of the theme update how will they be inherited? Or am I not making any sense?
February 16, 2013 at 9:36 pm #4064SakinKeymaster@bobbafett: If you have added child theme then it’s good and your changes will not be modified and also keep in track with the changelog http://catchthemes.com/changelogs/catch-box-theme/ . This will list the things that changes in various versions.
Now there is two option for custom css. One you can add it up in your child theme style.css this is best option but if you want the easy option then you can add it in “Custom CSS” box in your Theme Options panel
/* You can decrease the padding top for #main wrap */
#main { padding-top: 2em; }
/* For post title padding */
.entry-header hgroup .entry-title { padding-top: 15px; padding-bottom: 10px; }
/* For content below the title */
.entry-content, .entry-summary { padding-top: 2em; }
For adding files in child theme, it depends on which files you are changing it.
February 21, 2013 at 6:25 pm #4243bobbafettMemberI activated the child them and the values added in the Custom CSS box inside Theme Options are exactly the same as those from the parent theme but the same changes don’t apply.
In relation to setting up the child them I wasn’t sure if I should copy the contents of the catch-box folder to the new child theme folder. When I did it broke things with an error from functions.php so I have to remove that file.
Should I just copy style.css and any PHP files I’ve modified to the child theme folder or do I need to copy something else so that the CSS changes applied via Custom CSS appear?
February 21, 2013 at 9:04 pm #4246SakinKeymaster@bobbafett: can you send me your site URL and I will check in. What you have done in your child theme css and you post here.
February 23, 2013 at 4:53 pm #4344bobbafettMemberHi,
I disabled the child theme as I got frustrated with all the changes and needed to get the site live. Although it’s a bit of work each time I’m okay with replacing the function below in the pages below every time catch-box is updated
content.php
content-single.php
content-page.phpOne of the bigger issues I will have is being able to format the featured slider once I need to use it since I understand that unless you buy the pro version of catch-box that you cannot. Can you confirm this and provide a URL showing the differences between the free and pro versions of the features slider?
Also I think if possible you should consider adding in a sub heading feature into your theme, perhaps adding it to your pro version as a feature.
February 23, 2013 at 4:54 pm #4345bobbafettMemberSorry the function for the Subtitle 360 plugin that I added above got removed
February 23, 2013 at 4:56 pm #4346bobbafettMemberSorry the code I added for the Subtitle 360 plugin in the reply above to removed so adding again…
<?php if (function_exists(‘the_subtitle’)){ the_subtitle(); }?>
-
AuthorPosts
- The topic ‘Add subheader to post title and reduce padding’ is closed to new replies.