Tagged: x
-
AuthorPosts
-
July 14, 2016 at 11:16 am #1087020
perfettcParticipantHi- I’m sorry for asking this since there are several knowledge base articles on this, but each of them seems slightly different from what I’m trying to do.
Questions:
– After activating the child theme, if I select “Customize” on the child theme, can I enter the custom code there instead of from the back end using the functions.php file? I’m a novice programmer and this seems easier.– To display the share posts after content, what would the code syntax be? All of the examples I found show the syntax for before post content.
Would this be it:
// Add Social Sharing after the single post content
// =============================================================================function x_add_social_sharing ( $content ) {
if ( is_singular(‘post’) ) {
echo do_shortcode(‘[share title=”Share this Post” facebook=”true” twitter=”true” google_plus=”true” linkedin=”true” pinterest=”true” reddit=”true” email=”true”]’);
}
}add_action(‘x_before_the_content_end’, ‘x_add_social_sharing’);
July 14, 2016 at 2:16 pm #1087290
Nabeel AModeratorHi there,
Thanks for writing in! If you need to add custom PHP code then add it in Child Theme’s functions.php file. If you want to add CSS or JavaScript then it can be added via Appearance > Customize > Custom
To display the share posts after content, add the following code in your Child Theme’s functions.php file:
function share_for_individual_post( $content ) { if ( is_singular('post') ) { echo do_shortcode( '[share title="Share this Post" facebook="true" twitter="true" google_plus="true" linkedin="true" pinterest="true" reddit="true" email="true"]' ); } } add_action('x_before_the_content_end', 'share_for_individual_post');Let us know how this goes!
July 15, 2016 at 3:14 pm #1089036
perfettcParticipantIt worked. But accessing the functions file was what I was trying to figure out but was able to find it from the file explorer in CPanel.
Another question though: Now that I have created a child theme, some of the customization code that I had previously entered in my CSS through the customizer no longer seems to be doing what it previously did. To be specific, I am using Ethos with a white background. Previously, all of my footer widget text would not show up unless the mouse was on the text.
I’m assuming that I should now fix this using my child theme? If so, how?
July 16, 2016 at 12:24 am #1089559
FriechModeratorHi There,
Are the custom CSS on customizer are still there? If so please check your entire custom css code here: http://csslint.net/ and address any error that will occured.
You can place custom CSS either on Customizer or on the child theme’s style.css, If the code is correct and no syntax error on the code it should work.
Provide us the site URL, if nothing works.
Hope it helps, Cheers!
July 19, 2016 at 8:24 am #1093460
perfettcParticipantThis reply has been marked as private.July 19, 2016 at 8:51 am #1093493
ChristopherModeratorHi there,
Please add this code :
.x-colophon .widget a, .x-colophon .x-column >div { color: #000; }Hope it helps.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1087020 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
