Blog

Making a pull request using BitBucket

This is required if you want to push your code upstream to a master repo. Go to your repo and ‘Create a pull request’ Then make sure you have selected the branch you want to push up with the origin branch. In this case it is both master branches that…

Read More

Meta Tags Every website should have

General meta tags <title>Up to 70 Characters of Keyword-relevant text here</title> <meta name=”description” content=”Approximately 140 words or less of text about your company”> Google specific meta tag <link rel=”author” href=”link to your google+ account“/> Facebook meta tag: Title tag <meta property=”og:title” content=”Title of your blog”/> Property tag <meta property=”og:type” content=”article”/>…

Read More

remove or customise icon found in ‘previous_post_link()’ and ‘next_post_link()’

Use the following code to remove the default backward and forward icons. Original: <?php previous_post_link() ?> <?php next_post_link(); ?> Change to: <?php previous_post_link(‘%link’); ?> <?php next_post_link(‘%link’); ?> or <?php next_post_link(‘%link’, ‘Previous’); ?>

Read More

Checking if a custom post type field exits

if(get_field(‘post_type_name’)){ //output value if poste type exists }

Read More

Display page / post / custom post type title

Display the page title using the following code.

Read More

ACF Displaying a select field

To display field valuses use this code $field = get_field_object(‘field_name’); $value = get_field(‘field_name’); $label = $field[‘choices’][ $value ];

Read More

Increasing the WordPress Memory Limit

Edit your wp-config.php file and enter: define(‘WP_MEMORY_LIMIT’, ’96M’);

Read More

Push updates

git push origin master

Read More

Change the remote URL / URI

If you are updating or changing a repository that already has an existing URI, use the following line.

Read More

Add remote Url

To add a remote URL to a completely new GIT Repository use the following code:

Read More

Identify what the remote URL is

Use the following code to identify the remote URL of your existing Repo.

Read More

How to Un-tracking a file in GIT

Step 1: First create a .git ignore document $ touch .gitignore Step 2: add the files to be untracked in .gitignore $ nano .gitignore  (to access the file and edit) Simply add the file name and its directory. Step 3: Delete the file from .git tracking $ git rm  –cached…

Read More