please help: custom css does not affect and other errors.

Hi!

I think I did something really stupid and now I’m pretty desperate.
I changed something in shapely child’s functions.php in order to modify the size and image quality of the entry header. But without really knowing what I do and apparently it went really wrong.
I added all this from the parent theme to my child theme:

if ( ! function_exists( 'shapely_setup' ) ) :
	/**
	 * Sets up theme defaults and registers support for various WordPress features.
	 *
	 * Note that this function is hooked into the after_setup_theme hook, which
	 * runs before the init hook. The init hook is too late for some features, such
	 * as indicating support for post thumbnails.
	 */
	function shapely_setup() {
		/*
		 * Make theme available for translation.
		 * Translations can be filed in the /languages/ directory.
		 * If you're building a theme based on Shapely, use a find and replace
		 * to change 'shapely' to the name of your theme in all the template files.
		 */
		load_theme_textdomain( 'shapely', get_template_directory() . '/languages' );

		// Add default posts and comments RSS feed links to head.
		add_theme_support( 'automatic-feed-links' );

		/**
		 * Add support for the custom logo functionality
		 */
		add_theme_support( 'custom-logo', array(
			'height'     => 55,
			'width'      => 135,
			'flex-width' => true,
		) );

		add_theme_support( 'custom-header', apply_filters( 'shapely_custom_header_args', array(
			'default-image'      => '',
			'default-text-color' => '000000',
			'width'              => 1900,
			'height'             => 225,
			'flex-width'         => true
		) ) );

		/*
		 * Let WordPress manage the document title.
		 * By adding theme support, we declare that this theme does not use a
		 * hard-coded <title> tag in the document head, and expect WordPress to
		 * provide it for us.
		 */
		add_theme_support( 'title-tag' );

		/*
		 * Enable support for Post Thumbnails on posts and pages.
		 *
		 * @link https://developer.wordpress.org/themes/functionality/featured-images-post-thumbnails/
		 */
		add_theme_support( 'post-thumbnails' );

		// This theme uses wp_nav_menu() in one location.
		register_nav_menus( array(
			                    'primary'     => esc_html__( 'Primary', 'shapely' ),
			                    'social-menu' => esc_html__( 'Social Menu', 'shapely' ),
		                    ) );

		/*
		 * Switch default core markup for search form, comment form, and comments
		 * to output valid HTML5.
		 */
		add_theme_support( 'html5', array(
			'search-form',
			'comment-form',
			'comment-list',
			'gallery',
			'caption',
		) );

		// Set up the WordPress core custom background feature.
		add_theme_support( 'custom-background', apply_filters( 'shapely_custom_background_args', array(
			'default-color' => 'ffffff',
			'default-image' => '',
		) ) );

		/**
		 * Enable support for Post Thumbnails on posts and pages.
		 *
		 * @link http://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails
		 */
		add_theme_support( 'post-thumbnails' );
		add_image_size( 'shapely-full', 1110, 530, true );
		add_image_size( 'shapely-featured', 730, 350, true );
		add_image_size( 'shapely-grid', 350, 300, true );

		add_theme_support( 'customize-selective-refresh-widgets' );
		// Welcome screen
		if ( is_admin() ) {
			global $shapely_required_actions, $shapely_recommended_plugins;

			$shapely_recommended_plugins = array(
				'wordpress-seo'          => array( 'recommended' => true ),
				'fancybox-for-wordpress' => array( 'recommended' => false ),
			);

			/*
			 * id - unique id; required
			 * title
			 * description
			 * check - check for plugins (if installed)
			 * plugin_slug - the plugin's slug (used for installing the plugin)
			 *
			 */
			$path = WPMU_PLUGIN_DIR . '/shapely-companion/inc/views/shapely-demo-content.php';
			if ( ! file_exists( $path ) ) {
				$path = WP_PLUGIN_DIR . '/shapely-companion/inc/views/shapely-demo-content.php';
				if ( ! file_exists( $path ) ) {
					$path = false;
				}
			}

			$shapely_required_actions = array(
				array(
					"id"          => 'shapely-req-ac-install-companion-plugin',
					"title"       => Shapely_Notify_System::shapely_companion_title(),
					"description" => Shapely_Notify_System::shapely_companion_description(),
					"check"       => Shapely_Notify_System::shapely_has_plugin( 'shapely-companion' ),
					"plugin_slug" => 'shapely-companion'
				),
				array(
					"id"          => 'shapely-req-ac-install-wp-jetpack-plugin',
					"title"       => Shapely_Notify_System::shapely_jetpack_title(),
					"description" => Shapely_Notify_System::shapely_jetpack_description(),
					"check"       => Shapely_Notify_System::shapely_has_plugin( 'jetpack' ),
					"plugin_slug" => 'jetpack'
				),
				array(
					"id"       => 'shapely-req-import-content',
					"title"    => esc_html__( 'Import content', 'shapely' ),
					"external" => $path,
					"check"    => Shapely_Notify_System::shapely_check_import_req(),
				),

			);

			require get_template_directory() . '/inc/admin/welcome-screen/welcome-screen.php';
		}
	}
endif;
add_action( 'after_setup_theme', 'shapely_setup' );

Afterwards I erased the code again from the functions.php in order to just go back to my normal web but now everything is different.
And now my work of the last month is lost. My website looks terrible and it seems that the custom CSS I made doesn’t affect the page anymore.
Also my portfolio isn’t there anymore… ;(
When I go to custom CSS in the menu, I don’t have a preview anymore :frowning: :frowning:

I don’t know what to do, please help me!!!

Thank you!
Anna

PD: I am really sorry if this post is duplicated of something but I can’t find it anywhere on the forum…

also I cannot asign featured images to my portfolio anymore (media doesn’t load) and lots of other stuff inside wordpress doesn’t really work properly.
What have I done? Can so many things really break down because of that code??
I hope so much that you can help me!! I have to finish the web this week and don’t even know how to proceed. :frowning:

Thanks!!
anna

Hi!

I solved it. I accidentally erased the last part you shouldn´t ever erase or change…
I restored the old functions and it worked. Thank god!
Thank you very much!
Anna