• Home
  • Portfolio
  • WordPress
    • Plugins
      • Google Analytics Head
      • Post/Page specific custom CSS
      • Queen Inspirations
    • Themes
    • Others
      • Localize JavaScript code
      • Custom bulk actions
      • Hide your login
      • Admin buttons
  • GitHub

Łukasz Nowicki

Lead PHP/WordPress Engineer

  • WordPress
  • Woocommerce
  • PHP
  • Plugin
  • Development
  • Github
  • Windows
  • Gulp
  • WordPress
  • Woocommerce
  • PHP
  • Plugin
  • Development
  • Github
  • Windows
  • Gulp

Popular posts

  • Insert new woocommerce product programmatically
  • Add woocommerce category programmatically
  • Get_terms and invalid taxonomy
  • Assign woocommerce product categories programmatically
  • WordPress 4.7
Development, Woocommerce, WordPress

Get woocommerce random products

Sometimes people asks me how to get N random products from Woocommerce plugin. Well, I heard it isn’t obvious or easy. And still I don’t know why. It is more…

read more
January 10, 2017
Development, Woocommerce, WordPress

Woocommerce product category fields

Yeah, we step into Woocommerce chambers. This is a huge, good plugin, widely recognizable, used on many many e-commerce sites. They got nice product category taxonomy and it works fine.…

read more
February 28, 2016
Development, WordPress

WordPress Toolbar a.k.a. Admin Bar

First things first. Why WordPress Toolbar a.k.a. Admin Bar? Well, a lot of people knows Toolbar as Admin Bar. Still. To be honest, it was Admin Bar. It was Admin…

