8 – CSS administration toolbar divided by theme

I am having a problem with the Admin toolbar. Whenever I create a theme and set a default style guide for typography, for example:

...
h2 {
  font-size: 3rem;
}

p {
  font-size: 1.2rem;
}
...

The CSS in the admin toolbar takes these style rules. I tried to look for a fix that would fix the CSS styles of the Admin toolbar, so it's more nested than my style guide will not replace it, but I couldn't find anything.

My theme's libraries are limited only to the theme, so they shouldn't affect admin pages (and yes, I understand that the admin toolbar is also part of my theme and that it is not classified as an admin page)

Is there a way to set the default typography h1, h2, h3, … h6, p … (like when you make a website without CMF / CMS) and do not affect the CSS styles of the Admin toolbar?

personalization – custom theme, add media not showing images in media library

I am a beginner in theme development, I created a theme following an online tutorial. when i try to add pictures in a message using the Add Media button, it opens but shows no pictures, the loader continues to run. But accessing the media library directly shows that there are pictures in it.
What am I forgetting here? changing the theme to one of the wordpress themes corrects the problem, but i would use my theme.

Translation problem with WordPress theme Archive comment_form function

I have finished my wordpress theme, which was called the_mdttheme.

I tried to check it out and get two translation errors in comment_form().

I don't understand what went wrong, can anyone help me? Here are two warnings:

WARNING: found a translation function that is missing a text domain. Function _x, with the arguments & # 39; Comment & # 39 ;, & # 39; the_mdttheme & # 39;

WARNING: found a translation function that is missing a text domain. Function _x, with the arguments & # 39; Comment * & # 39 ;, & # 39; the_mdttheme & # 39;

Here is my code, the warnings are inside 'comment_field':

$args = array(
    'comment_field' => '

', 'submit_button' => '
', 'label_submit' => __( 'comment', 'the_mdttheme' ), ); comment_form($args);

Thanks in advance!

wordpress wallpapes theme

Sell ​​a WordPress wallpaper theme to create your wallpaper website
all features included
price $ 50
if you are interested add me on skype: div.coders
i will send screenshots and a working demo
tnx

siebar in 2020 theme as widget

I am using the default 2020 theme for my wordpress site which has a static page displayed as a front-end.

Now I want a sidebar (right) to display my links (blogroll) and my recent articles.

Where is the sidebar and how to include it as a widget in the 2020 theme?
Or should I modify the singular.php file to include the div in the sidebar?

magento2 – Replace minus cart icon minus in custom theme

I created a custom theme replacing a luma, I placed the minus tracking in _extend.less, but there is no Vendor effect default web css source_extend.less

.icons-font-list {
    list-style: none;
    padding: 0;
    li {
        float: left;
        width: 25%;
        margin-bottom: 35px;
        text-align: center;
        > span {
            .lib-icon-font('', @_icon-font-size: 34px);
            &:before {
                content: attr(data-icon);
                margin: 0 auto;
                display: block;
                border-style: solid;
            }
        }
    }

}

css original frontend:

.minicart-wrapper .action.showcart:before {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 22px;
    line-height: 28px;
    color: #757575;
    content: 'e611';
    font-family: 'luma-icons';
    margin: 0;
    vertical-align: top;
    display: inline-block;
    font-weight: normal;
    overflow: hidden;
    speak: none;
    text-align: center;
}

Display custom toxicity in WordPress and the theme widget category selection drop-down list

is using a Premium theme, but unfortunately the developer has abandoned the theme. He's now broken with recent WordPress updates and worried about security risks, so I'm now trying to move on to another topic.

The problem is that the theme I am using is fortunately accompanied by types of personalized messages such as "Videos" added via the theme plug-in.

I am now having trouble creating custom toxicity
or categories so that CPT "Video" appears both in native WordPress widgets and in the drop-down list of categories in the new Widget theme. The only categories I get are only for default posts.

Any help will be greatly appreciated. I am not very familiar with php.

wp admin – only the last option of the theme options is saved in the database

I have these admin page functions where i try to invite the admin for some text data.

the problem that is that the last field is saved and existed in the database, the former do not exist at all in the database.

Adding options to the administration page:

 register_setting( 'top-data-group', 'yourLogo');
 register_setting( 'card1-group', 'card1_text');
 register_setting( 'card4-group', 'card4_text');


  add_settings_section('top-options', 'Top Information', 'top_options', 'top-data' );
  add_settings_section('card1', 'Card 1', 'card1_options', 'top-data' );
  add_settings_section('card4', 'Card 4', 'top_options', 'top-data' );


 add_settings_field('yourLogo', 'Logo Image URL:', 'yourLogoImage_callback', 'top-data', 'top-options'  );
 add_settings_field('card1_text', 'card 1 text:', 'card1_text_callback', 'top-data', 'card1'  );
 add_settings_field('card4_text', 'card 4 text:', 'card4_text_callback', 'top-data', 'card4'  );

callback functions:


function card1_text_callback (){
    $preText =  esc_attr( get_option('card1_text'));
     echo '  ';
 }


function card4_text_callback (){
    $preText =  esc_attr( get_option('card4_text'));
     echo '  ';
 }

function yourLogoImage_callback (){
    $preText =  esc_attr( get_option('yourLogoImage'));
     echo '  

use external or internal image url , preferred (300 * 50 px)

' ; }

the form page:

Top Section

only the last option is saved in the database, the first are all empty.

Theme – Upgrade to Drupal 8, custom theme using no referenced CSS file

I update a theme from Drupal 7 to Drupal 8. I reference .css files in mytheme.library.yml which do not seem to be attracted to the site.

I watched online and even copied coding examples and replaced the names appropriately. However, I don't see their application or reference to a .css file, in the source code or the development tools.

If these files appear to be correct, then any direction to what could be causing this will be appreciated. If these are permissions, let me know which permissions SHOULD be!

I have cleared the cache hundreds of times after each change, and I am using incognito mode, so I know that this is not a browser or site caching issue .

Thank you.

Content of sites / all / themes / mytheme / mytheme.info.yml

name: MyTheme
type: theme
description: My theme.
core: 8.x
base theme: bootstrap
logo: logo.png

regions:

  navigation: 'Navigation'
  header: 'Top Bar'
  highlighted: 'Highlighted'
  help: 'Help'
  content: 'Content'
  sub_content: 'Sub-content'
  sidebar_first: 'Primary'
  sidebar_second: 'Secondary'
  footer: 'Footer'
  page_top: 'Page top'
  page_bottom: 'Page bottom'
  footer_firstcolumn: 'Footer first column'
  footer_secondcolumn: 'Footer second column'

libraries:
  - mytheme/global-assets

Content of sites / all / themes / mytheme / mytheme.library.yml

global-assets:
  version: VERSION
  css:
    theme:
      css/main.css: {}
      css/bootstrap.css: {}
  js:
    js/main.js: {}
    js/bootstrap.min.js: {}
    js/enquire.min.js: {}
    js/jquery.main.js: {}

Any help or guidance would be appreciated.

Thank you

8 – Get the site ID from the module (vs theme)

I have the following code in my custom theme which works well and allows me to test against multisite_id in my twig files:

function mytheme_preprocess_page(&$variables) {

 $site_path = Drupal::service('site.path');  
 $site_path = explode("https://drupal.stackexchange.com/", $site_path);
 $site_name = $site_path(1);
 $variables('multisite_id') = $site_name;

}

I need the same functionality inside a module. I can't access the multisite_id var from the module.

I am new to module development. I can't get the same preprocessing hook to work from my .module file. Is there a different approach when using a module?