bbird.me http://bbird.me WordPress quick tips Wed, 08 Aug 2018 16:39:07 +0000 en-US hourly 1 https://wordpress.org/?v=4.9.9 How to install Laravel, Composer.. on Windows OS http://bbird.me/install-laravel-composer-windows-os/ http://bbird.me/install-laravel-composer-windows-os/#respond Sat, 30 Dec 2017 20:02:53 +0000 http://bbird.me/?p=14235 Easily – use Laragon šŸ™‚ This piece of software replaces XAMPP (in case you were using it – I was,

Post How to install Laravel, Composer.. on Windows OS je prvi puta viđen na bbird.me.

]]>
Easily – use Laragon šŸ™‚

This piece of software replaces XAMPP (in case you were using it – I was, for the last 10 years or so) and few other manual installations (Laravel, Composer, it adds terminal, etc.). You can always install everything manually (like I did) and make it work (also managed to do it), but why waste time.

Once you install it, you will not need anything else. It installs everything there is for any web development (Apache, PHP, MySQL), offer one-click Laravel, WordPress and few other applications and saves time.

 

Post How to install Laravel, Composer.. on Windows OS je prvi puta viđen na bbird.me.

]]>
http://bbird.me/install-laravel-composer-windows-os/feed/ 0
How to cut the title after certain number of characters http://bbird.me/cut-title-certain-number-characters/ http://bbird.me/cut-title-certain-number-characters/#respond Mon, 13 Feb 2017 10:33:47 +0000 http://bbird.me/?p=631 You probably know that in WordPress, for any kind of data (for example, page or post title, or post category…),

Post How to cut the title after certain number of characters je prvi puta viđen na bbird.me.

]]>
You probably know that in WordPress, for any kind of data (for example, page or post title, or post category…), you can either useĀ the function which displays any of these data (for example the_title()), or you can only get the value (get_the_title()) without echoing and then use that value so you could apply some additional functions.Ā 

One of the great applications of this is when you need to cut the title so it could fit into the container. What kind of scenario am I talking about? For example, if you created a theme where you have columns and would likeĀ to limit the number of characters so that huge title or description does not push one element few pixels down, making the whole thing look uneven.

Even though you can always use some JavaScript code, allowing you to calculate the height of the highest column and then apply that CSS to all the columns, perhaps in some situations a better idea is to cut the title or description.

The reason for this is that if the title or content is really huge, you would have lots of empty space within other blocks, not much to the benefit of design.

Let me show you how you can easily trim the title (and you could apply this to any type of content).

$title_pr = get_the_title();		
if (strlen($title_pr) <=63) {
  echo $title_pr;
} else {
  echo substr($title_pr, 0, 63) . '...';
}

In case you’re asking why did I use strlen(), the reason is that I don’t want to have “…” if the title is shorter than desired number of characters (in this case 63).

 

Post How to cut the title after certain number of characters je prvi puta viđen na bbird.me.

]]>
http://bbird.me/cut-title-certain-number-characters/feed/ 0
How to reorder product categories on WooCommerce shop page http://bbird.me/how-to-reorder-product-categories-on-woocommerce-shop-page/ http://bbird.me/how-to-reorder-product-categories-on-woocommerce-shop-page/#comments Sat, 28 Jan 2017 15:09:36 +0000 http://bbird.me/?p=622 As you probably know, within WooCommerce you can set the Shop page, while on that page, you can also set

Post How to reorder product categories on WooCommerce shop page je prvi puta viđen na bbird.me.

]]>
As you probably know, within WooCommerce you can set the Shop page, while on that page, you can also set what you want to show there. You could show either categories, products or both. Now, the thing is that sorting options work only for products. But if you choose to display Product categories, they will order based on the date they were published.

If you want to rearrange the order of product categories, you don’t have to dig through all the hooks within WooCommerce ecosystem (like I did), or try several plugins (like I did), or even think about creating your own plugin (guess what – like I did). All you have to do is open product categories page and hover over any of the categories. You will see that your icon will change, which means that you will be able to rearrange categories only with your mouse… I had no idea that this option exists!

