Okay
  Public Ticket #1340450
Child theme
Closed

Comments

  • MattT80 started the conversation

    I've created a child theme for Stoked! as I wanted to customise the Category page - Basically remove the bit that says 

    "Category: "

    before each category. 

    However, I'm getting this error within admin screen: 

    Wp-Scss: One or more specified directories does not exist. Please create the directories or update your settings.

  • MattT80 replied

    Some more details on error message: 
    "
    Fatal error: Uncaught Error: Call to undefined function get_theme_mod() in /home/xxxxxxxxxxxxxxxxxxxxx/staging/2/wp-content/themes/stoked/partials/part-newsticker.php:2 Stack trace: #0 {main} thrown in /home/xxxxxxxxxxxxxxxxxx/staging/2/wp-content/themes/stoked/partials/part-newsticker.php on line 2" 

  •  93
    djwd replied

    Hi there,
    does that notice from WP-SCSS show up also when using the parent theme or only on the child one? 

    Regards
    djwd

  • MattT80 replied

    Only on child theme

  •  93
    djwd replied

    Hi, could you provide admin access so I can take a peek? Thanks ( please remember to mark the post as private)

    Regards
    djwd

  •   MattT80 replied privately
  •  93
    djwd replied

    Hi,

    I'm trying to figure out why you see the category archives like that, as it should show up like this.

    Did you edit/override any file or use any plugin that could possibly cause this?

    Regards
    djwd

  • MattT80 replied

    Hmm I haven't overridden any files as using parent theme. 

    Have checked plugins and nothing there that would cause this, that I can see! 

  •  93
    djwd replied

    That's odd, I'd need admin access so I can take a closer look.

    Regards
    djwd

  •   MattT80 replied privately
  •  93
    djwd replied

    Hi there, thanks.

    When disabling all plugins category titles show as expected:

    Please re-enable them one by one to detect who's responsible for filtering the category titles.
    After that is sorted out if you still want to remove the 'Browsing Category'  text I can help you with some custom CSS without the need of using a child theme.

    Hope it helps

    Regards
    djwd

  • MattT80 replied

    It's the AMP for WP plugin that's causing the issue

    Please could you not disable any more plugins . I had to reactive one that needed license keys etc and reconnect jetpack

  •  93
    djwd replied

    Apologies about that although after 20 minutes trying to understand the cause of this I had to do it as disabling plugins is the first step to take when troubleshooting any issue. In fact turns out a plugin was the cause of it.

    The official plugin to enable AMP support is AMP by Automattic, you might want to use this instead.

    Please let me know if I can help any further.

    Regards
    djwd

  • MattT80 replied

    Understood :)

    If there's a simple css tweak then that would be a lot better? 

  •  93
    djwd replied

    Sure, you can remove the icon and the 'Browsing category' text by adding this in Customizer > Advanced > Custom CSS textarea

    .archive .page-title span, 
    .archive .page-title i {
        display:none;
    }
    

    Hope it helps

    Regards
    djwd

  • MattT80 replied

    Sorry to be clear , from original post: 

    I wanted to customise the Category page - Basically remove the bit that says 

    "Category: "

    before each category. "

  •  93
    djwd replied

    I got it, although my fix implies that you deactivate the plugin that causes the issue (AMP for WP), as the "Category: " text is not from Stoked! but from the plugin (considering that, even a child theme wouldn't help).

    Regards
    djwd

  • MattT80 replied

    Thanks for the quick replies so far. I don't want to deactivate the AMP for WP plugin. 

    The child theme was not displaying correctly due to an error stated in original post "Wp-Scss: One or more specified directories does not exist. Please create the directories or update your settings."

  •  93
    djwd replied

    Okay I missed the fact you don't want to deactivate the plugin.

    In that case what I'm saying is that even a child theme wouldn't help, as the plugin is overriding the theme filter with a higher priority, and would do the same with the child theme.

    Out of curiosity, is there any specific reason you prefer the AMP for WP plugin over the AMP plugin by Automattic (Wordpress founders)?

    Regards
    djwd

  • MattT80 replied

    Ah I see.

    The Automattic one 

    • Last updated:2 months ago
    • Note #1: that Pages and archives are not currently supported. Pages support is being worked on.

    AMP for WP

    • Last Updated: 1 day ago
    • Looks like it has way more features & support. 

    Will ask them if they can help debug the category issue

  • MattT80 replied

    Saying all that, not sure I need AMP right now, the site looks great in mobile without AMP etc... 

  •  93
    djwd replied

    Alright thanks for the info.

    Wait though, I may found another solution as I've tested the plugin myself. 
    I've set a higher priority for the theme filter, try by replacing the file in inc/fn/fn-tools.php with the attached one. It should revert back to Stoked! default archive headers design, then you can use the Custom CSS if you want to remove the extra stuff.

    If it works I will include this in the next theme update so don't need to worry about losing changes.

    Regards
    djwd

  • MattT80 replied

    Thanks that seemed to work! :) 

  •  93
    djwd replied

    Awesome! Glad that was finally sorted out

    Regards
    djwd