How to display an icon when a new post is published and then remove it when a specific time past?

Filter the content of post_class(): add_filter( ‘post_class’, function( $classes ) { if ( is_singular() ) return $classes; // now minus last mod time in seconds $diff = time() – mysql2date( ‘U’, $post->post_date ); if ( DAY_IN_SECONDS <= $diff ) $classes[] = ‘new-post’; return $classes; }); Now, in your loop, use post_class(), and you get an … Read more

How can I make my Admin Icon SVG color correctly? [closed]

From Codex: $icon_url […] * Pass a base64-encoded SVG using a data URI, which will be colored to match the color scheme. This should begin with ‘data:image/svg+xml;base64,’. WordPress will change color of your SVG if you use SVG content instead of the file URL. (JS code responsible for changing the color is in svg-painter.js file.) … Read more

Extending Genericons in WordPress

You need something like Fontastic or Grunticon to create your custom fonts/icons. Then just add your fonts to your html with wp_enqueue_style() or add the head elements directly. There is a section on the Genericons GitHub that describes Building your own Genericons using FontCustom or Fontello.

How to use a WordPress’ existing admin icon?

add_menu_page(); as far as I can tell does not work with screen_icon or the default CSS parameters. The $icon paramater only takes 2 options, an url or div (well 3 if you leave it empty), so that leaves you with these options: Hard-code the link to the icons which are located in wp-includes/images/wpicons.png. This is … Read more

How do I set up the defualt page icon for admin menu?

Assuming you’re running WP 3.8, you can choose from a collection of icons (listed here). In your case, replace your icon URL with dashicons-admin-page, like so: add_menu_page( ‘Info’, ‘Info’, ‘manage_options’, ‘LINK’, ”, ‘dashicons-admin-page’, 10 ); You can use these icons in various places around WP. There are various articles on this like this one.

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