You’ll thank me another time…

Post How to reorder product categories on WooCommerce shop page je prvi puta viđen na bbird.me.

]]>
http://bbird.me/how-to-reorder-product-categories-on-woocommerce-shop-page/feed/ 2
How to password protect all posts within post type http://bbird.me/password-protect-posts-within-post-type/ http://bbird.me/password-protect-posts-within-post-type/#respond Fri, 20 Jan 2017 12:27:17 +0000 http://bbird.me/?p=617 If you want to protect all posts within selected post type (for example all products), you can try my Bulk

Post How to password protect all posts within post type je prvi puta viđen na bbird.me.

]]>
If you want to protect all posts within selected post type (for example all products), you can try my Bulk Password Protect Post Types plugin. I published this plugin few days ago and itĀ allows you to choose one or more post types and set password for all posts within.

If you like it, feel free to rate it on WordPress.org or share. If you have a suggestion on how it can be improved, I’d appreciate if you could doĀ that.

Post How to password protect all posts within post type je prvi puta viđen na bbird.me.

]]>
http://bbird.me/password-protect-posts-within-post-type/feed/ 0
How to change href value using jQuery http://bbird.me/how-to-change-href-value-using-jquery/ http://bbird.me/how-to-change-href-value-using-jquery/#respond Sat, 07 Jan 2017 15:14:02 +0000 http://bbird.me/?p=601 If you have a situation where you would like to change href atribute (URL, that is), but can’t access the

Post How to change href value using jQuery je prvi puta viđen na bbird.me.

]]>
If you have a situation where you would like to change href atribute (URL, that is), but can’t access the code directly, you can definitely try using jQueryĀ prop():

jQuery(document).ready(function($){
$(".home container a").prop("href", "http://google.com/");
});

So all you need to do is target <a> element within container and this should do the trick.

 

Post How to change href value using jQuery je prvi puta viđen na bbird.me.

]]>
http://bbird.me/how-to-change-href-value-using-jquery/feed/ 0
Download working WordPress “X | The Theme” child theme http://bbird.me/download-working-wordpress-x-the-theme-child-theme/ http://bbird.me/download-working-wordpress-x-the-theme-child-theme/#respond Sat, 07 Jan 2017 13:13:31 +0000 http://bbird.me/?p=587 Ever had a project where you had to create a child theme for WordPress “X | The Theme” but you

Post Download working WordPress “X | The Theme” child theme je prvi puta viđen na bbird.me.

]]>
Ever had a project where you had to create a child theme for WordPress “X | The Theme” but you didn’t have the original child theme available?

If you used any of the child theme configurators, there is a big chance that child theme didn’t work or didn’t import styles.

In that case, don’t hesitate to download this child theme which should work šŸ™‚

Post Download working WordPress “X | The Theme” child theme je prvi puta viđen na bbird.me.

]]>
http://bbird.me/download-working-wordpress-x-the-theme-child-theme/feed/ 0
How to center HTML element with absolute positioning http://bbird.me/how-to-center-html-element-with-absolute-positioning/ http://bbird.me/how-to-center-html-element-with-absolute-positioning/#respond Sat, 07 Jan 2017 12:48:11 +0000 http://bbird.me/?p=591 Believe it or not, something like this will do: [crayon-5c416479a8350593889238/] You can also center the content using text-align. Now as

Post How to center HTML element with absolute positioning je prvi puta viđen na bbird.me.

]]>
Believe it or not, something like this will do:

.element
{
left:0;
right:0;
position: absolute;
width: 100%; //would be nice, also
}

You can also center the content using text-align. Now as for width, some say that it is required, but in many cases I didn’t see any difference (I guess this is dependent on the browser). And you’re encouraged to add max-width combined with width:100% values.

