Per Søderlind

I code for fun

  1. how-to

Category: how-to (Page 1 of 2)

WordPress Customizer Demo: In Twenty Sixteen, toggle post meta on or off

Read More

101: How to fetch a git pull request

 

git-pull-request-twitter

You should test pull requests locally before you merge them with your code. Fetching a pull request from a remote repository is simple, just do:

  1. In your local project folder, do: git ls-remote
    You’ll get a list like this:
    From https://github.com/soderlind/myproject.git
    15438eca8b7f62f371985823fe6fa8c60d7a3b50 HEAD
    15438eca8b7f62f371985823fe6fa8c60d7a3b50 refs/heads/master
    4abd4e393cc1bc57af576a67a1a56b3dae6ecabd refs/pull/2/head
    e05af83eeebb01e52d8b42f24c570c8290e0b351 refs/pull/4/head
  2. Find the pull request in the list above, and fetch it, eg:
    git fetch origin refs/pull/4/head
  3. Temporarly checkout the pull request: git checkout FETCH_HEAD
  4. Test the code
  5. Return to the master: git checkout master
  6. If everything is fine, you can now merge the pull request in the remote repository and pull it down to your local project: git pull

WordPress, how to modify the HTML of an oEmbed link

Introduction

Background: EPiServer is the CMS for the Norwegian Government main site, www.regjeringen.no and we use WordPress for more ad hoc sites.

Task: Based on the design guide for regjeringen.no, add 23 video to WordPress.

Read More

Continuous Deployment from GitHub to WordPress Azure

 

github-choose-a-repository-to-deploy

TL;DR: Create a .deployment file and push it to GitHub:

[config]
DEPLOYMENT_TARGET=D:\home\site\wwwroot\wp-content\themes\my-theme

Read More

Debug WordPress with Sublime Text 2 and XDebug

sublime-text-plugin-debug

Read More

Page 1 of 2

Powered by WordPress & Theme by Anders Norén