<?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/"
	>

<channel>
	<title>Marcus Nyberg &#187; wordpress</title>
	<atom:link href="http://www.marcusnyberg.com/category/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.marcusnyberg.com</link>
	<description>Digital and dangerous</description>
	<lastBuildDate>Fri, 03 Feb 2012 08:41:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Using remove_action in a WordPress child theme</title>
		<link>http://www.marcusnyberg.com/2012/02/03/using-remove_action-in-a-wordpress-child-theme/</link>
		<comments>http://www.marcusnyberg.com/2012/02/03/using-remove_action-in-a-wordpress-child-theme/#comments</comments>
		<pubDate>Fri, 03 Feb 2012 08:41:00 +0000</pubDate>
		<dc:creator>marcus</dc:creator>
				<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.marcusnyberg.com/?p=1035</guid>
		<description><![CDATA[When you make a WordPress child theme and want to override functions declared in the parent theme there aren&#8217;t any good documentation available from WordPress. In the reference manual you&#8217;ll find the the remove_action remove_action( $tag, $function_to_remove, $priority, $accepted_args) The first location that you probably try to apply this is in the &#8221;functions.php&#8221; file by [...]]]></description>
			<content:encoded><![CDATA[<p>When you make a WordPress child theme and want to override functions declared in the parent theme there aren&#8217;t any good documentation available from WordPress. In the reference manual you&#8217;ll find the the <a href="http://codex.wordpress.org/Function_Reference/remove_action">remove_action</a> <em>remove_action( $tag, $function_to_remove, $priority, $accepted_args</em>)</p>
<p>The first location that you probably try to apply this is in the &#8221;functions.php&#8221; file by adding something like this:</p>
<p><code><br />
remove_action('wp_head','oldFunction');<br />
function newFunction() { echo "use me instead"; }<br />
add_action('wp_head','newFunction');<br />
</code></p>
<p>However, this is not going to work. The oldFunction is still going to be executed and the new one as well. The child themes &#8221;functions.php&#8221; is executed before the parent themes &#8221;functions.php&#8221; and the remove_action command doesn&#8217;t know about the function it is trying to remove. We somehow need to remove the old function after it has been declared. The wordpress hook <a href="http://codex.wordpress.org/Plugin_API/Action_Reference/after_setup_theme" target="_blank">after_setup_theme</a> seems to be a good candidate for a solution because it runs AFTER the parent and childs functions are loaded.</p>
<p>Use it like this:<br />
<code><br />
function removeOldFunction() {<br />
    remove_action('wp_head','oldFunction');<br />
    add_action('wp_head','newFunction');<br />
}<br />
function newFunction() { echo "use me instead"; }<br />
add_action('after_setup_theme','removeOldFunction');<br />
</code></p>
<p><strong>Good reading</strong><br />
<a href="http://justintadlock.com/archives/2010/12/30/wordpress-theme-function-files" target="_blank">WordPress theme function files</a><br />
<a href="http://venutip.com/content/right-way-override-theme-functions" target="_blank">The Right Way to Override Theme Functions</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.marcusnyberg.com/2012/02/03/using-remove_action-in-a-wordpress-child-theme/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ny webbsida &#8211; harrietsatelje.se</title>
		<link>http://www.marcusnyberg.com/2010/11/29/ny-webbsida-harrietsatelje-se/</link>
		<comments>http://www.marcusnyberg.com/2010/11/29/ny-webbsida-harrietsatelje-se/#comments</comments>
		<pubDate>Mon, 29 Nov 2010 18:22:04 +0000</pubDate>
		<dc:creator>marcus</dc:creator>
				<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.marcusnyberg.com/?p=866</guid>
		<description><![CDATA[Min duktiga chef ville ha hjälp med sin privata konstnärs-blogg/portfolio/hemsida. Självklart ställde jag upp på det och resultatet hittar ni på harrietsatelje.se. Självklart så passar WordPress ypperligt för de flesta sorters sajter och så även till denna. Specifikationer CMS: WordPress 3.0.1 Tema: Fresh And Clean 1.0 (modifierat) Tillägg/plugins: Akismet, All in One SEO Pack, Blogger [...]]]></description>
			<content:encoded><![CDATA[<p>Min duktiga chef ville ha hjälp med sin privata konstnärs-blogg/portfolio/hemsida. Självklart ställde jag upp på det och resultatet hittar ni på <a href="http://harrietsatelje.se">harrietsatelje.se</a>. Självklart så passar WordPress ypperligt för de flesta sorters sajter och så även till denna.</p>
<p><a href="http://www.marcusnyberg.com/wp-content/uploads/2010/11/harriets-atelje.jpg"><img src="http://www.marcusnyberg.com/wp-content/uploads/2010/11/harriets-atelje-300x213.jpg" alt="" title="harriets-atelje" width="300" height="213" class="alignnone size-medium wp-image-867" /></a></p>
<p><strong>Specifikationer</strong><br />
CMS: WordPress 3.0.1<br />
Tema: <a href="http://weblogtoolscollection.com/news/topic/fresh-and-clean-wordpress-theme">Fresh And Clean 1.0</a> (modifierat)<br />
Tillägg/plugins: Akismet, All in One SEO Pack, Blogger Importer, Contact Form 7, Google XML Sitemaps, NextGEN Gallery </p>
<p>Lycka till med målandet och webbsidan Harriet!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.marcusnyberg.com/2010/11/29/ny-webbsida-harrietsatelje-se/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Error importing from blogger (blogspot) to WordPress</title>
		<link>http://www.marcusnyberg.com/2010/11/12/error-importing-from-blogger-blogspot-to-wordpress/</link>
		<comments>http://www.marcusnyberg.com/2010/11/12/error-importing-from-blogger-blogspot-to-wordpress/#comments</comments>
		<pubDate>Fri, 12 Nov 2010 11:54:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.marcusnyberg.com/?p=842</guid>
		<description><![CDATA[Today I created a fresh WordPress blog and tried to import an existing blog from blogger (blogspot). Everything worked is it should and all posts were converted, however all of the imported posts got extra characters in them that wasn&#8217;t in the original blog. The post title and the post content all got an &#8216;>&#8217; [...]]]></description>
			<content:encoded><![CDATA[<p>Today I created a fresh WordPress blog and tried to import an existing blog from blogger (blogspot). Everything worked is it should and all posts were converted,  however all of the imported posts got extra characters in them that wasn&#8217;t in the original blog. The post title and the post content all got an &#8216;>&#8217; in them in the first position. Like: &#8221;>This a a post title&#8221; amd &#8221;>This is the content&#8221;.</p>
<p>To clean this up you can run the following sql-commands against the wordpress database:</p>
<pre name="code" class="sql">
update wp_posts SET post_title = TRIM(LEADING '>' FROM post_title)   WHERE post_title LIKE '>%'
update wp_posts SET post_content = TRIM(LEADING '>' FROM post_content)  WHERE post_content LIKE '>%'
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.marcusnyberg.com/2010/11/12/error-importing-from-blogger-blogspot-to-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>dubbeltallen.se &#8211; Timrå IK historik</title>
		<link>http://www.marcusnyberg.com/2009/09/22/dubbeltallen-se-timra-ik-historik/</link>
		<comments>http://www.marcusnyberg.com/2009/09/22/dubbeltallen-se-timra-ik-historik/#comments</comments>
		<pubDate>Tue, 22 Sep 2009 06:53:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Timrå IK]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.marcusnyberg.com/?p=268</guid>
		<description><![CDATA[Dubbeltallen.se såg sitt ljus för en månad sedan och är en webbsida där man kan läsa om Timrå IK&#8217;s historia. Mer om webbsidan kan ni läsa på Dubbeltallen.se Eftersom jag tycker att WordPress är så otroligt bra och lättjobbat så blev det WP som fick driva sajten. Om jag skulle avslöja hur snabbt jag fick [...]]]></description>
			<content:encoded><![CDATA[<p>Dubbeltallen.se såg sitt ljus för en månad sedan och är en webbsida där man kan läsa om Timrå IK&#8217;s historia. Mer om webbsidan kan ni läsa på <a href="http://www.dubbeltallen.se" target="_blank">Dubbeltallen.se</a></p>
<p><a href="http://www.marcusnyberg.com/wp-content/uploads/2009/09/dubbeltallen-se.JPG"><img src="http://www.marcusnyberg.com/wp-content/uploads/2009/09/dubbeltallen-se-300x241.jpg" alt="dubbeltallen-se" title="dubbeltallen-se" width="300" height="241" class="alignnone size-medium wp-image-269" /></a></p>
<p>Eftersom jag tycker att WordPress är så otroligt bra och lättjobbat så blev det WP som fick driva sajten. Om jag skulle avslöja hur snabbt jag fick upp sajten så skulle ni nog inte tro mig, men snabbt gick det. Lite fakta om sajten nedan:</p>
<p><strong>CMS</strong><br />
<a href="http://wordpress.org/" target="_blank">WordPress</a></p>
<p><strong>Tema</strong><br />
<a href="http://wordpress.org/extend/themes/inove" target="_blank">iNove</a></p>
<p><strong>Tillägg/plugins</strong><br />
µAudio Player<br />
Akismet<br />
All in One Adsense and YPN<br />
All in One SEO Pack<br />
GD Simple Widgets<br />
Random Pages widget<br />
Theme My Login<br />
XPertMailer</p>
]]></content:encoded>
			<wfw:commentRss>http://www.marcusnyberg.com/2009/09/22/dubbeltallen-se-timra-ik-historik/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hemsida till Ludvig Nordström sällskapet</title>
		<link>http://www.marcusnyberg.com/2009/07/27/hemsida-till-ludvig-nordstrom-sallskapet/</link>
		<comments>http://www.marcusnyberg.com/2009/07/27/hemsida-till-ludvig-nordstrom-sallskapet/#comments</comments>
		<pubDate>Mon, 27 Jul 2009 18:13:23 +0000</pubDate>
		<dc:creator>marcus</dc:creator>
				<category><![CDATA[freebsd]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[mod_rewrite]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[qmail]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.marcusnyberg.com/?p=232</guid>
		<description><![CDATA[Jag har nyligen hjälp en kompis med att bygga en hemsida åt Ludvig Nordström sällskapet. Så kika på den! Eftersom jag är ett stort fan av att använda WordPress (php) som CMS till enklare webbsidor åt föreningar/mindre företag så blev det givetvis den tekniska lösningen. Som vanligt blev det lite hackande i form av att [...]]]></description>
			<content:encoded><![CDATA[<p>Jag har nyligen hjälp en kompis med att bygga en hemsida åt  <a href="http://ludvignordstromsallskapet.se/" target="_blank">Ludvig Nordström sällskapet</a>. Så kika på den!</p>
<p><a href="http://ludvignordstromsallskapet.se/" target="_blank"><img src="http://www.marcusnyberg.com/wp-content/uploads/2009/07/ludvig1.jpg" alt="ludvig1" title="ludvig1" width="100%"/></A></p>
<p>Eftersom jag är ett stort fan av att använda <a href="http://www.wordpress.org">WordPress</a> (php) som CMS till enklare webbsidor åt föreningar/mindre företag så blev det givetvis den tekniska lösningen. Som vanligt blev det lite hackande i form av att mixtra med teman samt plugins/tillägg men det var ganska enkla fixar som behövde göras. Samtidigt var det kul att se alla bra nyheter i WordPress 2.8. Det är riktigt imponerande att följa WP&#8217;s utveckling.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.marcusnyberg.com/2009/07/27/hemsida-till-ludvig-nordstrom-sallskapet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tutorial &#8211; Sending email from WordPress using Google Gmail</title>
		<link>http://www.marcusnyberg.com/2009/01/11/tutorial-sending-email-from-wordpress-using-google-gmail/</link>
		<comments>http://www.marcusnyberg.com/2009/01/11/tutorial-sending-email-from-wordpress-using-google-gmail/#comments</comments>
		<pubDate>Sun, 11 Jan 2009 19:22:07 +0000</pubDate>
		<dc:creator>marcus</dc:creator>
				<category><![CDATA[Google]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.marcusnyberg.com/?p=145</guid>
		<description><![CDATA[This tutorial covers how you easily can modify your WordPress installation to send email with a Google Gmail account instead of sending through your webserver. Only ONE file needs to be modified. You also need to have a working WP-installation and a Gmail-account. Step 1 Open the file &#8221;wp-includes/class-phpmailer.php&#8221; (which is the class that sends [...]]]></description>
			<content:encoded><![CDATA[<p>This tutorial covers how you easily can modify your WordPress installation to send email with a Google Gmail account instead of sending through your webserver. Only ONE file needs to be modified. You also need to have a working WP-installation and a Gmail-account.</p>
<p><strong>Step 1</strong><br />
Open the file &#8221;wp-includes/class-phpmailer.php&#8221; (which is the class that sends email in WordPress) in your favourite text-editor.</p>
<p><strong>Step 2</strong><br />
Find and modify the following properties.</p>
<p>var $Mailer = &#8216;smtp&#8217;;<br />
var $Host = &#8216;smtp.gmail.com&#8217;;<br />
var $Port = 465;<br />
var $SMTPAuth = true;<br />
var $Username = &#8216;your_username@gmail.com&#8217;;<br />
var $Password  = &#8216;your_gmail_password&#8217;;</p>
<p><strong>Step 3</strong><br />
Find the the method &#8221;IsMail&#8221; (in the same file) and comment out one row of code like this:</p>
<p>function IsMail() {<br />
    //$this->Mailer = &#8216;mail&#8217;;<br />
}</p>
<p><strong>All steps complete!</strong></p>
<p>This should work with all WordPress versions that uses a version of the <a href="http://phpmailer.codeworxtech.com/">phpMailer-class</a> that is Gmail compatible. </p>
<p>Tested in WordPress v 2.7</p>
<p><strong>LOOK HERE</strong><br />
I don&#8217;t use this method any longer because I don&#8217;t want to touch the core-files of wordpress. It is a bad habit to do so, because they get overwritten each time you update wordpress. There is a plugin called <a href="http://www.xpertmailer.com/">XPertMailer </a> that can send email through gmail. Use that one instead!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.marcusnyberg.com/2009/01/11/tutorial-sending-email-from-wordpress-using-google-gmail/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

