Forum Replies Created
-
AuthorPosts
-
NickParticipant
Are you able to share a link to the site? It's a little tricky to debug it blind without knowing which fix above you've applied and how it currently looks. (You're welcome to send the reply as a private message if you'd like to by ticking “Set as private reply”; I'll take a look and reply here.)
NickParticipant@bepitt: To get your image to fill the full width of the page, add this code to the Genesis > Theme Settings > Header and Footer Settings box where it says "Enter scripts or code you would like output to wp_head()" (the first box):
<style> .header-image .site-title a { min-height: 400px; } @media only screen and (max-width: 1139px) { .header-image .site-title a { min-height: 350px; } } @media only screen and (max-width: 1023px) { .header-image .site-title a { min-height: 300px; } } @media only screen and (max-width: 910px) { .header-image .site-title a { min-height: 280px; } } @media only screen and (max-width: 710px) { .header-image .site-title a { min-height: 270px; } } @media only screen and (max-width: 500px) { .header-image .site-title a { min-height: 200px; } } @media only screen and (max-width: 480px) { .header-image .site-title a { min-height: 160px; } } </style>
The header graphic code you need is dependent on the theme, the size of your header graphic, and whether or not you're using a full-width graphic or not, which is why you need specific code for your situation. Hopefully the above CSS will help, though.
NickParticipantYou could also add one of the special "Genesis - Featured Posts" widgets in the Home Section 1 - 6 areas to have your blog posts appear on the homepage, but using the Centric homepage layout with the full-width intro.
For example, you could put your site intro in Home Section 1, some custom content in Home Section 2, and then add a “Genesis - Featured Posts” widget in Home Section 3.
NickParticipantOn second thoughts, I believe that as soon as you put a widget in any of the Home Section 1 – 6 widget areas, Centric uses the fancy homepage layout instead of the default blog post layout for the homepage.
Your best option might be to create a landing page by filling those widget areas with content, then create a separate blog page like the one in the demo and direct users to that from the homepage.
NickParticipantDid you set your front page to use a static page under Settings > Reading? If you do that, then Centric Pro will display that page instead of showing the fancy homepage template (with the full-width “Home Section 1 – 6” widget areas). I believe that those widgets only show up on your homepage if the Settings > Reading option is set to “Your latest posts”.
You could, if you wanted to, set the “Front page displays” option back to “Your latest posts” (or keep it on “A static page” but leave the dropdown for “Front page” as “— Select —”). Your site would then use Centric's homepage template with the Home Section 1 – 6 widget areas, and you could use it as a landing page to introduce visitors to your site, showcase some of your best features, and invite people to visit the blog index to see your latest posts.
NickParticipantIn some hosting environments, WordPress seems to struggle with author pages if the username has a space. (Yours is "Site Administrator".)
It's worth trying the fix suggested here to change your admin user's
nicename
value from "Site Administrator" to "site-administrator" or "admin" or similar. It requires manually editing the database, unfortunately (take a backup first!), but it may be enough to solve the issue.NickParticipant(Oh – the CSS code should go in the first of the two boxes under “Header and Footer Scripts”, where it says, “Enter scripts or code you would like output to wp_head()”.)
NickParticipantAll Genesis themes that support custom header images enforce the header size as a safety mechanism to prevent the theme layout from breaking. But you can still use your own header size if you want to by modifying the theme to alter the header layout. (Sometimes it can be easier just to rework your logo to fit the 380px x 90px size, but that isn't always possible.)
Changing the header size requires that you first edit the theme's functions.php file to specify the new header size that WordPress expects you to upload, and then add some CSS styles to modify the header layout itself.
Here are the changes you'd need to make to Magazine Pro:
Step 1: Edit the theme's functions.php file to change the expected header image size
You can make these changes in a free text editor such as Notepad++ (Windows) or TextWrangler (Mac) on your local machine, then re-upload the functions.php file to your server. (It's best to avoid editing the functions.php file on the server directly if you can because it's easier to make mistakes that take the site down.)
Find the following code in
functions.php
, modify it with your new header image height and width values, and save and re-upload the file://* Add support for custom header add_theme_support( 'custom-header', array( 'default-text-color' => '000000', 'header-selector' => '.site-title a', 'header-text' => false, 'height' => 194, 'width' => 450, ) );
This will change the upload prompt under
Appearance > Header
to say, “Images below 450 x 194 will be cropped” instead of “Images below 380 x 90” will be cropped”.Step 2: Add CSS styles to change the header layout
You could edit the theme's style.css file directly to change these, but then future updates to Magazine Pro will require you to find all of the lines you changed and make the same CSS modifications again, which can be a pain. Instead, I recommend copying and pasting the code below into the Genesis > Theme Settings > Header and Footer Scripts box. Doing it this way means that your custom CSS will survive any theme updates; the only thing you'll have to re-edit if Magazine Pro has an update is the functions.php file we changed in step one.
Add this code to the Genesis > Theme Settings > Header and Footer Scripts box:
<style> .title-area { float: left; padding-top: 30px; width: 450px; } .site-header .widget-area { float: right; text-align: right; width: 628px; } @media only screen and (max-width: 1139px) { .title-area { width: 450px; } .site-header .widget-area { width: 500px; } } @media only screen and (max-width: 1023px) { .site-header .title-area, .site-header .widget-area { text-align: center; width: 100%; } } </style>
Step 3: Upload your image at exactly 450px wide by 194px high.
You should not be prompted to crop the image unless you upload one that's different to that exact size. (If you find you're still prompted to crop it and you're sure it's that size, try cropping the image at 100% of it's size, if you can?)
Once you've completed these three steps, you should find your new header image in place at the wonderful new size. If you find that there's too much space above your logo, you may wish to edit the CSS to reduce the
padding-top: 30px;
value in the.title-area
style. (Change it to a value such as 10px or 0.)When Magazine Pro updates in the future, you'd just need to complete step one again.
NickParticipantHappy to help – glad it was a simple fix.
I like Simple Share Buttons Adder because it doesn't use third-party JavaScript and it doesn't track users – it just creates simple buttons that link directly to each site's share page. For that reason, it tends to load a lot faster.
NickParticipant[Hmm. I edited a reply I posted here and it disappeared. Trying again! Sorry if this is a duplicate.]
Since you're displaying your ads using AdRotate widgets, you could create special sponsor ads that only display on one page by following these steps:
- Install the [Display Widgets plugin](http://wordpress.org/plugins/display-widgets/).
- Add an extra AdRotate widget to your Header Right and Primary Sidebar areas that each contain the sponsor's ad or ad group.
- Set the Display Widgets option in the sponsor's ad widget to show that widget on the sponsor's pages only.
- Set the Display Widgets option in the default ad widget to hide that widget on the sponsor's pages.
To me, that seems a cleaner and more manageable option than hard-coding the ad groups into your theme files.
If you need to display specific ad groups at the bottom of specific pages, or in between paragraphs within a certain page, you can use the
[adrotate]
shortcode in that page's content:[adrotate group="1"]
That will display the first ad group at whatever point you add it to the article.
NickParticipantSince you're using widgets to display your ads, you could simply create an additional AdRotate widget that holds your special sponsor ad group (in Appearance > Widgets), add it to the sidebar you want it to appear in, and then use a plugin such as Display Widgets or Widget Logic to hide and show your chosen ads/widgets on specific pages.
Using the Display Widgets plugin, you could set the default ad widget to not display on the sponsor pages, and set the sponsor ad widget to display on those pages. You may have to add several of these alternative ad widgets – one in your Header Right area and another in the sidebar, for example – but it sounds like a simpler solution than hard-coding ad groups directly into your template files. (You Header Right and your Primary Sidebar areas would then contain two ad widgets, and you'd control which of these appear on what pages with the Display Widgets plugin.)
If you need to display a specific ad group in a given page or post inline with the content (i.e. not as a widget, but after the content or between paragraphs halfway through the post), the best way to do that is with the
[adrotate]
shortcode. For example, adding this shortcode to the WordPress post editor will make ad group 1 appear at that point:[adrotate group="1"]
NickParticipantAre you sure that you fully disabled the Shareaholic plugin (and cleared any caches)? If you use Chrome's Timeline (View > Developer > Developer Tools) to debug those pages, you can see that JavaScript calls fired in shareaholic.js are taking 6 seconds to run, which is likely causing the delay:
Screenshot: http://d.pr/i/sea
This same call is visible each time your pages freeze, for a total delay of around 10 seconds.
NickParticipantBy the way, a quick check of the source for the link you posted shows that the
wpb-js-composer js-comp-ver-4.3.3 vc_responsive
are being added to the body class correctly. Those sound like they're all related to Visual Composer to me, which confirms there's no problem with the body_class() styles.But I couldn't see any CSS that would style your divs with the
vc_row wpb_row vc_row-fluid
classes to lay them out as columns – it seems like some of the Visual Composer styles may be missing.NickParticipantYou don't need to modify your child theme to add an additional
body_class()
in the header file. Custom body classes are already added to all Genesis child themes by thegenesis_markup
function you highlighted.For HTML5 themes, the code that adds body classes is located in
/genesis/lib/functions/markup.php
in thegenesis_attributes_body()
function:function genesis_attributes_body( $attributes ) { $attributes['class'] = join( ' ', get_body_class() ); $attributes['itemscope'] = 'itemscope'; $attributes['itemtype'] = 'http://schema.org/WebPage'; return $attributes; }
WordPress's
body_class()
andget_body_class()
functions are identical except thatbody_class
outputs the classes as a space-separated list so that you can use it directly in your template, while get_body_class() returns the classes as an array that can be stored or used within a function, just as Genesis does. (If you're curious, you can even view the WordPress source code directly to see that thebody_class()
function simply callsget_body_class()
to echo a space-separated list of the body classes – it's simply a helper method, not a “different” one as you've been told.)Rest assured that Genesis is coded correctly – using get_body_class() is perfectly fine in this case.
It's likely that the problem lies elsewhere – there's possible a classname conflict with the column names that Visual Composer uses. Are you able to identify the column classnames it's adding, and the corresponding styles for those classes, then double-check that they're not being overridden by Genesis' own column classes? (Happy to walk you through this here if you need more help.)
-
AuthorPosts