• Resolved tomnordh

    (@tomnordh)


    Hi, i set up a wordpress site a few weaks ago and after some tweaks and fixing i was pleased with the twenty tweld child theme.

    However, yesterday the childtheme stopped working, and looks weird. I have not made any changes for a week or two.

    Other child themes looks weird too, the standard twenty twelve looks and functions normal.

    How it’s suppose to look, and sometimes does at startpage, but then stoppes working whgen browsing around.
    https://postimg.org/image/6rue57xp9

    With my old child theme.
    https://postimg.org/image/r0hrqxx0d/

    Tried with twenty plus lite, but that looks weird too.
    https://postimg.org/image/8idf6pf8d/

    I have tried deactivating plugins and widgets, reinsalled wordpress and themes, no help…

    link to site: https://www.corpushalmstad.se/

    What could be wrong? I would prefer staying with the twenty twelve theme, and a child theme to fix another menu for mobile devices…

Viewing 7 replies - 1 through 7 (of 7 total)
  • 1. Download WordPress and replace your copies of everything EXCEPT the wp-config.php file and the /wp-content/ directory with fresh copies. This should replace your core files without changing your content and settings in wp-config.php file and the /wp-content/ directory. Note. First delete the wp-admin and wp-includes folders, then upload fresh copies.

    2 Rename the plugins folder to plugins.old (this will deactivate all plugins on the site.

    3. Switch to a default theme (you can rename individual theme’s in the same manner as above in wp-content/themes folder if needed). Leave just one default theme that is not renamed, WordPress will use it.

    This will set you back to a default fresh install.

    Next, rename the plugins folder back and then activate one plugin only at a time (not any caching ones), and see if the behavior returns. If it does return, you have found the item that needs addressing.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    I checked your site right now, I see no issues as illustrated: https://postimg.org/image/r0hrqxx0d/

    Thread Starter tomnordh

    (@tomnordh)

    Pioneer Valley Web Design, thanks, but after trying to do that twice it’s still the same problems.

    Also tried downgrading from 4.1.1 to 4.1, no luck.

    Andrew maybe you looked at a time when i tried the regular twenty twelve theme, beacuse se problems are still there =(

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    Images are hands down the worst way to support child themes. Can you please post a link to your child theme’s style.css file?

    Child themes work for 4.1.1. ?? What we need to see is not the results (images) but the child theme style.css file and child theme functions.php file if you are using one.

    Thread Starter tomnordh

    (@tomnordh)

    style.css

    /*
    Theme Name: Corpus
    Theme URI: https://www.corpushalmstad.se/
    Description: Modifierat tema for Corpus Callosum
    Template: twentytwelve
    Version: 0.9.9
    */
    
    @import url("../twentytwelve/style.css");
    
    /* hide the default responsive menu and menu button */
    button.menu-toggle {display: none}
    .main-navigation ul.nav-menu, .main-navigation div.nav-menu > ul {display: none;}
    
    /* hide the default responsive menu and menu button */
    button.menu-toggle {display: none}
    .main-navigation ul.nav-menu, .main-navigation div.nav-menu > ul {display: none;}
    
    /* new responsive selectnav css */
    .selectnav { display: none; }
    select.selectnav {margin:0 auto;} /* centers select */
    
    /* small screen */
    @media screen and (max-width: 600px) {
    .js #menu-top { display: none; }
    .js .selectnav { display: block; }
    }

    functions.php

    <?php
    
    add_action( 'wp_print_scripts', 'deregister_navscript', 100 );
    function deregister_navscript() {
        wp_deregister_script( 'twentytwelve-navigation' );
    }
    
    wp_enqueue_script( 'twentytwelve-mobile-navigation', get_stylesheet_directory_uri() . '/js/selectnav.js', array(), '1.0', true );
    
    function wp_custom_archive($args = '') {
        global $wpdb, $wp_locale;
    
        $defaults = array(
            'limit' => '',
            'format' => 'html', 'before' => '',
            'after' => '', 'show_post_count' => false,
            'echo' => 1
        );
    
        $r = wp_parse_args( $args, $defaults );
        extract( $r, EXTR_SKIP );
    
        if ( '' != $limit ) {
            $limit = absint($limit);
            $limit = ' LIMIT '.$limit;
        }
    
        // over-ride general date format ? 0 = no: use the date format set in Options, 1 = yes: over-ride
        $archive_date_format_over_ride = 0;
    
        // options for daily archive (only if you over-ride the general date format)
        $archive_day_date_format = 'Y/m/d';
    
        // options for weekly archive (only if you over-ride the general date format)
        $archive_week_start_date_format = 'Y/m/d';
        $archive_week_end_date_format   = 'Y/m/d';
    
        if ( !$archive_date_format_over_ride ) {
            $archive_day_date_format = get_option('date_format');
            $archive_week_start_date_format = get_option('date_format');
            $archive_week_end_date_format = get_option('date_format');
        }
    
        //filters
        $where = apply_filters('customarchives_where', "WHERE post_type = 'post' AND post_status = 'publish'", $r );
        $join = apply_filters('customarchives_join', "", $r);
    
        $output = '<ul>';
    
            $query = "SELECT YEAR(post_date) AS <code>year</code>, MONTH(post_date) AS <code>month</code>, count(ID) as posts FROM $wpdb->posts $join $where GROUP BY YEAR(post_date), MONTH(post_date) ORDER BY post_date DESC $limit";
            $key = md5($query);
            $cache = wp_cache_get( 'wp_custom_archive' , 'general');
            if ( !isset( $cache[ $key ] ) ) {
                $arcresults = $wpdb->get_results($query);
                $cache[ $key ] = $arcresults;
                wp_cache_set( 'wp_custom_archive', $cache, 'general' );
            } else {
                $arcresults = $cache[ $key ];
            }
            if ( $arcresults ) {
                $afterafter = $after;
                foreach ( (array) $arcresults as $arcresult ) {
                    $url = get_month_link( $arcresult->year, $arcresult->month );
                    /* translators: 1: month name, 2: 4-digit year */
                    $text = sprintf(__('%s'), $wp_locale->get_month($arcresult->month));
                    $year_text = sprintf('<li>%d</li>', $arcresult->year);
                    if ( $show_post_count )
                        $after = '?('.$arcresult->posts.')' . $afterafter;
                    $output .= ( $arcresult->year != $temp_year ) ? $year_text : '';
                    $output .= get_archives_link($url, $text, $format, $before, $after);
    
                    $temp_year = $arcresult->year;
                }
            }
    
        $output .= '</ul>';
    
        if ( $echo )
            echo $output;
        else
            return $output;
    }
    
    ?>

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    Adding a new post here for the email. DOH! You posted a link in the first post. xD

    This is what I see for your site.

    <link rel='stylesheet' id='twentyfifteen-style-css' href='https://www.corpushalmstad.se/wp-content/themes/twentyfifteen/style.css?ver=4.1.1' type='text/css' media='all'/>

    Did you switch back to the original theme?

    Thread Starter tomnordh

    (@tomnordh)

    i tried to reinstall wordpress from the controll-panel at the webhosting company.. just in case.. and unattentionally removed the database too.

    Learning by doing.. i’will post again if i manage to get the backup up.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Twenty Twelve child them(es) has stopped working’ is closed to new replies.