Customizing wordpress to match your site theme

Install wordpress. Get the style.css file from the default theme (at /wp-content/themes/twentyten/style.css). Open that file, you will see it is very well structured and commented. With just a few copy/paste from your current site’s css to this file you will start to see the changes. If after playing with the CSS you feel the need … Read more

getting url in wp_enqueue_style

To enqueue extra styles you should place the following code in your functions.php function my_custom_styles() { wp_enqueue_style( ‘custom-style’, get_stylesheet_directory_uri() . ‘/custom_style.css’); } add_action( ‘wp_print_styles’, ‘my_custom_styles’ );

Custom Admin CSS styles to style media uploader?

Its likely that you’re not enqueing your CSS file to be used in the admin area, however you did not say. Anyway, this is what you can do… Place the following into your functions.php file: add_action( ‘admin_print_styles’, ‘my_admin_css’ ); add_action( ‘wp_enqueue_scripts’, ‘my_admin_css’ ); function my_admin_css(){ if( is_admin() ) { wp_enqueue_style( “media_upload”, get_bloginfo(‘template_directory’).”/css/custom_admin.css”, false, false, “all” … Read more

CSS file not registering through add_action

The primary issue is an incorrect template conditional tag: if( is_page( ‘home’ ) ) {} This returns true if the current context is a static page, with the slug home. I presume that you’re actually wanting to test for the Site Front Page – in which case you need to use the is_front_page() conditional: if … Read more

Remove Genericons Helper CSS from twentyfourteen theme

First of all, you’re trying to deregister a stylesheet that doesn’t exist. Here is how the genericon stylesheet is enqueued in twenty fourteen wp_enqueue_style( ‘genericons’, get_template_directory_uri() . ‘/genericons/genericons.css’, array(), ‘3.0.2’ ); You are trying to dequeue the stylesheet file name. Here is the wp_enqueue_style() function wp_enqueue_style( $handle, $src, $deps, $ver, $media ); The important part … Read more

How to add 10 different css class to posts

Use the function post_class() in your template: <div <?php post_class(); ?>> // your post content </div> Then add a counter to the post classes per filter on post_class: // functions.php add_filter( ‘post_class’, function( Array $classes ) { static $number = 1; $classes[] = ‘post-number-‘ . $number++; // reset the number if ( 11 === $number … Read more

How to set different font family based on text language?

This question is not about WordPress but about css. Actually there even is a straightforward solution, because css-3 has an attribute called unicode-range, which allows you to load fonts based on the character set. For Tamil the unicode block is U+0B02..U+0BCD. So, if you have the english font as a standard you can easily change … Read more

Override load-styles.php with admin screen css

If its just that one style you want to edit, you could try… add_action(‘admin_head’, ‘admin_styles’); function admin_styles() { echo ‘<style> #poststuff #post-body.columns-2 { margin-right: 300px; dispay:flex important; flex-direction:column !important; } </style>’; } Or add a separate stylesheet with something like this… add_action(‘admin_head’, ‘admin_styles’); function admin_styles() { echo ‘<link rel=”stylesheet” href=”https://wordpress.stackexchange.com/questions/314539/style.css” type=”text/css” media=”all” />’; }

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)