Forum Replies Created

Viewing 15 replies - 16 through 30 (of 46 total)
  • Thread Starter DidoH

    (@didoh)

    Thanks Rachid.

    I did try setting the max-width to 100% but for some reason the content then extends beyond the width of the rest of the site. You can scroll right and see where it juts out on the second and third slide (first one has a white background so difficult to tell).

    I have updated the code as you suggest, so that you can see the result. Perhaps that will help explain the problem I have been having.

    Thanks for your help.

    Thread Starter DidoH

    (@didoh)

    Ideally for mobile the caption would go underneath the slider.

    Thread Starter DidoH

    (@didoh)

    Hi Mel,

    Thank you for your help. I literally just this second worked out how to change it and updated the site. It was to do with my float settings for the footer navigation bars. Float needed to be set to none.

    I would actually like some help on something else though, if you are willing. I am trying to make my Meta slider captions disappear for mobile.

    I have tried the below, but without any success.

    @media screen and (max-width: 400px) {
    
    .metaslider .caption-wrap {
      display: none !important;
    }
    
    .metaslider .caption {
      display: none !important;
    }

    Do you have any suggestions?

    Thanks!

    I’m having the same issue. I tried the below, but it hasn’t worked for me.

    @media screen and (max-width: 400px) {
    
    .metaslider .caption-wrap {
      display: none !important;
    }
    
    .metaslider .caption {
      display: none !important;
    }
    Thread Starter DidoH

    (@didoh)

    For some reason the code that was working before is no longer working again.

    Thread Starter DidoH

    (@didoh)

    I don’t think the !important is necessary because border-color worked without, but I find it useful to use until I find the right css target class to adjust.

    Thread Starter DidoH

    (@didoh)

    I have managed to change the box, but not the dropdown menu.

    This is what worked for the box:

    .woocommerce select.orderby {
    
    color: #455353 !important;
    background-color: #4bd8c3 !important;
    font-weight: 300 !important;
    font-family: "Times New Roman", Georgia, Serif !important;
    border-color: #4bd8c3;
    }

    This is what isn’t working for the dropdown menu:

    .woocommerce select.orderby ul {
     color: #4bd8c3;
    }
    Thread Starter DidoH

    (@didoh)

    Thanks CrouchingBruin. No, my client changed her mind about how she wanted the menus, so I have removed the specified mobile menu, but it is still working perfectly combining the primary and the social menus together in responsive mode.

    I think we are pretty much ready to upload now, so thank you very much for all your help.

    Thread Starter DidoH

    (@didoh)

    This just made it work!

    function museum_child_setup() {
    add_theme_support( 'post-thumbnails', array( 'post', 'page', 'attachment:audio', 'attachment:video', 'product' ) );
    }
    add_action( 'after_setup_theme', 'museum_child_setup', 11 );
    Thread Starter DidoH

    (@didoh)

    Thanks CrouchingBruin. In the end it was a combination of the below that worked for me

    .main-navigation li:hover a,
    .main-navigation li.focus > a,
    .main-navigation li a:focus {
      background: #00c9c9;
      color: #fff;
    }
    
    .main-navigation ul ul a:hover {
      color: #455353;
    }

    I have simplified the style.css down to what I need and this is currently the whole of my functions.php

    <?php
    
    add_action( 'wp_enqueue_scripts', 'enqueue_parent_styles' );
    function enqueue_parent_styles() {
        wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' );
    }
    
    add_theme_support( 'post-thumbnails', array( 'post', 'page', 'attachment:audio', 'attachment:video', 'product' ) );
    
    register_nav_menus( array(
    		'secondary' => __( 'Secondary Menu', 'museum' ),
            'mobile' => __( 'Mobile Menu', 'museum' ),
    	) );
    add_filter( 'woocommerce_show_page_title' , 'woo_hide_page_title' );
    
    /**
     * woo_hide_page_title
     *
     * Removes the "shop" title on the main shop page
     *
     * @access      public
     * @since       1.0
     * @return      void
    */
    function woo_hide_page_title() {
    
    	return false;
    
    }

    Everything seems to be working except the below. I need it to enable the featured image function on woocommerce products. Any idea why it doesn’t work in the child theme, when it was working before directly in the theme?

    add_theme_support( 'post-thumbnails', array( 'post', 'page', 'attachment:audio', 'attachment:video', 'product' ) );

    Thread Starter DidoH

    (@didoh)

    Thanks CrouchingBruin. I have mostly been editing colours, but that is fairly thorough throughout the style.css. I can go back through and pick out the bits I have edited to create a new style sheet. Hopefully that will help.

    Does that mean that my header.php as well as all the other .php files I have edited should only contain the element that is different, not the whole original file including the edited text?

    Thanks for helping out on the navigation colours. The idea behind it is to create a different colour value for the dropdown menu items when the user isn’t hovering over them to when the user is hovering over them. Currently the moment you open the dropdown menu all the menu items have the same colour values as the hover over setting for the rest of the menu so there is no change when you hover over the item. I would like to be able to specify the colour values of the dropdown menu for hover and non-hover separately to the rest of the menu. Is that possible?

    Thread Starter DidoH

    (@didoh)

    Thanks WPyogi and CrouchingBruin! It worked!

    Now I just have to figure out how to spread the items on the menu evenly across the whole area and change the background colour of the dropdown menu on focus rather than hover separately to the rest of the menu items.

    This is what seemed to work before, but doesn’t any more.

    .main-navigation li:hover a,
      color: white;
      background: #00c9c9;
    }
    
    .main-navigation li.focus > a,
    .main-navigation li a:focus {
      color: white;
      background: #455353;
    }
    Thread Starter DidoH

    (@didoh)

    Hi CrouchingBruin, that makes sense. I did copy the whole functions.php because I had edited some of it to make it recognise additional menus. I will paste my edited version below. What do I need to keep/take out?

    <?php
    /**
     * Museum functions and definitions
     *
     * @package Museum
     */
    
    add_action( 'wp_enqueue_scripts', 'enqueue_parent_styles' );
    function enqueue_parent_styles() {
        wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' );
    }
    
    if ( ! defined( 'MUSEUM_VERSION' ) ) {
    	define( 'MUSEUM_VERSION', '0.1.7' );
    }
    
    /**
     * Set the content width based on the theme's design and stylesheet.
     */
    if ( ! isset( $content_width ) ) {
    	$content_width = 920; /* pixels */
    }
    
    if ( ! function_exists( 'museum_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 museum_setup() {
    	/*
    	 * Make theme available for translation.
    	 * Translations can be filed in the /languages/ directory.
    	 * If you're building a theme based on Museum, use a find and replace
    	 * to change 'museum' to the name of your theme in all the template files
    	 */
    	load_theme_textdomain( 'museum', get_template_directory() . '/languages' );
    
    	// Add default posts and comments RSS feed links to head.
    	add_theme_support( 'automatic-feed-links' );
    
    	/*
    	 * 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, pages, and audio/video attachments
    	 *
    	 * @link http://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails
    	 * @link http://make.wordpress.org/core/2014/02/20/audio-video-2-0-update-playlists/
    	 */
    	add_post_type_support( 'attachment:audio', 'thumbnail' );
    	add_post_type_support( 'attachment:video', 'thumbnail' );
    	add_theme_support( 'post-thumbnails', array( 'post', 'page', 'attachment:audio', 'attachment:video', 'product' ) );
    	add_image_size( 'single', 1840, 9999 );
    	set_post_thumbnail_size( 920, 920, true );
    
    	// This theme uses wp_nav_menu() in one location.
    	register_nav_menus( array(
    		'primary' => __( 'Primary Menu', 'museum' ),
    		'social'  => __( 'Social Links', 'museum' ),
    		'secondary' => __( 'Secondary Menu', 'museum' ),
            'mobile' => __( 'Mobile Menu', 'museum' ),
    	) );
    add_filter( 'woocommerce_show_page_title' , 'woo_hide_page_title' );
    
    /**
     * woo_hide_page_title
     *
     * Removes the "shop" title on the main shop page
     *
     * @access      public
     * @since       1.0
     * @return      void
    */
    function woo_hide_page_title() {
    
    	return false;
    
    }
    
    	// Enable support for Post Formats.
    	add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'audio', 'quote', 'link' ) );
    
    	// Use HTML5 elements for these features
    	add_theme_support( 'html5', array( 'comment-list', 'comment-form', 'search-form', 'gallery', 'caption' ) );
    
    	// Adds additional stylesheets to the TinyMCE editor if needed.
    	add_editor_style( array( 'editor-style.css', museum_fonts_url() ) );
    
    	// Remove default gallery styles
    	add_filter( 'use_default_gallery_style', '__return_false' );
    }
    endif; // museum_setup
    add_action( 'after_setup_theme', 'museum_setup' );
    
    /**
     * Register widgetized area and update sidebar with default widgets.
     */
    function museum_widgets_init() {
    	register_sidebar( array(
    		'name'          => __( 'Left Footer Area', 'museum' ),
    		'id'            => 'sidebar-1',
    		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
    		'after_widget'  => '</aside>',
    		'before_title'  => '<h1 class="widget-title">',
    		'after_title'   => '</h1>',
    	) );
    
    	register_sidebar( array(
    		'name'          => __( 'Right Footer Area', 'museum' ),
    		'id'            => 'sidebar-2',
    		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
    		'after_widget'  => '</aside>',
    		'before_title'  => '<h1 class="widget-title">',
    		'after_title'   => '</h1>',
    	) );
    }
    add_action( 'widgets_init', 'museum_widgets_init' );
    
    /**
     * Enqueue scripts and styles.
     */
    function museum_scripts() {
    	wp_enqueue_style( 'museum-style', get_stylesheet_uri(), array(), MUSEUM_VERSION );
    
    	wp_enqueue_script( 'museum-navigation', get_template_directory_uri() . '/assets/js/navigation.js', array( 'jquery' ), MUSEUM_VERSION, true );
    
    	wp_enqueue_script( 'museum-skip-link-focus-fix', get_template_directory_uri() . '/assets/js/skip-link-focus-fix.js', array(), '20130115', true );
    
    	// Only load if Jetpack is active and version is >= 3.4
    	if ( defined( 'JETPACK__VERSION' ) && version_compare( JETPACK__VERSION, '3.4', '>=' ) ) {
    		wp_enqueue_script( 'museum-jetpack-fix', get_template_directory_uri() . '/assets/js/jetpack-infscroll-fix.js', array(), MUSEUM_VERSION, true );
    	}
    
    	if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
    		wp_enqueue_script( 'comment-reply' );
    	}
    }
    add_action( 'wp_enqueue_scripts', 'museum_scripts' );
    
    /**
     * Returns the Google font stylesheet URL, if available.
     *
     * The use of Quattrocento Sans and Playfair Display by default is
     * localized. For languages that use characters not supported by either
     * font, the font can be disabled.
     *
     * @return string Font stylesheet or empty string if disabled.
     */
    function museum_fonts_url() {
    	$fonts_url = '';
    
    	/* Translators: If there are characters in your language that are not
    	 * supported by Quattrocento Sans, translate this to 'off'. Do not
    	 * translate into your own language.
    	 */
    	$quattrocento_sans = _x( 'on', 'Quattrocento Sans font: on or off', 'museum' );
    
    	/* Translators: If there are characters in your language that are not
    	 * supported by Playfair Display, translate this to 'off'. Do not
    	 * translate into your own language.
    	 */
    	$playfair_display = _x( 'on', 'Playfair Display font: on or off', 'museum' );
    
    	if ( 'off' !== $quattrocento_sans || 'off' !== $playfair_display ) {
    		$font_families = array();
    
    		if ( 'off' !== $quattrocento_sans )
    			$font_families[] = urlencode( 'Quattrocento Sans:400,700' );
    
    		if ( 'off' !== $playfair_display )
    			$font_families[] = urlencode( 'Playfair Display:400,400italic,700italic' );
    
    		$protocol = is_ssl() ? 'https' : 'http';
    		$fonts_url = add_query_arg( 'family', implode( '|', $font_families ), "$protocol://fonts.googleapis.com/css" );
    	}
    
    	return $fonts_url;
    }
    
    /**
     * Loads our special font CSS file.
     *
     * To disable in a child theme, use wp_dequeue_style()
     * function mytheme_dequeue_fonts() {
     *     wp_dequeue_style( 'museum-fonts' );
     * }
     * add_action( 'wp_enqueue_scripts', 'mytheme_dequeue_fonts', 11 );
     *
     * @since Museum 1.0
     *
     * @return void
     */
    function museum_fonts() {
    	$fonts_url = museum_fonts_url();
    	if ( ! empty( $fonts_url ) )
    		wp_enqueue_style( 'museum-fonts', esc_url_raw( $fonts_url ), array(), null );
    }
    add_action( 'wp_enqueue_scripts', 'museum_fonts' );
    
    /**
     * Implement the Custom Header feature.
     */
    require get_template_directory() . '/inc/custom-header.php';
    
    /**
     * Custom template tags for this theme.
     */
    require get_template_directory() . '/inc/template-tags.php';
    
    /**
     * Custom functions that act independently of the theme templates.
     */
    require get_template_directory() . '/inc/extras.php';
    
    /**
     * Customizer additions.
     */
    require get_template_directory() . '/inc/customizer.php';
    
    /**
     * Load Jetpack compatibility file.
     */
    require get_template_directory() . '/inc/jetpack.php';
    Thread Starter DidoH

    (@didoh)

    Hi WPyogi,

    if ( ! defined( 'MUSEUM_VERSION' ) ) {
    	define( 'MUSEUM_VERSION', '0.1.7' );
    }

    was in the original functions.php. I didn’t put it there.

    Thread Starter DidoH

    (@didoh)

    This is what I have on line 100 in the museum-child\functions.php

    endif; // museum_setup

    and

    on line 100 in the museum\functions.php all I have is

    }

Viewing 15 replies - 16 through 30 (of 46 total)