Post How to center HTML element with absolute positioning je prvi puta viđen na bbird.me.

]]>
http://bbird.me/how-to-center-html-element-with-absolute-positioning/feed/ 0
fullPage.js and Advanced Custom Fields integration http://bbird.me/fullpage-js-advanced-custom-fields-integration/ http://bbird.me/fullpage-js-advanced-custom-fields-integration/#respond Fri, 16 Sep 2016 14:28:45 +0000 http://bbird.me/?p=557 fullPage.jsĀ is an immensely powerful free jQuery-based JavaScript library, offering (as the name suggests) an ability to create very attractive, dynamic

Post fullPage.js and Advanced Custom Fields integration je prvi puta viđen na bbird.me.

]]>
fullPage.jsĀ is an immensely powerful free jQuery-based JavaScript library, offering (as the name suggests) an ability to create very attractive, dynamic and responsive full-screen scrolling websites. The library was created by Spanish developer Ɓlvaro Trigo and it is being used by some of the world’s top brands.

Read the full post here!

Post fullPage.js and Advanced Custom Fields integration je prvi puta viđen na bbird.me.

]]>
http://bbird.me/fullpage-js-advanced-custom-fields-integration/feed/ 0
Setting WooCommerce wholesale prices with excluded tax http://bbird.me/setting-woocommerce-wholesale-prices-with-excluded-tax/ http://bbird.me/setting-woocommerce-wholesale-prices-with-excluded-tax/#comments Wed, 14 Sep 2016 15:02:22 +0000 http://bbird.me/?p=552 This is actually a very easy stuff to do – if you have the need for setting up wholesale prices,

Post Setting WooCommerce wholesale prices with excluded tax je prvi puta viđen na bbird.me.

]]>
This is actually a very easy stuff to do – if you have the need for setting up wholesale prices, but exclude tax from the checkout, you can go with the following plugin (59Ā usd cost) –Ā WooCommerce Wholesale Prices.Ā You will also need to have the free version installed, along with the premium one.

Once you have installed both, it is very easy to set this up:

There are some examples to be found online thatĀ use action hooks,Ā but they didn’t work for me or worked only sporadically, based on the location and some other parameters. But if you are having a wholesale, I am sure that you have plenty of cash to pay for premium plugins as well. šŸ™‚

Post Setting WooCommerce wholesale prices with excluded tax je prvi puta viđen na bbird.me.

]]>
http://bbird.me/setting-woocommerce-wholesale-prices-with-excluded-tax/feed/ 1
Purging a stubborn WP Engine CSS cache http://bbird.me/purging-stubborn-wp-engine-css-cache/ http://bbird.me/purging-stubborn-wp-engine-css-cache/#comments Tue, 13 Sep 2016 18:25:36 +0000 http://bbird.me/?p=549 Here is the scenario – you created that awesome CSS and are dying to get it online. The client also.

Post Purging a stubborn WP Engine CSS cache je prvi puta viđen na bbird.me.

]]>
Here is the scenario – you created that awesome CSS and are dying to get it online. The client also. The website is hosted on WP EngineĀ and is usingĀ its famous aggressiveĀ caching mechanism. You save the changes into style.css or elsewhere and clear the cache. But you still see the old style.css. You do it again and again and again and that old style.css is still there.

But I’ve got a quick trick for you – version your file! As you already know, the proper way to enqueue style or script in WordPress is the following:

wp_enqueue_style( 'child-style', get_stylesheet_directory_uri() . '/style.css', array( ), '1.0.0');

The number 1.0.0 is the style version which is not always included. If you want to make sure that after every cache purging the new version is loaded, you only have to change the version number. So if you put something like:

wp_enqueue_style( 'child-style', get_stylesheet_directory_uri() . '/style.css', array( ), '1.0.1');

after you have added new changes into style.css and if clear the cache after that, the new CSS version will be loaded immediately and a ton of your nerves (and your clients’ nerves) will be saved.

You’re welcome!

(yes, this happened to me, well, countless times…)

Post Purging a stubborn WP Engine CSS cache je prvi puta viđen na bbird.me.

]]>
http://bbird.me/purging-stubborn-wp-engine-css-cache/feed/ 2