- This topic has 12 replies, 2 voices, and was last updated 8 years, 8 months ago by Tom.
-
AuthorPosts
-
July 27, 2015 at 1:40 pm #124155mogur
Hi,
thanks Tom for this great theme and add-ons.
I feel a high potential in your work. Problem is : I am a newbie at WP and code. Well, after struggling for a month, I have learned somme things of course (but not enough I am afraid !)…
I started with another theme and when I met yours I decided to invest.Issues needing help, please :
1) a post title is h2 in the masonry grid and h1 in the post. So the grid shows small titles (with the wrong font). I want to keep h2 and h3 available for the posts (better for SEO).
How can I have the h1 settings for post titles on the masonry grid page ?2) how could I hide tags, social buttons, categories, etc on the masonry grid (and only here) ?
3) I read somewhere that it is safer to have a child theme… ok… I want to (and I can !) learn ! What is the best tuto to implement a child theme ?
4) where can I adjust the (standard) heigth of lines in posts, for normal paragraph, lists, etc ?
5) sometimes I write a post with multi pages in it. I have noticed that the links for the pages appear AFTER some plug-ins (similar posts, share this, etc).
How can I put the page links just below the text area ? For example : a post with multi-pages in the blogI hope you can help me.
and I apologize for my poor english.Regards
July 27, 2015 at 6:02 pm #124212TomLead DeveloperLead DeveloperHi there,
1. It’s important not to have more than one H1 on a page, which is why the blog uses H2 tags.
You can target those tags using some simple CSS:
.masonry-post h2.entry-title { font-size: 20px; font-family: 'Open Sans', sans-serif; }
You can adjust the font family and size to your liking.
2. Some simple CSS:
.masonry-post .twitter-share, .masonry-post .entry-meta { display: none; }
3. Having a child theme is important when adding custom CSS. You can download the blank child theme here: http://generatepress.com/api/themes/generatepress_child.zip
Save that as a .zip, and then upload it through “Appearance > Themes > Add New > Upload”.
Then activate it. When changing themes, you may need to re-set your “Theme Location” for the menu in “Appearance > Menus”.
Your widgets also might be moved into the “Inactive Widgets” area in “Appearance > Widgets”, so you might have to add them back (happens sometimes, but not always).
4. Some more custom CSS:
Paragraphs:
p { line-height: 1.5; /* can adjust this to px or whatever */ }
Lists:
li { margin-bottom: 5px; /* adjust as needed */ }
5. Unfortunately this is out of the control of the theme – those plugins automatically attach themselves to the end of the
the_content()
function. This makes it so they can make sure their plugin will add the correct content on all themes (all themes use that function).I looked around and found a function which may work (untested):
add_filter( 'the_content', 'generate_after_content_wp_link_pages', 5 ); function generate_after_content_wp_link_pages( $text ) { $text .= wp_link_pages( 'echo=0' ); return $text; }
Adding PHP: http://generatepress.com/knowledgebase/adding-php-functions/
Then you would have to hide the theme’s default page links:
.page-links { display: none; }
Lots of information here – let me know if you have any questions 🙂
July 28, 2015 at 2:48 am #124270mogurHi Tom,
3 … I did not think it is so easy to do ! BTW, it is a blank child, a great idea !!!
So DONE !1.and 2. done ! I love the result.
4… good, I understand how it works, I’ll adjust as needed.
5… argh !!!
I did it step by step. It was ok with the filter. Then I copy the next function to hide the page links, then… it crashed WP ! So I accessed via FTP server and its control panel to edit the file and remove the defective function. I am not expert enough to improvise on code but…
Isn’t something missing at the beginning of your suggested code ?Thank you very much for your support !
July 28, 2015 at 8:35 am #124316TomLead DeveloperLead DeveloperHmm, sorry about that! The code works for me (I tested it quickly before posting).
Does your child theme functions.php file start with this?:
<?php
The entire file should look like:
<?php add_filter( 'the_content', 'generate_after_content_wp_link_pages', 5 ); function generate_after_content_wp_link_pages( $text ) { $text .= wp_link_pages( 'echo=0' ); return $text; }
July 28, 2015 at 9:17 am #124334mogurthis part of the code works very well and it is implemented !
Now, the link to change pages appears twice ; once just below the text and once after the plug-insThe crash occured with the second part :
.page-links {
display: none;
}thanks Tom
July 28, 2015 at 9:26 am #124337TomLead DeveloperLead DeveloperAh! That second part is CSS: http://generatepress.com/knowledgebase/adding-css/
Sorry I wasn’t clear!
July 28, 2015 at 1:17 pm #124410mogurok and… done ! and… it works !
I really apreciate your great support.
Thank you very much.July 28, 2015 at 1:21 pm #124411TomLead DeveloperLead DeveloperYou’re very welcome 🙂
July 30, 2015 at 5:04 am #124841mogurHi Tom,
I want a breadcrumb on my blog…
I have chosen the first I found : Breadcrumb NavXT
Add-on Hooks activated
this code in the “after header” (“après l’entête” in french in the texte )<div class="breadcrumb-info">
<div class="breadcrumbs">Fil d'Ariane :
<?php if(function_exists('bcn_display'))
`{ bcn_display(); }?>` `</div> </div> </div>Some CSS in the child theme :
/* CSS pour le breadcrumb-NavXT */
.breadcrumb-info {
margin: 20px 0px 0px 0px;
background: #f9fef5;
padding: 20px;
}.breadcrumbs
{
font-size: 0.8em;
color: #6db52a;margin: 0px 0 0 0px;
position: relative;
float: left;
}
`Problem is : when the browser window is small, the breadcrumb is written on 2 lines and the area does not increase...
An example so you can play with the width of the window and see.How could I fix this please ?
July 30, 2015 at 5:14 am #124843mogurSorry… I am struggling with the editor and the code instructions …
a div is missing at the beginning of the hook :<div class="grid-container grid-parent">
July 30, 2015 at 8:08 am #124888TomLead DeveloperLead DeveloperThis is the code causing the issue:
.breadcrumbs { float: left; }
If you get rid of that float left attribute, you should be good to go 🙂
July 30, 2015 at 8:23 am #124889mogurI’m good !
Thank you !
July 30, 2015 at 10:40 am #124939TomLead DeveloperLead DeveloperYou’re welcome 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.