Tagged: x
-
AuthorPosts
-
October 29, 2016 at 4:06 am #1235718
AnneInnesParticipantHi
I found this useful thread to stop images appearing in many sizes. https://community.theme.co/forums/topic/stop-x-from-generating-different-images-sizes/
My questions is how exactly do I edit the functions.php file in the Child Theme?
ThanksOctober 29, 2016 at 5:03 am #1235737
ThaiModeratorHi There,
You just need to add the following code at the end of your functions.php file:
function x_setup_theme() { // // Localization. // // Translations can be added to the /framework/lang/ directory. // load_theme_textdomain( '__x__', X_TEMPLATE_PATH . '/framework/lang' ); // // Automatic feed links. // // Adds RSS feed links to <head> for posts and comments. // add_theme_support( 'automatic-feed-links' ); // // Post formats. // // Adds support for a variety of post formats. // add_theme_support( 'post-formats', array( 'link', 'gallery', 'quote', 'image', 'video', 'audio' ) ); // // WordPress menus. // // This theme uses wp_nav_menu() in two locations. // register_nav_menus( array( 'primary' => __( 'Primary Menu', '__x__' ), 'footer' => __( 'Footer Menu', '__x__' ) ) ); // // Featured images. // // Theme support for featured images and thumbnail sizes. // add_theme_support( 'post-thumbnails' ); // // WooCommerce. // // Theme support for the WooCommerce plugin. // add_theme_support( 'woocommerce' ); // // Allow shortcodes in widgets. // add_filter( 'widget_text', 'do_shortcode' ); // // Remove unnecessary stuff. // // 1. Version number (for security). // 2. Really simple discovery. // 3. Windows live writer. // 4. Post relational links. // remove_action( 'wp_head', 'wp_generator' ); // 1 remove_action( 'wp_head', 'rsd_link' ); // 2 remove_action( 'wp_head', 'wlwmanifest_link' ); // 3 remove_action( 'wp_head', 'start_post_rel_link' ); // 4 remove_action( 'wp_head', 'index_rel_link' ); // 4 remove_action( 'wp_head', 'adjacent_posts_rel_link_wp_head' ); // 4 } add_action( 'after_setup_theme', 'x_setup_theme' );Regards!
October 29, 2016 at 8:18 am #1235853
AnneInnesParticipantHi
Thanks for this but how do I edit the functions.php file?
ThanksOctober 29, 2016 at 9:32 am #1235886
ThaiModeratorHi There,
Please navigate to this link: http://yourdomain.com/wp-admin/theme-editor.php?file=functions.php&theme=x-child
Hope it helps π
October 29, 2016 at 9:42 am #1235893
AnneInnesParticipantHi, that link maybe broken – doesnt show anything about X and says the domain is for sale.
Please advise
ThanksOctober 29, 2016 at 9:52 am #1235904
AnneInnesParticipantIve now edited the functions.php file in wp-contents/themes/x/functions.php but it still makes the files appear in triplicate
ThanksOctober 29, 2016 at 10:59 am #1235960
ThaiModeratorHi There,
Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:
β Link to your site
β WordPress Admin username / password
β FTP credentialsDonβt forget to select Set as private reply. This ensures your information is only visible to our staff.
Thanks.
October 31, 2016 at 3:32 am #1237534
AnneInnesParticipantHi its a dev site using MAMP so the live one isnt showing these issues. In the dashboard media library I can see one copy of each image however in the uploads folder there are still 3 copies of any new images I add
ThanksOctober 31, 2016 at 3:48 am #1237547
LelyModeratorHi There,
Unfortunately, we really need to access your site via FTP and wordpress admin to check where the issue is coming from. It will be hard to recommend something if we didn’t see the setup.
October 31, 2016 at 4:00 am #1237554
AnneInnesParticipantThis reply has been marked as private.October 31, 2016 at 4:19 am #1237576
Rue NelModeratorHello There,
Thanks for writing in! Please keep in mind that by default, when you upload an image, WordPress will generate a thumbnail, medium and a large size. To know more about this, please check it here: https://codex.wordpress.org/Settings_Media_Screen
This is basically a pretty basic setting in WordPress and the reason why you have 3 copies of the images something with the following filename:
– image-name-150×150.jpg
– image-name-300×300.jpg
– image-name-1024×1024.jpgRemoving these three image sizes would mean modifying WordPress defaults which is not advisable.
Hope this explains it.
October 31, 2016 at 4:40 am #1237602
AnneInnesParticipantok many thanks
October 31, 2016 at 5:01 am #1237623
ThaiModeratorIf you need anything else please let us know.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1235718 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
