What is the `post-status` icon handle when using `@wordpress/icons`?

So after a little digging and being maybe a little bit oblivious 😅. The correct way to use dashicons within WordPress is as follows; import { Dashicon } from “@wordpress/components”; <Dashicon icon=”post-status” /> Note: This info can be found in the Developer Resources: Dashicons docs, but annoyingly it is buried at the bottom of the … Read more

How To Add Class To Style Search Box

The tutorial shows you how to add a class and style it. add_filter( ‘wp_nav_menu_items’,’add_search_box’, 10, 2 ); function add_search_box( $items, $args ) { $items .= ‘<li class=”your-class”>’ . get_search_form( ‘echo=0’ ) . ‘</li>’; return $items; } For CSS questions, please ask on Stackoverflow. But the code doesn’t enable you to select between the primary or … Read more

Why plugin’s icon for the menu not found?

Sometimes i find wordpress can be quite finiky when it comes to referencing files within the plugin. Specifying a full path seems to fix the problem. Try replacing… market_admin/icon.png With… /wp-content/plugins/your-plugin-name-goes-here/your-file-name-goes-here.png

Issue on adding Icons to Custom Post Type

This code works perfectly for me: add_action( ‘admin_head’, ‘my_icons’ ); function my_icons() { ?> <style type=”text/css” media=”screen”> #menu-posts-product .wp-menu-image, .icon32-posts-product { background: url(<?php echo get_template_directory_uri(); ?>/img/contactLensemenu.png) no-repeat center center!important; } #menu-posts-product .wp-menu-image { background-size:16px 16px!important; } .icon32-posts-product { background-size:32px 32px!important; } </style> <?php } ?> PHP part is the same of the yours, (except for … Read more

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

Shown icon if old

Just flip the “less than” < to “greater than” >: <?php if ( date( ‘U’ ) – get_the_time( ‘U’, $post->ID ) > DAY_IN_SECONDS ) : ?>Old Post<?php endif ?> http://codex.wordpress.org/Easier_Expression_of_Time_Constants

social icons not showing

I’m still not sure on the process you used, but here is what i suggest: find out what plugin is using the social and re-install it. TO AVOID WORDPRESS INTERACTIONS: To avoid wordpress interaction and just make changes to the database, this is what i suggest: start over with the process. (not completely necessary, you … Read more

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