Forum Replies Created
-
AuthorPosts
-
Erik D. SlaterMember
line 2707: add
text-align: center;
to .footer-widgets-1, .footer-widgets-2, and .footer-widgets-3 ...
Erik D. Slater: Digital Platform Consultant β’ LinkedInErik D. SlaterMemberErik D. SlaterMemberThere is another piece of code you may need:
// Enable execution of shortcodes in widgets
add_filter('widget_text', 'do_shortcode', 10, 1);
You'll need this to enable the interpretation of shortcodes when used inside a widget.
Sorry about that π
Erik D. Slater: Digital Platform Consultant β’ LinkedInJune 6, 2015 at 3:30 am in reply to: Altitude Pro Navigation with WPML Flag Language Selector #155086Erik D. SlaterMemberThanks man π
Of course ... there is still your Simple Social Icons issue to sort out ...
Erik D. Slater: Digital Platform Consultant β’ LinkedInJune 6, 2015 at 3:28 am in reply to: [Genesis Framework] How do I insert code right after the opening Body tag? #155085Erik D. SlaterMemberAwww ... thanks for the kind feedback. It was a pleasure helping you π
Erik D. Slater: Digital Platform Consultant β’ LinkedInErik D. SlaterMemberWhen you say it breaks your site, are you getting any error messages?
If you like, you can send me your functions.php to [email protected] ... just in case there is a paste issue (that's happened before).
The "eds" part just makes any function declarations unique ... which is necessary if you collect various code snippets from all over the place π
Erik D. Slater: Digital Platform Consultant β’ LinkedInJune 6, 2015 at 3:17 am in reply to: Altitude Pro Navigation with WPML Flag Language Selector #155081Erik D. SlaterMemberFor #flags-selector,
padding-top: 27px !important;
needs to bepadding-top: 27px;
. The !important bit here is preventing the magic from happening π
Erik D. Slater: Digital Platform Consultant β’ LinkedInJune 6, 2015 at 3:08 am in reply to: [Genesis Framework] How do I insert code right after the opening Body tag? #155080Erik D. SlaterMemberYeah ... although placing externally-acquired code snippets at the bottom is probably a good idea ... just to keep it separate from the original code.
Oh ... and by the way ... your question was definitely not "amateur" π
Erik D. Slater: Digital Platform Consultant β’ LinkedInJune 6, 2015 at 3:00 am in reply to: [Genesis Framework] How do I insert code right after the opening Body tag? #155078Erik D. SlaterMemberMy bad. Actually, all you have to do is add the following to the functions.php file in your Foodie Pro child theme:
add_action('genesis_before', 'genesis_before_ad_slots'); function genesis_before_ad_slots() { ?> PASTE YOUR CODE HERE ... LITERALLY :-) <?php }
so for the code you provided above, it would look like this:
add_action('genesis_before', 'genesis_before_ad_slots'); function genesis_before_ad_slots() { ?> <script type=”text/javascript” src=”http://www35.sitename.com/gad/sitenameadapt_jsapi.act?afid=17345057XX”></script> <script type=”text/javascript”> var window_w = document.width || document.body.clientWidth; ββ/*check how wide a browser is */ β ββif (window_w >= 728) { βββSiteCreateSlot(“17345057XX”, “728?—90β³, “Leaderboard”); }βββ β SiteCreateSlot(“17345057XX”, “300?—250β³, “Rectangle”); βββ ββ ββif (window_w <= 640) { βββSiteCreateSlot(“17345057XX”, “320?—50β³, “Mobile”); ββ}ββ SiteGetAds(“17345057XX”); </script> <?php }
Erik D. Slater: Digital Platform Consultant β’ LinkedInJune 6, 2015 at 2:11 am in reply to: [Genesis Framework] How do I insert code right after the opening Body tag? #155071Erik D. SlaterMemberTake a look at this StackOverflow thread.
You were in the right general area, i.e. header.php π
If you are using a child theme, copy the header.php file from the Genesis framework parent theme into your child theme folder, and make your changes there, i.e. don't edit the parent theme files.
Erik D. Slater: Digital Platform Consultant β’ LinkedInErik D. SlaterMemberTaken straight from my almost-completed custom theme (for the Rainmaker platform) ... which widgetizes the page footer ... which will then allow you to completely customize the page footer (i.e. not the footer widgets) in the Widgets area rather than hooking into the relevant filter.
// Register "Page Footer" Widget genesis_register_sidebar( array( 'id' => 'eds-page-footer', 'name' => __('Page Footer', CHILD_THEME_NAME), 'description' => __('Widgets added here will display output at the bottom of the page.', CHILD_THEME_NAME), ) ); // Replace default footer ouptut with widgetized area // @since 1.0.0 add_filter('genesis_footer_output', 'eds_genesis_footer_output', 10, 3); function eds_genesis_footer_output($output, $backtotop_text, $creds_text) { dynamic_sidebar('eds-page-footer'); }
This should then allow you to make use of the Simple Social Icons plugin.
Just remember to remove any other filter for the footer to avoid possible weirdnesses ...
Erik D. Slater: Digital Platform Consultant β’ LinkedInJune 6, 2015 at 1:42 am in reply to: Altitude Pro Navigation with WPML Flag Language Selector #155069Erik D. SlaterMemberAlso, lines 164 to 168 in style.css (the transition definitions) ... add #flags-selector to that list, i.e.
a,
input:focus,
input[type="button"],
input[type="reset"],
input[type="submit"],
textarea:focus,
.button,
.site-header.dark,
#flags-selector {
-webkit-transition: all 0.2s ease-in-out;
-moz-transition: all 0.2s ease-in-out;
-ms-transition: all 0.2s ease-in-out;
-o-transition: all 0.2s ease-in-out;
transition: all 0.2s ease-in-out;
}
Erik D. Slater: Digital Platform Consultant β’ LinkedInJune 6, 2015 at 1:38 am in reply to: Altitude Pro Navigation with WPML Flag Language Selector #155068Erik D. SlaterMemberRiiiiiiiight π
Give this a whirl:
.site-header.dark #flags-selector { padding-top: 17px; }
Erik D. Slater: Digital Platform Consultant β’ LinkedInErik D. SlaterMemberThis might help: http://briangardner.com/add-social-icons-footer/
Erik D. Slater: Digital Platform Consultant β’ LinkedInErik D. SlaterMemberAhhh ... hang on a sec ... that may not work in your case here ... since I don't think you're using your footer widgets ...
Erik D. Slater: Digital Platform Consultant β’ LinkedInErik D. SlaterMemberIn your functions.php file, you could change
add_theme_support( 'genesis-footer-widgets', 1 );
to
add_theme_support( 'genesis-footer-widgets', 2 );
to give you a second footer widget ... and then add Simple Social Icons into the new Footer 2 widget.
Erik D. Slater: Digital Platform Consultant β’ LinkedInJune 6, 2015 at 1:12 am in reply to: Altitude Pro Navigation with WPML Flag Language Selector #155060Erik D. SlaterMemberHAH!! Didn't spot that one π
In the code I proposed for .flag-item a, change
padding-top: 4px;
topadding-top: 4px !important;
Sorry about that π
Erik D. Slater: Digital Platform Consultant β’ LinkedInJune 6, 2015 at 12:49 am in reply to: Altitude Pro Navigation with WPML Flag Language Selector #155057Erik D. SlaterMemberIt's the CSS for .genesis-nav-menu a that's screwing you up a bit here.
Keep #flags-selector as you currently have it.
Replace .flag-item with the following:
.flag-item { float: left; } .flag-item a { padding-top: 4px; }
Then tweak as required π
Erik D. Slater: Digital Platform Consultant β’ LinkedInErik D. SlaterMemberFirstly, I'd like to thank you for your very clear explanation. Here's hoping I understood it correctly π
In your style.css file - line 1353 - change
.entry { background-color: #fff; border-radius: 3px; margin-bottom: 40px; padding: 40px 40px 24px; }
to
#calendar-2, .entry { background-color: #fff; border-radius: 3px; margin-bottom: 40px; padding: 40px 40px 24px; }
i.e. I just added
#calendar-2,
to the definition.The reason it works on bhutan is because the white background belongs to a post ... whereas nepal is a widget that doesn't have the relevant CSS definition.
Hopefully that helps π
Erik D. Slater: Digital Platform Consultant β’ LinkedInErik D. SlaterMemberOK. Here's the dealsy wealsy. In style.css, do the following:
line 2709: change
width: 270px;
towidth: 33.33%;
line 2721: remove
margin-right: 60px;
line 2845: remove
.footer-widgets-1,
,.footer-widgets-2,
and.footer-widgets-3,
line 2861: remove
margin-right: 30px;
line 3005: remove
padding-left: 1em;
(which translates to a left padding of 36px, btw)That should do the ole tricksy wicksy there ... otherwise, I'll video myself eating a hat ... I'll even post the link here π
Erik D. Slater: Digital Platform Consultant β’ LinkedIn -
AuthorPosts