<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	
	xmlns:georss="http://www.georss.org/georss"
	xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
	>

<channel>
	<title>Development &#8211; In The Digital</title>
	<atom:link href="https://inthedigital.co.uk/category/development/feed/" rel="self" type="application/rss+xml" />
	<link>https://inthedigital.co.uk</link>
	<description>Web Design, Development and Digital Marketing</description>
	<lastBuildDate>Fri, 08 Aug 2025 10:17:29 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://i0.wp.com/inthedigital.co.uk/wp-content/uploads/2018/10/cropped-in-the-digital-icon-padded.png?fit=32%2C32&#038;ssl=1</url>
	<title>Development &#8211; In The Digital</title>
	<link>https://inthedigital.co.uk</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">153467252</site>	<item>
		<title>Generative Design Tools: Figma, Canva &#038; Adobe Firefly — What Designers Need to Know</title>
		<link>https://inthedigital.co.uk/generative-design-tools-figma-canva-adobe-firefly-what-designers-need-to-know/</link>
					<comments>https://inthedigital.co.uk/generative-design-tools-figma-canva-adobe-firefly-what-designers-need-to-know/#respond</comments>
		
		<dc:creator><![CDATA[MPXeditor]]></dc:creator>
		<pubDate>Mon, 04 Aug 2025 19:45:45 +0000</pubDate>
				<category><![CDATA[Creative]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[AI tools]]></category>
		<category><![CDATA[Canva]]></category>
		<category><![CDATA[design trends]]></category>
		<category><![CDATA[Figma]]></category>
		<category><![CDATA[generative design]]></category>
		<guid isPermaLink="false">https://inthedigital.co.uk/?p=2767</guid>

					<description><![CDATA[<img width="300" height="200" src="https://i1.wp.com/inthedigital.co.uk/wp-content/uploads/2025/08/post1_featured.webp?fit=300%2C200&amp;ssl=1" class="attachment-medium size-medium wp-post-image" alt="Abstract generative design AI waves" style="float: none; margin: auto;" decoding="async" fetchpriority="high" />Generative artificial intelligence is changing the way we design, build and market digital experiences. In 2025 every major creative platform has rolled out AI‑powered features that promise to speed up production and make it easier to keep projects on brand. This article looks at the latest releases from Figma, Canva and Adobe to help designers and marketers [&#8230;]]]></description>
										<content:encoded><![CDATA[<img width="300" height="200" src="https://i1.wp.com/inthedigital.co.uk/wp-content/uploads/2025/08/post1_featured.webp?fit=300%2C200&amp;ssl=1" class="attachment-medium size-medium wp-post-image" alt="Abstract generative design AI waves" style="float: none; margin: auto;" decoding="async" /><p>Generative artificial intelligence is changing the way we design, build and market digital experiences. In 2025 every major creative platform has rolled out AI‑powered features that promise to speed up production and make it easier to keep projects on brand. This article looks at the latest releases from Figma, Canva and Adobe to help designers and marketers decide which tools are worth exploring.</p>
<h2>Figma’s new AI‑enabled suite</h2>
<p>Figma used its 2025 Config conference to announce a set of products that extend the design tool into a complete creation platform:</p>
<ol>
<li><strong>Draw</strong> – A native vector tool with brushes, a shape builder and the ability to place text on a path. It makes sketching high‑fidelity illustrations directly in Figma feel as natural as drawing on paper.</li>
<li><strong>Sites</strong> – A publishing tool that turns Figma frames into fully responsive websites. Sites offers pre‑built blocks, an auto‑provisioned SSL certificate and a live HTML/CSS view so that designers can see how layouts will render on the web without leaving the editor.</li>
<li><strong>Buzz</strong> – A content factory for bulk asset creation. Set up channel presets, schedule exports and keep colours and typefaces in sync across all outputs.</li>
<li><strong>Make</strong> – An AI assistant that turns plain‑language prompts into interactive prototypes. Make wires up interactions automatically and even generates readable React and Tailwind code to jump‑start development.</li>
</ol>
<p>These tools go beyond interface design. They close the gap between early sketches and production‑ready sites, allowing teams to prototype, publish and iterate from one place.</p>
<h2>Canva Create 2025 highlights</h2>
<p>Canva is also positioning itself as a one‑stop shop for design and content. The company’s 2025 release introduced:</p>
<ul>
<li><strong>Visual Suite 2.0</strong> – Slides, documents, whiteboards and videos can be combined in a single design. Each page has its own layout, making it easy to produce rich multimedia presentations or reports.</li>
<li><strong>Data tools</strong> – Spreadsheets and charts can be transformed into on‑brand visuals, helping teams repurpose data across social posts, blog graphics and reports.</li>
<li><strong>Upgraded AI</strong> – Canva’s new assistant drafts presentations, documents and images from a single prompt. It can even generate visuals inspired by a reference image, saving time when working with clients.</li>
<li><strong>Canva Code</strong> – A no‑code tool that lets users build simple apps, games and interactive websites just by describing them. This opens up web creation to anyone, even if they have no programming experience.</li>
<li><strong>Bonus features</strong> – Improved diagramming tools, a better stock photo library, adjustable audio tracks and bulk image resizing.</li>
</ul>
<p>By combining design, documents and now low‑code development, Canva is evolving into a full marketing suite where teams can plan, create and publish from one place.</p>
<h2>Adobe’s generative marketing innovations</h2>
<p>Adobe’s announcements at the 2025 Cannes Lions festival focused on bringing AI deeper into marketing workflows:</p>
<ul>
<li><strong>Customer Experience Orchestration (CXO)</strong> – A new platform that combines creativity and marketing data so brands can personalise experiences across channels. It’s designed to break down silos between design teams and marketing teams.</li>
<li><strong>GenStudio for Performance Marketing</strong> – A generative‑AI‑first app that uses Adobe Firefly to produce on‑brand campaign content and short‑form video ads. Marketers can generate, edit and reuse assets without calling in a designer.</li>
<li><strong>Firefly Services</strong> – A set of APIs for tasks like resizing assets, generating 3D imagery and creating digital avatars. This makes it easier to automate repetitive tasks and maintain consistency across campaigns.</li>
<li><strong>Firefly Creative Production</strong> – A no‑code interface that handles colour grading and resizing at scale, freeing up editors for more creative tasks.</li>
<li><strong>Adobe LLM Optimizer</strong> – A tool that analyses generative search traffic and suggests content adjustments to improve a brand’s visibility in AI‑powered browsers.</li>
</ul>
<p>These products show Adobe’s ambition to bring AI into every stage of the creative process, from concept to distribution.</p>
<h2>Key takeaways</h2>
<ul>
<li>Generative tools are moving beyond hype and into practical workflows. Figma’s Sites and Make bridge the gap between design and code, while Canva and Adobe offer complete content pipelines.</li>
<li>Investing time to learn these platforms will pay dividends. They can reduce production cycles, ensure brand consistency and help small teams compete with larger agencies.</li>
<li>Start with one or two features that solve a real problem — such as Figma Sites for rapid web publishing or Canva’s data tools for social media graphics — and expand from there.</li>
</ul>
<p>By staying on top of these changes and experimenting with the tools that fit your projects, you can keep your creative work fresh and efficient.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://inthedigital.co.uk/generative-design-tools-figma-canva-adobe-firefly-what-designers-need-to-know/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">2767</post-id>	</item>
		<item>
		<title>The awesome Delicious Brains team acquire ACF &#038; ACF Pro!</title>
		<link>https://inthedigital.co.uk/the-awesome-delicious-brains-team-acquire-acf-acf-pro/</link>
					<comments>https://inthedigital.co.uk/the-awesome-delicious-brains-team-acquire-acf-acf-pro/#respond</comments>
		
		<dc:creator><![CDATA[Mervyn Booth]]></dc:creator>
		<pubDate>Thu, 10 Jun 2021 04:12:35 +0000</pubDate>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Development]]></category>
		<guid isPermaLink="false">https://inthedigital.co.uk/?p=2441</guid>

					<description><![CDATA[<img width="250" height="250" src="https://i0.wp.com/inthedigital.co.uk/wp-content/uploads/2021/06/acf.jpg?fit=250%2C250&amp;ssl=1" class="attachment-medium size-medium wp-post-image" alt="Advanced Custom Fields (ACF)" style="float: none; margin: auto;" decoding="async" />So, ACF, one of the best developer plugins of the last century, is now part of the Delicious Brains family. What does this mean for ACF, ACF Pro and the vast ACF client base? What are ACF and ACF Pro? Elliot Condon, the sole developer behind ACF to date, has made one of the most [&#8230;]]]></description>
										<content:encoded><![CDATA[<img width="250" height="250" src="https://i0.wp.com/inthedigital.co.uk/wp-content/uploads/2021/06/acf.jpg?fit=250%2C250&amp;ssl=1" class="attachment-medium size-medium wp-post-image" alt="Advanced Custom Fields (ACF)" style="float: none; margin: auto;" decoding="async" loading="lazy" /><p>So, ACF, one of the best developer plugins of the last century, is now part of the Delicious Brains family. What does this mean for ACF, ACF Pro and the vast ACF client base?</p>
<h2>What are ACF and ACF Pro?</h2>
<p>Elliot Condon, the sole developer behind ACF to date, has made one of the most goto developer-focused plugins of the last 10 years. It&#8217;s so good for WordPress that I don&#8217;t think I&#8217;m alone in saying that he has single-handedly had a major impact on the success of the WordPress platform!</p>
<p><a href="https://www.advancedcustomfields.com/" target="_blank" rel="noopener noreferrer nofollow">ACF</a> (Advanced Custom Fields) is a well-thought-out, feature-rich plugin that allows developers to easily manage the editing experience and data collection for custom solutions. It&#8217;s primarily used to manage custom meta fields in the <code>postmeta</code> table, but does a lot more. We&#8217;ve used <a href="https://www.advancedcustomfields.com/pro/" target="_blank" rel="noopener noreferrer nofollow">the Pro version</a> on many, many client <a href="https://inthedigital.co.uk/#we-create-and-build-content" target="_blank" rel="noopener noreferrer">websites</a> to solve a myriad of challenges, from making it easier for clients to manage their content to extending product data on e-commerce shops. It&#8217;s incredibly stable and has evolved wonderfully over the years. I don&#8217;t think I would use WordPress anywhere near as much without it!</p>
<h2>Who are Delicious Brains?</h2>
<p>If you&#8217;re a WordPress developer, then it&#8217;s very likely you&#8217;ve needed to migrate or copy a WordPress database. There are a few ways to do this and in my very early days of working with WordPress, I found it so ugly migrating the database that it actually made me almost lose interest in the platform. Eventually, I found ways to work with it, such as <a href="https://snapcreek.com/" target="_blank" rel="noopener noreferrer nofollow">Duplicator Pro</a> (another great plugin), but the process became a dream (and somewhat exciting) when I started using <a href="https://deliciousbrains.com/wp-migrate-db-pro/" target="_blank" rel="noopener noreferrer nofollow">WP Migrate DB Pro</a>. The guys from DB had not only solved one of the shittiest chores in WordPress, they&#8217;d made it a pleasant experience &#8211; come on, those green progress bars are somehow very mesmerising!</p>
<h2>Why is ACF being acquired by Delicious Brains?</h2>
<p>Listening to <a href="https://deliciousbrains.com/epic-wordpress-announcement/" target="_blank" rel="noopener noreferrer nofollow">their podcast</a> regarding the announcement, the acquisition seems to be a perfect fit for both parties &#8211; Elliot gets to enjoy life outside his laptop (his words) and Delicious Brains get to take on one of the most goto plugins for WordPress.</p>
<p>What&#8217;s very clear from the podcast is that this seems like an excellent fit, as ACF has been carefully crafted and evolved over the last 10 years, but at the hands of a single, passionate developer. Whereas, with DB, which makes awesome WP plugins, it will get the expertise from the whole, growing team, whilst keeping the same attention to detail that we&#8217;ve come to take for granted from Elliot&#8217;s work.</p>
<h2>Will the pricing change?</h2>
<p>Who knows? At this stage Brad at DB has stated that there will be no change to the pricing structure that&#8217;s already in place, <a href="https://deliciousbrains.com/epic-wordpress-announcement/#lifetime" target="_blank" rel="noopener noreferrer nofollow">even lifetime will be honoured</a>, and looking at how DB&#8217;s offerings are priced versus how ACF Pro is, I think they&#8217;re pretty aligned already, so would not expect any scare surprises &#8211; we&#8217;ll see.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://inthedigital.co.uk/the-awesome-delicious-brains-team-acquire-acf-acf-pro/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">2441</post-id>	</item>
		<item>
		<title>How to create a horizontally scrolling section with 2 rows using CSS grid</title>
		<link>https://inthedigital.co.uk/how-to-create-a-horizontally-scrolling-section-with-2-rows-using-css-grid/</link>
					<comments>https://inthedigital.co.uk/how-to-create-a-horizontally-scrolling-section-with-2-rows-using-css-grid/#comments</comments>
		
		<dc:creator><![CDATA[Mervyn Booth]]></dc:creator>
		<pubDate>Wed, 09 Sep 2020 06:25:10 +0000</pubDate>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[CSS Grid]]></category>
		<category><![CDATA[CSS layout]]></category>
		<guid isPermaLink="false">https://inthedigital.co.uk/?p=2174</guid>

					<description><![CDATA[<img width="300" height="300" src="https://i2.wp.com/inthedigital.co.uk/wp-content/uploads/2020/09/Horizontal-scrolling-2-rows-and-infinite-columns-using-CSS-grid.png?fit=300%2C300&amp;ssl=1" class="attachment-medium size-medium wp-post-image" alt="Horizontal scrolling 2 rows and infinite columns using CSS grid | In the Digital" style="float: none; margin: auto;" decoding="async" loading="lazy" />Creating horizontal scrolling of multiple rows with display: grid is easy. CSS grid provides powerful layout options to help achieve all sorts of page layouts.]]></description>
										<content:encoded><![CDATA[<img width="300" height="300" src="https://i2.wp.com/inthedigital.co.uk/wp-content/uploads/2020/09/Horizontal-scrolling-2-rows-and-infinite-columns-using-CSS-grid.png?fit=300%2C300&amp;ssl=1" class="attachment-medium size-medium wp-post-image" alt="Horizontal scrolling 2 rows and infinite columns using CSS grid | In the Digital" style="float: none; margin: auto;" decoding="async" loading="lazy" /><p><img loading="lazy" decoding="async" class="alignnone size-medium wp-image-2198" style="max-width: 100%; height: auto;" src="https://inthedigital.co.uk/wp-content/uploads/2020/09/Horizontal-scrolling-2-rows-and-infinite-columns.svg" alt="Horizontal scrolling 2 rows and infinite columns | In The Digital" width="834" height="256" /></p>
<p>This post describes how to create a horizontal grid with 2 rows and infinite columns using CSS grid. This technique uses <code>display: grid</code>, which finally has <a href="https://caniuse.com/css-grid" target="_blank" rel="noopener noreferrer nofollow">decent browser coverage</a>.</p>
<p>Like CSS flex(box), CSS grid is incredibly flexible for creating relatively complex layouts and making seemingly simple ones, well simple (which wasn’t always the case, like centring content both vertically and horizontally).</p>
<h2>Making a grid that scrolls horizontally using CSS grid &amp; grid-auto-flow</h2>
<p>Scrolling up and down is the default way to consume web page content. In order to scroll vertically to consume the content, we can need to tell the browser it&#8217;s okay to overflow on the x-axis and we need to tell the content it doesn&#8217;t need to wrap to the viewport.</p>
<p>There are a few ways to do this, but this post will demonstrate the <code>grid</code> way:</p>
<pre><code class="language-css">.grid.scroll-x {
    display: grid;
    grid-auto-flow: column;
    /* should, in theory, work without overflow-x */
    overflow-x: scroll;
}</code></pre>
<p>As can be seen in the code above, the <code>grid-auto-flow</code> property is the key here. Used in conjunction with <code>display: flex</code>and set to <code>column</code> will tell the browser to render the element&#8217;s children as columns, which is what we want!</p>
<p>In order to reach the solution, this post set out to achieve all that&#8217;s needed now is to spread this grid element&#8217;s children over 2 rows. Fortunately, using <code>grid</code> this is really easy.</p>
<h2>Making a horizontal grid with 2 rows</h2>
<p>The code above will render the horizontal elements, as required. If we introduce another property to this code snippet, <code>grid-template-rows</code>, as per the following code, the element&#8217;s children will now be not only horizontally scrollable but they will also be rendered over 2 rows:</p>
<pre><code class="language-css">.grid.scroll-x--rows-2 {
    display: grid;
    /* auto auto is telling the browser to render two rows, if needed */
    grid-template-rows: auto auto;
    grid-auto-flow: column;
    overflow-x: scroll;
}</code></pre>
<p>This is perfect, just what was needed, and it was achieved with just 3 lines of CSS <code>grid</code> properties (plus <code>overflow-x: scroll</code> you feel the need to include it). <em>However</em>, there&#8217;s one small caveat;  the layout&#8217;s rendered in a reversed &#8216;N&#8217; order, with each column output, then the rows for that column. This outputs the first 2 elements in rows, then adds subsequent elements as columns to the right (as modelled below). This means that if the layout was designed for 2 columns there would need to be at least 3 items to render a second column, but this can be handled with the logic to make sure there are at least 3 items before applying the <code>grid-template-rows</code> property.</p>
<p><img loading="lazy" decoding="async" class="size-medium wp-image-2193 alignnone" style="max-width: 100%; height: auto;" src="https://inthedigital.co.uk/wp-content/uploads/2020/09/Reverse-N.svg" alt="Reverse 'N' Layout of CSS Grid | In The Digital" width="853" height="256" /></p>
<h2>Conclusion</h2>
<p>The <code>display: grid</code> <a href="https://inthedigital.co.uk/tag/css">CSS property</a> is incredibly flexible and I think this scenario demonstrates a great use-case. Yes, this could have been done in other ways, for example, I used negative margins to <a href="https://gameondaily.com/" target="_blank" rel="noopener noreferrer nofollow">create this horizontal masonry layout of cards</a>, but the CSS <code>grid</code> approach feels cleaner and more robust.</p>
<p>If you&#8217;d like to implement something like this in your project, <a href="https://inthedigital.co.uk/contact-us/">please get in touch</a> as we&#8217;re passionate about making the web look great.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://inthedigital.co.uk/how-to-create-a-horizontally-scrolling-section-with-2-rows-using-css-grid/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">2174</post-id>	</item>
		<item>
		<title>Inlining CSS &#8211; the Good, the Bad and the Ugly</title>
		<link>https://inthedigital.co.uk/inlining-css-the-good-the-bad-and-the-ugly/</link>
		
		<dc:creator><![CDATA[Mervyn Booth]]></dc:creator>
		<pubDate>Tue, 26 Nov 2019 15:52:54 +0000</pubDate>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[SEO myths]]></category>
		<category><![CDATA[Website perf]]></category>
		<guid isPermaLink="false">https://inthedigital.co.uk/?p=1776</guid>

					<description><![CDATA[<img width="300" height="270" src="https://i1.wp.com/inthedigital.co.uk/wp-content/uploads/2019/11/good-bad-ugly-e1574784835549.jpeg?fit=300%2C270&amp;ssl=1" class="attachment-medium size-medium wp-post-image" alt="Inlining CSS - the Good, the Bad and the Ugly. In The Digital. good bad ugly e1574784835549" style="float: none; margin: auto;" decoding="async" loading="lazy">I&#8217;m a sucker for performance gains to the point that I&#8217;m convinced I&#8217;m actually losing time overthinking it &#8211; 🤔 A good example is CSS delivery and it&#8217;s always interesting to get others&#8217; opinions on how important they consider styling performance to be and how they measure it. Inlining &#8211; good/bad/ugly? Good I see genuine [&#8230;]]]></description>
										<content:encoded><![CDATA[<img width="300" height="270" src="https://i1.wp.com/inthedigital.co.uk/wp-content/uploads/2019/11/good-bad-ugly-e1574784835549.jpeg?fit=300%2C270&amp;ssl=1" class="attachment-medium size-medium wp-post-image" alt="Inlining CSS - the Good, the Bad and the Ugly. In The Digital. good bad ugly e1574784835549" style="float: none; margin: auto;" decoding="async" loading="lazy"><p>I&#8217;m a sucker for performance gains to the point that I&#8217;m convinced I&#8217;m actually losing time overthinking it &#8211; <img src="https://s.w.org/images/core/emoji/15.0.3/72x72/1f914.png" alt="🤔" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<p>A good example is CSS delivery and it&#8217;s always interesting to get others&#8217; opinions on how important they consider styling performance to be and how they measure it.</p>
<h2>Inlining &#8211; good/bad/ugly?</h2>
<h3>Good</h3>
<p>I see genuine reasons to inline certain styling rules, for use cases such as;</p>
<ul>
<li>a one-off element style</li>
<li>a style that requires browser/JS intervention</li>
<li>overriding nasty <code>!important</code> rules</li>
</ul>
<p><strong>Good use case</strong>: inline background-image</p>
<pre><code>&lt;div class=&quot;card&quot; style=&quot;background-image: url({{ $just_in_time_image_url }})&quot;&gt;[...]&lt;/div&gt;</code></pre>
<p><small>Aside:</small> This isn&#8217;t the best example, as background images should really be responsive;</p>
<pre><code class="lang-php">&lt;style&gt;
  .card {
    background-image: url({{ $just_in_time_image_url }});
  }
  @media (min-width: {{ $breakpoint_width }}) {
    .card {
      background-image: url({{ $just_in_time_image_url }});
    }
  }
&lt;/style&gt;</code></pre>
<p>Beyond these, I&#8217;m all for steering away from it.</p>
<h3>Bad</h3>
<p>IMO, whenever the above doesn&#8217;t apply the rule should be contained in a stylesheet. I see the following used inline, which I would absolutely put in a stylesheet;</p>
<ul>
<li>repeated inline styling spitting out the same rules &#8211; &#8220;Always try to be <a href="https://en.wikipedia.org/wiki/Don%27t_repeat_yourself" rel="nofollow noopener" target="_blank">DRY</a>&#8220;</li>
<li>brand-specific rules &#8211; argh! <img src="https://s.w.org/images/core/emoji/15.0.3/72x72/1f626.png" alt="😦" class="wp-smiley" style="height: 1em; max-height: 1em;" /></li>
</ul>
<p><strong>Bad use case</strong>: inline brand colours</p>
<pre><code>&lt;div class=&quot;card&quot; style=&quot;color: #2457ba; background-color: #a0d8c6&quot;&gt;[...]&lt;/div&gt;</code></pre>
<p>Better still, use a preprocessor, such as <a href="https://sass-lang.com/" rel="nofollow noopener" target="_blank">SASS</a>, to reduce maintenance overheads.</p>
<h3>Ugly</h3>
<p>WP plugins. I am amazed at the number of plugins that make excessive use of inlining. My best guesses as to why they do this are;</p>
<ul>
<li>inline rules, well&#8230;rule &#8211; their cascading rank is high (and used in conjunction with <code>!important</code> they are simply brute force bullies)</li>
<li>the plugin&#8217;s styling will not be in the cascading rules of non-plugin elements</li>
<li>to annoy me</li>
</ul>
<p><strong>Ugly use case</strong>: inline rule with <code>!important</code></p>
<pre><code>&lt;div class=&quot;card&quot; style=&quot;opacity: 0.5 !important&quot;&gt;[...]&lt;/div&gt;</code></pre>
<h2>Closing words</h2>
<p>I love building websites and get a lot of satisfaction out of my clients&#8217; sites working hard for them &#8211; both in terms of optimising for search engines and for great user experiences.</p>
<p><strong>A note on SEO</strong>: I&#8217;m not a fan of &#8220;SEO Experts&#8221;, as they are more-often-than-not focusing on one very specific area of SEO; <em>content</em>. Don&#8217;t get me wrong, &#8220;Content <em>is</em> king!&#8221;, but it&#8217;s only part of the puzzle. A good website should;</p>
<ul>
<li>load fast, with optimised assets</li>
<li>look great on mobiles, tablets and desktops, alike</li>
<li>be easy to use and navigate<span class="text-muted">*</span></li>
</ul>
<p><em class="text-muted small">*in hipster terms; provide a good UX design &#8211; aka User Experience</em></p>
<p>When a site is fast, easy to use and has great content (the things actual users are interested in) <em>SEO rankings will naturally improve</em>, as these are the core metric that search engines are concerned with.</p>
<p><strong>Note on low-budget websites</strong>: I&#8217;m not a fan of the crap out there that&#8217;s lowering the standards and the vast number of budget websites that smaller client&#8217;s get lumbered with. This is a false economy, as a good website will work hard and, assuming it&#8217;s built to perform, it will more than pay for itself.</p>
<p>If you&#8217;re looking for a better website, feel free to call for a free consultation with one of the team.</p>
<p><a class="btn btn-primary" href="https://inthedigital.co.uk/contact-us/">Free Consultation</a></p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1776</post-id>	</item>
		<item>
		<title>Convert br tags to span tags</title>
		<link>https://inthedigital.co.uk/convert-br-tags-to-span-tags/</link>
		
		<dc:creator><![CDATA[Mervyn Booth]]></dc:creator>
		<pubDate>Sat, 06 Jul 2019 08:50:10 +0000</pubDate>
				<category><![CDATA[Dev Tricks]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Code snippet]]></category>
		<category><![CDATA[nl2span]]></category>
		<category><![CDATA[PHP]]></category>
		<guid isPermaLink="false">https://inthedigital.co.uk/?p=1728</guid>

					<description><![CDATA[<img width="300" height="300" src="https://i2.wp.com/inthedigital.co.uk/wp-content/uploads/2019/07/nl2span.jpg?fit=300%2C300&amp;ssl=1" class="attachment-medium size-medium wp-post-image" alt="nl2span" style="float: none; margin: auto;" decoding="async" loading="lazy" />Have you ever needed to convert the string immediately before br tags and wrap it in span tags instead? Me too. There is very likely a regex solution but here&#8217;s a very simple way to achieve it using string and array functions. /** * Replace linebreaks with span tags * * Wraps each string immediately before a [&#8230;]]]></description>
										<content:encoded><![CDATA[<img width="300" height="300" src="https://i2.wp.com/inthedigital.co.uk/wp-content/uploads/2019/07/nl2span.jpg?fit=300%2C300&amp;ssl=1" class="attachment-medium size-medium wp-post-image" alt="nl2span" style="float: none; margin: auto;" decoding="async" loading="lazy" /><p>Have you ever needed to convert the string immediately before <code>br</code> tags and wrap it in <code>span</code> tags instead? Me too.</p>
<p>There is very likely a regex solution but here&#8217;s a very simple way to achieve it using string and array functions.</p>
<pre><code class="lang-php">/**
 * Replace linebreaks with span tags
 *
 * Wraps each string immediately before a linebreak in span tags and removes the linebreak.
 *
 * @param string $string        Original string that may have linebreaks (\r\n\
\
)
 * @param string $span_class    Styling class for span tags
 * @return string               HTML string with linebreaks replaced with span tags
 */
function nl2span($string = &#039;&#039;, $span_class = &#039;span&#039;) : string {
    // standardise line breaks
    $nl = &quot;\n&quot;;
    $string = str_replace([&quot;\r\n&quot;, &quot;\r&quot;, &quot;
&quot;, &quot;
&quot;], $nl, $string );

    // just return the original string if there aren&#039;t any linebreaks
    if (!str_contains($string, $nl)) return $string;

    // remove contiguous linebreaks
    $string = preg_replace( &quot;/$nl+/&quot;, $nl, $string );

    // convert string to array of parts
    $string_to_array = explode($nl, $string);

    // pop the last part as it will not be wrapped in a span
    $after_nl = array_pop($string_to_array);

    // declare var for spanned elements
    $array_to_string = &#039;&#039;;

    // build spanned elements
    foreach ($string_to_array as $index =&gt; $part) {
        // create a unique span class for each part
        $unique_span = (int) $index + 1;
        $array_to_string .= sprintf(
            &#039;&lt;span class=&quot;%1$s %1$s-%2$s&quot;&gt;%3$s&lt;/span&gt;&#039;,
            $span_class,
            $unique_span,
            $part);
    }

    // cleanup (if you feel the need)
    unset($nl, $string, $string_to_array);

    // append the last part and return
    return $array_to_string . $after_nl;
}</code></pre>
<p><strong>Side note:</strong></p>
<p><code>str_contains</code> is an <a href="https://github.com/illuminate/support/blob/master/helpers.php" target="_blank" rel="noopener noreferrer nofollow">Illuminate</a> helper function (and PHP8). If you don&#8217;t use this Illuminate or PHP8, then replace it in the code above with the following:</p>
<pre><code class="lang-php">// just return the original string if there aren&#039;t any linebreaks
$has_breaks = false;
foreach ((array) $string as $needle) {
    if ($needle !== &#039;&#039; &amp;&amp; mb_strpos($string, $needle) !== false) {
        $has_breaks = true;
    }
}
if (!$has_breaks) return $string; </code></pre>
<h2>Conclusion</h2>
<p>So there it is. If you ever come across the odd occasion where you need to wrap the string immediately before a break <code>tag</code> with <code>span</code> tag, then just drop this into your project&#8217;s PHP code and you&#8217;re good to go! Or get in touch and we&#8217;ll gladly assist.</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1728</post-id>	</item>
		<item>
		<title>Updating Macs on Mojave to run VirtualBox</title>
		<link>https://inthedigital.co.uk/updating-macs-on-mojave-to-run-virtualbox/</link>
		
		<dc:creator><![CDATA[Mervyn Booth]]></dc:creator>
		<pubDate>Tue, 20 Nov 2018 07:31:09 +0000</pubDate>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[macOS]]></category>
		<category><![CDATA[Mojave Compatibility]]></category>
		<guid isPermaLink="false">https://inthedigital.co.uk/?p=1422</guid>

					<description><![CDATA[<img width="297" height="300" src="https://i1.wp.com/inthedigital.co.uk/wp-content/uploads/2018/11/Incompatible-App.png?fit=297%2C300&amp;ssl=1" class="attachment-medium size-medium wp-post-image" alt="Incompatible macOS Application - VirtualBox" style="float: none; margin: auto;" decoding="async" loading="lazy" />We use VirtualBox for the local development of websites, this article walks through the process of updating it to at least 5.2.22. Why update VirtualBox? Simple: Older versions of VirtualBox will not be compatible with macOS Mojave. The simple fix Grab the latest version of VirtualBox, install it and you&#8217;re! Conclusion As we use VirutalBox [&#8230;]]]></description>
										<content:encoded><![CDATA[<img width="297" height="300" src="https://i1.wp.com/inthedigital.co.uk/wp-content/uploads/2018/11/Incompatible-App.png?fit=297%2C300&amp;ssl=1" class="attachment-medium size-medium wp-post-image" alt="Incompatible macOS Application - VirtualBox" style="float: none; margin: auto;" decoding="async" loading="lazy" /><p>We use VirtualBox for the local development of websites, this article walks through the process of updating it to at least 5.2.22.</p>
<h2>Why update VirtualBox?</h2>
<p>Simple: <em>Older versions of VirtualBox will not be compatible with macOS Mojave.</em><br />
<img loading="lazy" decoding="async" src="https://i1.wp.com/inthedigital.co.uk/wp-content/uploads/2018/11/Incompatible-App.png?resize=297%2C300&#038;ssl=1" alt="Incompatible macOS Application - VirtualBox" width="297" height="300" class="alignnone size-medium wp-image-1430" srcset="https://i1.wp.com/inthedigital.co.uk/wp-content/uploads/2018/11/Incompatible-App.png?resize=297%2C300&amp;ssl=1 297w, https://i1.wp.com/inthedigital.co.uk/wp-content/uploads/2018/11/Incompatible-App.png?w=410&amp;ssl=1 410w" sizes="(max-width: 297px) 100vw, 297px" data-recalc-dims="1" /></p>
<h2>The simple fix</h2>
<p><a href="https://www.virtualbox.org/wiki/Downloads" rel="nofollow noopener" target="_blank">Grab the latest version of VirtualBox</a>, install it and you&#8217;re!</p>
<h2>Conclusion</h2>
<p>As we use VirutalBox via the command line and this tripped us up for some minutes because we didn&#8217;t see the . Hopefully, if you come across this article in under a few minutes, you&#8217;ll spend less time fixing it than we did. Subscribe to our newsletter to receive more useful nuggets like this.</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1422</post-id>	</item>
		<item>
		<title>How to trim words by character limit</title>
		<link>https://inthedigital.co.uk/how-to-trim-words-by-character-limit/</link>
		
		<dc:creator><![CDATA[Mervyn Booth]]></dc:creator>
		<pubDate>Sun, 21 Oct 2018 10:59:41 +0000</pubDate>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[WP Snippets]]></category>
		<category><![CDATA[Code snippet]]></category>
		<category><![CDATA[Dev Tricks]]></category>
		<guid isPermaLink="false">https://inthedigital.co.uk/?p=849</guid>

					<description><![CDATA[We recently encountered a scenario where the client wanted to trim the news items titles to a maximum number of characters, whilst respecting words. Our research revealed that this seemingly obvious requirement wasn&#8217;t elegantly solved. As most of you will know, there are solutions for trimming by characters or trimming by words, but neither of [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>We recently encountered a scenario where the client wanted to trim the news items titles to a maximum number of characters, whilst respecting words. </p>
<p>Our research revealed that this seemingly obvious requirement wasn&#8217;t elegantly solved. As most of you will know, there are solutions for trimming by characters or trimming by words, but neither of these fulfilled our requirements of trimming by characters, but keeping output to full words.</p>
<h2>Introducing trim_respect_words</h2>
<pre><code class=lang-php>function trim_respect_words(string $string, int $char_length = 50) :string {
    // trim edges
    $string = trim($string);

    // store string length
    $str_len = strlen($string);

    // leave if the string is within the limit
    if ($char_length &gt;= $str_len) return $string;

    // split the words into an array
    $words = explode(&#039; &#039;, $string);

    // record the current position in the words array
    $word_count = 0;

    // prepare the string
    $string = &#039;&#039;;

    // build the string back up, until the character limit is reached
    while ($char_length &gt; $str_len) {
        $string .= &quot;{$words[$word_count]} &quot;;
        $word_count++;
    }

    // remove the last character (space)
    $string = substr($string, 0, -1);

    // if the string now exceeds limit, remove the last word
    if ($char_length &lt;= $str_len) {

        // position (from right) of the first space
        $last_word = strrpos($string, &quot; &quot;);

        // remove last word
        $string = substr($string, 0, $last_word);
    }

    // return trimmed string with any special characters removed from the end and replaced with ellipsis
    return preg_replace(&#039;/[^a-z0-9]+\Z/i&#039;, &#039;&#039;, $string). &#039;&hellip;&#039;;
}</code></pre>
<h3>Notes about this code</h3>
<ul>
<li>I&#8217;ve deliberately avoided using <code>substr</code> to get the sub string of the original string, as using elements of an array is more robust.</li>
<li>The last space added in the <code>while</code> loop needs to be remove <em>before</em> checking if the last word added has pushed the string over the limit</li>
<li>The last word added will almost definitely push the string over the character limit, but just removing it is more efficient than adding complexity to the <code>while</code> loop&#8217;s body &#8211; the overheads would include an <code>if</code> statement, a string length calculation on the current word and a comparison of the word&#8217;s impact on the string&#8217;s length &#8211; all for each iteration
</ul>
<h3>Uses for trim_respect_words</h3>
<p>This code could be used as a simple function, or as part of a class, or, if you&#8217;re using WordPress, a hook that conditionally hangs itself off the <code>get_title()</code> function&#8217;s filter. Ping us a line if you&#8217;d like to know how to do this as, amongst other talents, we&#8217;re seasoned WordPress developers.</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">849</post-id>	</item>
		<item>
		<title>WP Code Tip: get array of post IDs</title>
		<link>https://inthedigital.co.uk/wp-code-tip-get-array-of-post-ids/</link>
		
		<dc:creator><![CDATA[Mervyn Booth]]></dc:creator>
		<pubDate>Thu, 18 Oct 2018 11:03:09 +0000</pubDate>
				<category><![CDATA[WP Snippets]]></category>
		<category><![CDATA[Dev Tricks]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress development]]></category>
		<category><![CDATA[Code snippet]]></category>
		<guid isPermaLink="false">https://inthedigital.co.uk/?p=830</guid>

					<description><![CDATA[A number of times over my years developing in WordPress I&#8217;ve needed to extract the post IDs of the posts in an array. And every time I need to do this I use the wp_list_pluck() function, from WP_List_Util, the WordPress list utility class. And every time I use this really handy helper I mean to [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>A number of times over my years developing in WordPress I&#8217;ve needed to extract the post IDs of the posts in an array. And every time I need to do this I use the <a href="https://developer.wordpress.org/reference/functions/wp_list_pluck/" target="_blank" rel="noopener noreferrer nofollow"><code>wp_list_pluck()</code></a> function, from <code>WP_List_Util</code>, the WordPress list utility class. And every time I use this really handy helper I mean to write a simple blog post to help promote it. So here it is.</p>
<p>To help demonstrate its purpose, and why it&#8217;s used, rather than PHP&#8217;s <a href="http://php.net/manual/en/function.array-column.php" target="_blank" rel="noopener noreferrer nofollow"><code>array_column()</code></a> function, let&#8217;s look at the following scenario.</p>
<h2>Scenario &#8211; exclude post IDs from a WP Query</h2>
<p><strong>Objective:</strong> Show the trending posts and the latest posts, on the homepage, excluding trending posts from latest posts.</p>
<p>In this scenario the objective is to record the post IDs from an array of trending post objects, so they can be excluded from the array of latest post objects, resulting in two unique lists of posts.</p>
<div class="alert alert-primary">
NB: <strong classs="alert-title">This is for demonstration purposes only</strong></p>
<p>If I were solving this particular problem I&#8217;d only return an array of IDs (rather than post objects) and exclude them using <code>post__not_in</code>, but for the purposes of a simple way to demonstrate how to use <code>wp_list_pluck()</code> I&#8217;ll ignore that option.
</div>
<h3>Why use wp_list_pluck instead of array_column?</h3>
<p>As stated by WordPress, these list helpers do almost the same thing; that is, they grab a field from each item in a list, in our case the <code>ID</code> for each post in the query. The reason we&#8217;re using <code>wp_list_pluck()</code> is simply because it works on objects, too, which is perfect, as our query will return an array of post objects, containing (among others) the post IDs.</p>
<h3>Query for Trending Posts</h3>
<pre><code class="lang-php">/**
 * Filter posts &#039;WHERE&#039; comments are greater than 0
 * 
 * appends an additional clause to the SQL query to return only posts with comments.
 *
 * @return $where string
 */
function itd_has_comments_filter($where) {
    $where .= &#039; AND comment_count &gt; 0 &#039;;
    return $where;
}

// Hang the comments filter onto the &#039;posts_where&#039; hook
add_filter(&#039;posts_where&#039;, &#039;itd_has_comments_filter&#039;);

/**
 * Get a list of trending posts
 * 
 * This is based on the number of comments the post has received over the last month (if any).
 */
// Set up the args to order by comments, then modified date and limit to 6 posts that have been modified in the last month.
$args = [
    &#039;post_type&#039; =&gt; &#039;post&#039;,
    &#039;posts_per_page&#039; =&gt; 6,
    &#039;date_query&#039; =&gt; [
        &#039;column&#039; =&gt; &#039;modified&#039;,
        &#039;after&#039;  =&gt; &#039;1 month ago&#039;,
    ],
    &#039;orderby&#039; =&gt; [
        &#039;comment_count&#039; =&gt; &#039;DESC&#039;,
        &#039;post_modified&#039; =&gt; &#039;DESC&#039;
    ],
];

// store the query results
$trending_posts = new WP_Query($args);

// restore the posts query
remove_filter(&#039;posts_where&#039;, &#039;itd_has_comments_filter&#039;);
wp_reset_postdata();

// get the array of post IDs 
$trending_post_ids = wp_list_pluck($trending_posts-&gt;posts, &#039;ID&#039;);
</code></pre>
<h3>Query for Latest Posts</h3>
<pre><code class="lang-php">/**
 * Get a list of latest posts, excluding trending posts
 */
// Set up the args to order by latest posts (default) and limit to 6 posts, excluding the $trending_post_ids.
$args = [
    &#039;post_type&#039; =&gt; &#039;post&#039;,
    &#039;posts_per_page&#039; =&gt; 6,
    &#039;post__not_in&#039; =&gt; $trending_post_ids,
];

// store the query results
$latest_posts = new WP_Query($args);

// restore the posts query
wp_reset_postdata();</code></pre>
<h2>Conclusion</h2>
<p>So there you have it, <code>wp_list_pluck</code> is a simple helper that circumnavigates the need to write a loop to get the column data from an array/object. Also in the above examples you&#8217;ll see the use of the <code>posts_where</code> filter, that&#8217;s modifying the posts query to include an additional WHERE parameter to the SQL database query, and semi-complex query arguments, for querying by date parameters and multi-field ordering &#8211; feel free to get in touch if you want to know about how to use these, or if you would like a helping hand with any development challenges.</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">830</post-id>	</item>
		<item>
		<title>Use PHP&#8217;s in_array() to compare a variable to multiple values</title>
		<link>https://inthedigital.co.uk/use-phps-in_array-to-compare-a-variable-to-multiple-values/</link>
		
		<dc:creator><![CDATA[Mervyn Booth]]></dc:creator>
		<pubDate>Fri, 28 Sep 2018 08:58:31 +0000</pubDate>
				<category><![CDATA[Dev Tricks]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Code snippet]]></category>
		<category><![CDATA[Coding standards]]></category>
		<guid isPermaLink="false">https://inthedigital.co.uk/?p=820</guid>

					<description><![CDATA[When comparing a variable with multiple values consider using in_array(), instead of complex if expressions. I love clean, easy-to-read code, which is why I am not a fan of if statements with complex expressions. For example, consider the following snippet, which is checking a variable against several values: if ($test_variable === &#039;value1&#039; &#124;&#124; $test_variable === [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>When comparing a variable with multiple values consider using <code>in_array()</code>, instead of complex <code>if</code> expressions.</p>
<p>I love clean, easy-to-read code, which is why I am not a fan of <code>if</code> statements with complex expressions. For example, consider the following snippet, which is checking a variable against several values:</p>
<pre><code class="lang-php">if ($test_variable === &#039;value1&#039; || $test_variable === &#039;value2&#039; || $test_variable === &#039;value3&#039; || $test_variable === &#039;value4&#039;) {
    // do something if $test_variable is equal to one of the strings
}
</code></pre>
<p>This is not nice and certainly doesn&#8217;t feel very DRY.</p>
<h2>Using in_array() as the Conditional</h2>
<p>Now consider the following code fragment, this time using the <code>in_array</code> function as the <code>if</code> statement&#8217;s conditional expression:</p>
<pre><code class="lang-php">if (in_array($test_variable, [&#039;value1&#039;, &#039;value2&#039;, &#039;value3&#039;, &#039;value4&#039;]) {
    // do something if $test_variable is equal to one of the strings in the array
}
</code></pre>
<p>In my opinion this is a much cleaner solution that&#8217;s easier to read, especially if the code is maintained by a team of developers, where it&#8217;s possible the programmer that wrote the code will not be the one maintaining it.</p>
<p>It could be taken a step further by first storing the array in a variable, then using it as the argument, as follows:</p>
<pre><code class="lang-php">$test_array = [
    &#039;value1&#039;,
    &#039;value2&#039;,
    &#039;value3&#039;,
    &#039;value4&#039;
];
if (in_array($test_variable, $test_array) {
    // do something if $test_variable is equal to one of the strings in $test_array
}
</code></pre>
<p>This approach is very clean and extremely easy to read, especially if the array&#8217;s items become more complex in themselves.</p>
<h3>Other Approaches</h3>
<p>Using <code>in_array</code> is just one way to improve the readability of code, another is the <a href="http://php.net/manual/en/control-structures.switch.php" rel="noopener noreferrer nofollow" target="_blank"><code>switch()</code> statement</a>, which would handle the <code>if</code> statement&#8217;s complexities. Here&#8217;s one way to write the code fragment using a <code>switch</code>:</p>
<pre><code class="lang-php">switch ($test_variable) {
    case &#039;value1&#039;:
    case &#039;value2&#039;:
    case &#039;value3&#039;:
    case &#039;value4&#039;:
        $value_exists = true;
        break;
    default: 
        $value_exists = false;
}

if ($value_exists) {
    // do something if $value_exists is true
}</code></pre>
<p>But, my personal preference is to use in_array, as it feels cleaner.</p>
<h2>Wrapping up</h2>
<p>If you think you&#8217;re codebase is in need of refactoring, for improved readability (and performance), please get in touch and we’ll gladly help. We have many years of programming experience, in a wide range of languages, including PHP, Java, JavaScript, and (S)CSS. We also specialise in WordPress development, developing custom themes and plugins, and helping clients with all manner of performance, including search engine optimisations.</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">820</post-id>	</item>
		<item>
		<title>Setting up PHP composer</title>
		<link>https://inthedigital.co.uk/setting-up-php-composer/</link>
		
		<dc:creator><![CDATA[Mervyn Booth]]></dc:creator>
		<pubDate>Tue, 28 Aug 2018 14:05:41 +0000</pubDate>
				<category><![CDATA[Dev Tricks]]></category>
		<category><![CDATA[Development]]></category>
		<guid isPermaLink="false">https://inthedigital.co.uk/?p=709</guid>

					<description><![CDATA[This article walks through the simple steps for setting up composer. Initially at project level, then, optionally, at the global level. Note: This article is for Mac(Unix)/Linux users, please refer the official docs for Windows. What is Composer? Composer is the dependency manager for PHP packets. In my opinion it should be in every web [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>This article walks through the simple steps for setting up composer. Initially at project level, then, optionally, at the global level.</p>
<p><em>Note: This article is for Mac(Unix)/Linux users, please <a href="https://getcomposer.org/doc/00-intro.md#installation-windows" target="_blank" rel="noopener noreferrer nofollow">refer the official docs for Windows</a>.</em></p>
<h2>What is Composer?</h2>
<p><a href="https://getcomposer.org/" target="_blank" rel="noopener noreferrer nofollow">Composer is the dependency manager</a> for PHP packets. In my opinion it should be in every web developer&#8217;s tootlkit, as it is somewhat likely that PHP will be used at some point and extremely likely that dependencies will be required within the projects.</p>
<p>Full documentation can be found on the official composer website, which is where the following steps have been taken from, for manually installing composer. Please refer to their documentation for <a href="https://getcomposer.org/doc/faqs/how-to-install-composer-programmatically.md" target="_blank" rel="noopener noreferrer nofollow">programatic installation of composer</a>.</p>
<h2>Setting up Composer at project level</h2>
<ol>
<li><strong>Download Composer</strong>
<pre><code class="lang-bash">$ php -r &quot;copy(&#039;https://getcomposer.org/installer&#039;, &#039;composer-setup.php&#039;);&quot;</code></pre>
</li>
<li><strong>Verify the Download</strong>
<pre><code class="lang-bash">$ php -r &quot;if (hash_file(&#039;SHA384&#039;, &#039;composer-setup.php&#039;) === &#039;544e09ee996cdf60ece3804abc52599c22b1f40f4323403c44d44fdfdd586475ca9813a858088ffbc1f233e9b180f061&#039;) { echo &#039;Installer verified&#039;; } else { echo &#039;Installer corrupt&#039;; unlink(&#039;composer-setup.php&#039;); } echo PHP_EOL;&quot;</code></pre>
</li>
<li><strong>Install Composer</strong>
<pre><code>$ php composer-setup.php</code></pre>
</li>
<li><strong>Delete the download file</strong>
<pre><code>$ php -r &quot;unlink(&#039;composer-setup.php&#039;);&quot;</code></pre>
</li>
</ol>
<h2>Making Composer globally accessible</h2>
<p>To use composer in a global scope, simply move it to the usr/local/bin directory.</p>
<p><em>Note: If the following command fails, try it again with super user access; <code>sudo</code></em> before <code>mv</code></p>
<ol>
<li><strong>Move the Composer PHAR</strong>
<pre><code class="lang-bash">$ mv composer.phar /usr/local/bin/composer</code></pre>
</li>
<li><strong>Verify installation &amp; version (optional)</strong>
<pre><code class="lang-bash">$ composer --version
// will display your composer version</code></code></pre>
</li>
</ol>
<p>You are now set to use composer. Simply type <code>composer [commands + tags]</code> in the terminal and enjoy.</p>
<h2>Updating Composer</h2>
<p>To update composer at any time, simply enter the following command:</p>
<pre><code class="lang-bash">$ composer self-update</code></pre>
<p>To update composer dependencies, simply enter the following command (from the directory that contains the composer.json file):</p>
<pre><code class="lang-bash">$ composer update</code></pre>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">709</post-id>	</item>
	</channel>
</rss>
