Viewing 15 replies - 1 through 15 (of 22 total)
  • sacredpath

    (@sacredpath)

    Automattic Happiness Engineer

    Hi John, I’m not seeing any additional thumbnails on the pages you referenced. Did you get this resolved?

    Thread Starter johnnyivan

    (@johnnyivan)

    Thanks for your help on this—too.

    Actually, I hadn’t but noticed about an hour ago that when I activated the ‘Illustratr’ theme—without using my child theme which had virtually nothing in its CSS—those extra items disappeared.

    Weird! I’m going to take a closer look at that CSS file and see if there’s some error in it.

    Thread Starter johnnyivan

    (@johnnyivan)

    I honestly can’t see any errors in this (beginnings of) a child theme’s CSS:

    @charset "UTF-8";
    /* CSS Document */
    
    /*
     Theme Name:   child-1
     Theme URI:    https://johnwhiteillustrator.com/wordpress/wp-content/child-1/style.css
     Description:  My Child Theme of Illustratr
     Author:       John White
     Author URI:   https://johnwhiteillustrator.com
     Template:     sketch
     Version:      1.2.2
     */
    
    @import url("../illustratr/style.css");
    
    .has-site-logo .site-title {
    	text-indent:-9000px;
    }
    p.intro {
    	color: #a97b50;
    	/*font-size: 1.6rem;*/
    	font-weight: 600;
    }
    .main-navigation ul li {
    color: #a97b50;
    }
    sacredpath

    (@sacredpath)

    Automattic Happiness Engineer

    CSS couldn’t duplicate the images, I would take a look at the functions.php file. Did you make any additional customizations in the php files?

    Also, with the child theme activated, try disabling all plugins and see if that makes any difference.

    If you could leave the child theme active with the double images, I could take a look at it for you.

    Thread Starter johnnyivan

    (@johnnyivan)

    Hi there,
    CSS

    It doesn’t seem to be “duplicate content” —but rather, additional content.
    I was thinking that that content is meant to be hidden under normal circumstances, but my child theme CSS might be revealing it again (somehow).

    I’ve activated the child theme again, as requested, so you can see the extra unwanted content.

    PHP files

    I made no changes to those. It didn’t seem to be necessary when creating the theme. I’d read things about deleting and recreating index.php or functions.php (I think) to make a child theme, but I don’t seem to have ever had to do this on other sites.

    I’ll look forward to seeing what you discover—thanks again ??

    Thread Starter johnnyivan

    (@johnnyivan)

    I’m using GK Portfolio theme now—having evluaated lots of themes today. None are giving those problems so far. I suspect it was the child theme—which used a simple old-fashioned ‘import’ method. Apparently that’s not advised these days due to speed issues.

    Anyway, I just added a child theme to GK Portfolio it and didn’t get the problem we’re discussing.

    However, all the styling was screwed up. It’s almost as if some themes RESIST child themes.

    It’s outside of this remit of this discussion and adding another factor, but to be honest, this GK theme is so good, I mightn’t want to change anything anyway.

    John

    Moderator Kathryn Presner

    (@zoonini)

    Hi @johnnyivan – I know you’ve already switched themes, but I saw a couple of problems in your child-theme stylesheet for Sketch that I wanted to mention. If you made the same errors in your newer child theme, that could explain why it’s not working:

    Firstly, this should not be at the top of your child theme’s stylesheet:

    @charset "UTF-8";
    /* CSS Document */
    

    Second, this import line is referencing a different theme – Illustratr, not Sketch.

    
    @import url("../illustratr/style.css");
    

    That said, importing styles is an older child-theme method that isn’t used much anymore. Instead, it’s recommended to enequeue the parent theme’s styles in functions.php using a generic function like this:

    add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );
    function my_theme_enqueue_styles() {
        wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
    
    }

    If you do decide to switch back to Sketch, as Richard said, we’d be glad to have another look.

    Thread Starter johnnyivan

    (@johnnyivan)

    Hi Kathryn,
    Thanks so much for your time and effort in helping with this.

    My current version of the sketch child theme seems to correctly reference…

    @import url("../sketch/style.css");

    …and the thumbnails prob seems to have cleared up! I think I must have noticed my error at some point yesterday and fixed it.

    This is interesting what you say about:

    @charset "UTF-8";
    /* CSS Document */

    That’s standard code that Dreamweaver puts into new CSS files (I use it as an editor). Are you sure it’s wrong/potentially problematic?

    Thread Starter johnnyivan

    (@johnnyivan)

    Oh, and I’ll have a go at that functions.php method, Kathy. I believe it’s meant to slow sites less than the old import method.

    Should I
    – Create a completely blank functions.php file and pop it into my child theme directory?
    – And simply paste your code into it, exactly as it is with no modifications?

    I’d imagine the target parent theme directory needs to be specified, like:

    get_template_directory_uri() . 'sketch/style.css' );

    But I’m not a coder, so I’m probably mistaken.

    Thanks,
    John

    Thread Starter johnnyivan

    (@johnnyivan)

    Sorry, I just read through this guide and it’s too complicated for me.

    https://codex.www.ads-software.com/Child_Themes

    I might need to stick to the old way.

    Moderator Kathryn Presner

    (@zoonini)

    That’s standard code that Dreamweaver puts into new CSS files (I use it as an editor). Are you sure it’s wrong/potentially problematic?

    Yes, I’m sure. ?? WordPress stylesheets, including those for child themes, must begin with the standard WordPress “stylesheet header” – with nothing before it:

    https://codex.www.ads-software.com/Theme_Development#Theme_Stylesheet

    Here are two good child-theme tutorials:

    https://www.smashingmagazine.com/2016/01/create-customize-wordpress-child-theme/

    I also have a hands-on workshop here that you’re welcome to go through: https://zooninidev.com/child-theming/

    Just let us know if you need further help.

    Thread Starter johnnyivan

    (@johnnyivan)

    Ah, OK Kathryn. They’re gone now.

    I’ve actually used a plug-in today called ‘Child Theme Configurator’ whcih does all the complex stuff for me. So all good.

    Working with any of these porfolio themes is extremely problematic and time-consuming. They all seem to have bugs, or quirks that are extremely difficult to track down and fix.

    The GK Portfolio theme which I love isn’t showing tags or categories within project posts (essential for me) and suddenly the thumbnail images are blank on the ‘portfolio’ page. No idea why. Anyway, it’s outside the remit of this forum and I’m trying to get solutions on the GK forum.

    Moderator Kathryn Presner

    (@zoonini)

    Good luck with the GK support. I’ll mark this as resolved since the original Sketch issue is solved.

    Thread Starter johnnyivan

    (@johnnyivan)

    Thanks Kathryn.

    Thread Starter johnnyivan

    (@johnnyivan)

    Hi again Kathryn and Richard.

    After problems with GK Portfolio, and seeing that its Forum is very inactive with people getting little response to their queries, I’ve come back to Sketch.

    This extra thumbnails issue on my homepage is a weird one.
    https://johnwhiteillustrator.com/wordpress/

    I CAN get rid of them if the chosen ‘static page’ does NOT use the Portfolio Page Template — but rather the ‘Default Template’ (with this brief shortcode in it [portfolio columns=3])

    So that’s good. But I’m puzzled by the fact that I have, and can edit this page — for my static homepage — titled Portfolio All with this permalink:

    `https://johnwhiteillustrator.com/wordpress/portfolio/’

    Perhaps I made the mistake of naming it that at some point a few days ago, not realising that that page is supposed to be automatically generated — and is uneditable.

    Sorry, that’s a lot of stuff.

    Thanks,
    John

Viewing 15 replies - 1 through 15 (of 22 total)
  • The topic ‘Why am I getting Extra Thumbnails on portfolio pages?’ is closed to new replies.