To synchronise all remote branches with local version in git, all you need to do is run following commands: for remote in `git branch -r`; do git branch –track $remote; done git fetch –all git pull –all Thanks Wookie88 for answer on stackoverflow and TL;DR version.
When integrating Magento and WordPress to work together, it is useful to integrate login as well. This way Magento administrators can log in just in one place and be automatically logged in WordPress as well. Probably the best way to check if administrator is logged in is in WordPress. To check if Magento administrator is […]
We all have our small and big WordPress projects. Sometimes we want to allow our clients to see what has been done so far, but we don’t want anybody else to see it. The easiest way to define this is: prevent access for users which are not logged in WordPress administration. Sure – you can […]
Sometimes you just want to ignore changes you made locally and have the same situation you have on your git remote server. It is a simple thing to do, but don’t forget you will delete all the changes you have made locally before running this command.
It is not usual to show the number of the published post, however, it is not necessarily a bad thing. Sometimes, we just don’t publish on daily or weekly basis and this “published” date might make our posts look outdated. Therefore, we can build a simple procedure which will tell us how many of this […]
Assuming that we have column A containing first and last name with a potential middle name, we can assume that taking first name can be conducted by getting the value from beginning until first space.
We often need to list randomly chosen products on our Magento store. Lucky for us, Magento has provided this functionality, and this is easy to achieve from CMS block or CMS page. All we need to do is choose a category from which we’d like to list our products, and use following snippet in that […]