4 new WordPress code snippets
Hiding extra items in the user profile In this case, it can be noted that the code hides the color scheme, which often interferes with users' work.
Development lessons from own experience
Hiding extra items in the user profile In this case, it can be noted that the code hides the color scheme, which often interferes with users' work.
Today the lesson is simple and I think many already know how, but those who do not know how to work with a database in WordPress and those who can benefit from this topic, I think, will appreciate it. Get...
The article will be useful for those, who, like me, uses static pages to display a non-standard type of content. When you need to display content in several columns or add a slider to it, while in the admin for...
To highlight the status of a post or page in WordPress, you can use styles. You can add styles using the function, which is launched through a special action. In order for all statuses in the admin panel to be highlighted on your site...
The code I proposed will display additional classes in the body tag that will show which operating system and browser the user is using., who visited the site. Code works for CMS WordPress, just add the code snippet to the file...
The font is quite easy to change., you need to create a filter and use it to add a new style in the WordPress admin for the editor. Will make the editor font change like this:
1 2 3 4 5 |
add_action( 'admin_head-post.php', 'devpress_fix_html_editor_font' ); add_action( 'admin_head-post-new.php', 'devpress_fix_html_editor_font' ); function devpress_fix_html_editor_font() { ?> <style type="text/css">#editorcontainer #content, #wp_mce_fullscreen { font-family: Georgia, "Times New Roman", "Bitstream Charter", Times, serif; }</style> <?php } |
Just add the above code to the functions.php file....
Two years ago, I sat down very strongly for the WordPress CMS and to this day I think, that on this cms you can do anything and for this you do not always need to look for other people's plugins, sometimes...
Often, working with WordPress themes, i stumble upon animation, created with JavaScript libraries. The most popular, about which I think most of those have heard, who visits the site is jquery. The library is great but too popular to...
In my Vkontakte group I was asked a question, how to change the design of the WordPress CMS admin panel. I think the official guide will help me with this question, as always., let's get started together. Going to the Codex WordPress site, I, as always,...
Adding a caption for the post thumbnail It's simple, if you need to leave a comment for your moderators, then this can be done using the code for inserting text into the metabox of the thumbnail right below it.
1 2 3 4 |
add_filter( 'admin_post_thumbnail_html', 'add_featured_image_html'); function add_featured_image_html( $html ) { return $html .= '<p>Миниатюра записи это маленькая картинка, которая добавляется администратором и обычно отображается в начале поста.</p>'; } |
By adding code, you...