read more
December 23, 2016
  • Windows

    Removing same part of the file in Windows

    January 17, 2017 /

    Once upon the time… All right, it was yesterday. I had to clean up some site, than someone build long time ago. There was an image library, it contains hundreds of images. And it is ok, but all of the images contains “image_” prefix. And all of the images are in /images folder. Unnecessary redundancy I though to myself and I decided to remove “image_” prefix for all image files. And I almost open PHP editor to write short script… And then I thought – damn, we’ve got shell here, it’s Windows! So I opened Windows PowerShell and wrote something like this: PS C:\server\sites\old-site\images> get-childitem | foreach { rename-item $_…

    read more
    Łukasz Nowicki 1 Comment

    You May Also Like

    Symbolic links – test your themes and plugins

    January 5, 2017

    Using gulp to make your WordPress site runs faster

    January 26, 2017
  • Development,  WordPress

    How to add your custom css or js on admin screen?

    January 12, 2017 /

    How to add your custom CSS or JS on admin screen? Well, it’s pretty easy. We need to hook into admin_enqueue_scripts action and this is the best and only solution. So, let’s write some code: [crayon-651dc441eb785893042853/] Please note the $hook variable. Thanks to its value you may enqueue your scripts/styles depending on active admin screen. It is important, because you should not enqueue your scripts or styles where it isn’t necessary. Second thing, first conditional is_admin. It’s pretty obvious, but I have to mention it. Do not even hook into admin_enqueue when you are not on admin screen.

    read more
    Łukasz Nowicki 1 Comment

    You May Also Like

    Add meta boxes on Front Page only without template

    June 18, 2017

    Showing all errors and warnings

    January 8, 2018

    How to get rid of Open Sans and save admin bar?

    August 1, 2016
  • Development,  Woocommerce,  WordPress

    Get woocommerce random products

    January 10, 2017 /

    Sometimes people asks me how to get N random products from Woocommerce plugin. Well, I heard it isn’t obvious or easy. And still I don’t know why. It is more than easy! We just need to use get_posts function. Simplest function to get N random products (default value is three as you may see in the source code) would look like that: [crayon-651dc441ec6c7990551226/]

    read more
    Łukasz Nowicki 0 Comments

    You May Also Like

    Did you forget to signal async completion?

    September 4, 2018

    Date and Time – PHP way – part 3

    July 3, 2017

    Let’s build WordPress theme – part 2

    October 16, 2014
  • Windows,  WordPress

    Symbolic links – test your themes and plugins

    January 5, 2017 /

    Symbolic links are great feature in Linux/Unix. Mac has this feature even in its GUI. Many of you knows that Windows can handle symbolic links too. But there are some people that doesn’t know about this feature or doesn’t care because they didn’t think about its power. Of course I’m not gonna to write about symbolic links just for symbolic links. We will use it in real life, for our projects. First of all, I will share one of my computers configuration with you. My first hard drive is 960GB SSD. I use it for my operating system (Windows 7 Pro), programs and local server. Server is stored in C:\server\.…

    read more
    Łukasz Nowicki 0 Comments

    You May Also Like

    Using gulp to make your WordPress site runs faster

    January 26, 2017

    Removing same part of the file in Windows

    January 17, 2017
  • Github,  Plugin,  WordPress

    Hey, admin, hide your login!

    January 3, 2017 /

    I bet, that you, as a WordPress developer, knows very well that using “admin” for your administrator account isn’t very clever. Or “administrator”. Or something like that. Once I saw “root”. Even WordPress installer will let you know that. Use something different. Maybe “top-secret-user”. It is good thing, that is true. Why we should avoid that? Because attacker may discover your administrator account login and may use it (in some top secret magical way) to attack your site. It isn’t a joke, it is a possibility. So, everybody should knows that and apply this to their sites. But… There is a small trick about that… Many sites may reveal your…

    read more
    Łukasz Nowicki 0 Comments

    You May Also Like

    WordPress custom bulk actions

    December 8, 2016

    WordPress admin buttons once again

    December 16, 2016

    Do you like WordPress admin buttons?

    December 12, 2016
  • Author

    Happy New Year!

    January 1, 2017 /

    Happy new year, all WordPress, PHP, etc. etc. users and developers! It’s my first new year message and I’m not sure what I should write. Excluding happy new year message itself, it’s obvious, of course. Well, I think a bit about WordPress future. Very recently we got WordPress 4.7 version, it’s pretty nice mile stone, I think we all like it. WordPress is superb, powerful CMS, do we need more? What would road-map for WordPress looks like? Of course I use WordPress 4.8 alpha on my local machine (you may do this as well, it is appreciated), but where are we going? First thought was – whenever we will go,…

    read more
    Łukasz Nowicki 0 Comments

    You May Also Like

    What PHP version do you use?

    July 27, 2015

    Panom i Paniom z HR pod uwagę

    July 6, 2017

    Google Analytics

    October 8, 2016
  • Development,  WordPress

    WordPress Toolbar a.k.a. Admin Bar

    December 23, 2016 /

    First things first. Why WordPress Toolbar a.k.a. Admin Bar? Well, a lot of people knows Toolbar as Admin Bar. Still. To be honest, it was Admin Bar. It was Admin Bar in WordPress 3.2 (released July 4, 2011) and previous. Even more, for backward compatibility, WordPress class for Toolbar is named WP_Admin_Bar. However, since WordPress 3.3 (released December 12, 2011) it is Toolbar and please remember it. To be honest, I have to remember it, too. All right, to the point. WordPress Toolbar. Nice feature. Very useful. And great. And even more – it is customizable! And we will learn a few basic tricks, how to deal with it. It…

    read more
    Łukasz Nowicki 0 Comments

    You May Also Like

    Add meta boxes on Front Page only without template

    June 18, 2017

    How to get rid of Open Sans and save admin bar?

    August 1, 2016

    How to style widget description in admin menu?

    July 23, 2017
  • Github,  Plugin,  WordPress

    WordPress plugins repository

    December 22, 2016 /

    A few days ago I mentioned about my new plugins. Two of them are in the official WordPress plugins repository. So, my counter is three now. I won’t delete those plugins on github, if you use this source, don’t worry. Posts about those plugins (with github links): Post/Page specific custom CSS Queen Inspirations WordPress repository links: Post/Page specific custom CSS Queen Inspirations I also updated my good-old plugin Google Analytics Head (icon, banner and screenshot). All of my WordPress hosted plugins.

    read more
    Łukasz Nowicki 0 Comments

    You May Also Like

    WordPress custom bulk actions

    December 8, 2016

    How to style widget description in admin menu?

    July 23, 2017

    WordPress: How to localize your JavaScript code?

    July 10, 2017
  • Development,  Github,  WordPress

    WordPress admin buttons once again

    December 16, 2016 /

    I just wrote small nice plugin to add custom CSS code to certain post/page. So I thought I may use it to show you my admin-like button styles (I mentioned it a few days ago – WordPress admin buttons). I’ve added static image to that post but here you are with brand new preview live! Primary Primary Darkgreen Darkgreen Forestgreen Forestgreen Green Green Lime Lime Limegreen Limegreen Seagreen Seagreen Mediumseagreen Mediumseagreen Springgreen Springgreen Mediumspringgreen Mediumspringgreen Darksalmon Darksalmon Mediumaquamarine Mediumaquamarine Coral Coral Orangered Orangered Turquoise Turquoise Lightseagreen Lightseagreen Mediumturquoise Mediumturquoise Cyan Aqua Cyan Aqua Darkcyan Darkcyan Teal Teal Darkturquoise Darkturquoise Deepskyblue Deepskyblue Sienna Sienna Steelblue Steelblue Dodgerblue Dodgerblue Cornflowerblue Cornflowerblue Royalblue…

    read more
    Łukasz Nowicki 0 Comments

    You May Also Like

    WP_Import has a deprecated constructor in…

    January 3, 2016

    Programmatically create and login user into WordPress

    December 2, 2017

    Finally here… required PHP version

    August 29, 2017
  • Github,  Plugin,  WordPress

    Post/Page specific custom CSS

    December 16, 2016 /

    Hi, we’ve got brand new plugin for you! Post Page specific custom CSS will allow you to add cascade stylesheet to specific posts/pages. It will give you special area in the post/page edit field to attach your CSS. It will also let you decide if this CSS has to be added in multi-page/post view (like archive posts) or only in a single view. Our new plugin is available on github.

    read more
    Łukasz Nowicki 2 Comments

    You May Also Like

    Queen Inspirations

    December 9, 2016

    Do you like WordPress admin buttons?

    December 12, 2016

    WordPress: How to localize your JavaScript code?

    July 10, 2017
 Older Posts
Newer Posts 

Search site:

Categories:

  • Author
  • Development
  • Github
  • Gulp
  • PHP
  • PL
  • Plugin
  • Windows
  • Woocommerce
  • WordPress

Recent posts:

  • HTML Knowledge Base
  • Using native WordPress loading icons (spinners) in your plugins
  • Did you forget to signal async completion?
  • Country codes as PHP array
  • RODO i WordPress – wydanie 4.9.6
  • Enable multisite network
  • Showing all errors and warnings

Polish Internet Trends

  • PHP Speed Test (5.2 – 8.0)

Recent comments:

  • Łukasz Nowicki on Post/Page specific custom CSS
  • Daud on Post/Page specific custom CSS
  • Wojtek on Country codes as PHP array
  • Łukasz Nowicki on Assign woocommerce product categories programmatically
  • Kil on Assign woocommerce product categories programmatically
  • Martin Piñeiro on Insert new woocommerce product programmatically
  • Łukasz Nowicki on Your password reset link appears to be invalid. Please request a new link below.

Archives

  • May 2020
  • September 2018
  • July 2018
  • May 2018
  • February 2018
  • January 2018
  • December 2017
  • October 2017
  • August 2017
  • July 2017
  • June 2017
  • May 2017
  • February 2017
  • January 2017
  • December 2016
  • November 2016
  • October 2016
  • September 2016
  • August 2016
  • July 2016
  • June 2016
  • May 2016
  • April 2016
  • March 2016
  • February 2016
  • January 2016
  • December 2015
  • October 2015
  • September 2015
  • August 2015
  • July 2015
  • May 2015
  • April 2015
  • March 2015
  • October 2014
  • September 2014
Ashe Theme by WP Royal.