<?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>Wordpress | Nerdpress.org</title>
	<atom:link href="https://nerdpress.org/tag/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>https://nerdpress.org</link>
	<description>...dev, tech problems and solutions.</description>
	<lastBuildDate>Sat, 28 Feb 2026 14:46:50 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>A WordPress-like More Tag in Astro</title>
		<link>https://nerdpress.org/2026/02/28/a-wordpress-like-more-tag-in-astro/</link>
		
		<dc:creator><![CDATA[Ivo Bathke]]></dc:creator>
		<pubDate>Sat, 28 Feb 2026 14:46:49 +0000</pubDate>
				<category><![CDATA[Astro]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Wordpress]]></category>
		<guid isPermaLink="false">https://nerdpress.org/?p=3470</guid>

					<description><![CDATA[<p>When migrating from WordPress to Astro, one encounters various challenges.One is handling the WordPress &#8220;More&#8221; tag, which originates from the More Element in the WordPress Block Editor. After converting the WordPress export to Markdown, you will find `&#60;!&#8211; more &#8211;>` tags in your content. These tags serve as delimiters in WordPress, allowing you to define &#8230; </p>
<p class="link-more"><a href="https://nerdpress.org/2026/02/28/a-wordpress-like-more-tag-in-astro/" class="more-link">Continue reading<span class="screen-reader-text"> "A WordPress-like More Tag in Astro"</span></a></p>
The post <a href="https://nerdpress.org/2026/02/28/a-wordpress-like-more-tag-in-astro/">A WordPress-like More Tag in Astro</a> first appeared on <a href="https://nerdpress.org">Nerdpress.org</a>.]]></description>
										<content:encoded><![CDATA[<p>When migrating from WordPress to Astro, one encounters various challenges.<br />One is handling the WordPress &#8220;More&#8221; tag, which originates from the More Element in the WordPress Block Editor.</p>



<p>After converting the WordPress export to Markdown, you will find `&lt;!&#8211; more &#8211;>` tags in your content. These tags serve as delimiters in WordPress, allowing you to define where the excerpt ends on listing pages.</p>



<span id="more-3470"></span>



<h2 class="wp-block-heading"><strong>The Challenge</strong></h2>



<p>Astro does not provide a built-in mechanism to handle these tags. I also could not find a suitable plugin that would manage this functionality.</p>



<p>My first approach was to use a Remark plugin like <a href="https://www.npmjs.com/package/remark-excerpt" target="_blank" rel="noopener" title="">remark-excerpt</a>. However, this did not work as expected. Instead of adding an Excerpt property to the frontmatter or to the data object of the content collection, it simply replaced the Content with the Excerpt.</p>



<p>Writing a custom Remark plugin proved challenging as well. While extracting the excerpt markdown is straightforward, rendering it to HTML is not. Since Astro does not expose its renderer (yet*), you would need to create your own renderer or use Astro&#8217;s internal `astrojs/markdown-remark`. Both approaches are rather hacky and not really recommended.</p>



<p>* <em>There are ongoing discussions about making the renderer API public: <a href="https://github.com/withastro/roadmap/discussions/1094" target="_blank" rel="noopener" title="">Astro Roadmap Discussion #1094.</a></em></p>



<h2 class="wp-block-heading"><strong>The Solution</strong></h2>



<p>The current best way to handle the WordPress More Tag in Astro is to split the rendered HTML content directly.</p>



<p>On the list page where you want to display the excerpt, you can map over the entries, split the rendered HTML at the <code>&lt;!--more--></code> tag, and add the excerpt to the return object:</p>


<pre class="wp-block-code"><span><code class="hljs language-javascript"><span class="hljs-keyword">const</span> previewPosts = <span class="hljs-keyword">await</span> <span class="hljs-built_in">Promise</span>.all(
	posts.map(<span class="hljs-keyword">async</span> (post) =&gt; {
		<span class="hljs-keyword">const</span> fullHtml = post.rendered?.html || <span class="hljs-string">''</span>;
		<span class="hljs-keyword">const</span> moreIndex = fullHtml.indexOf(<span class="hljs-string">'&lt;!--more--&gt;'</span>);
		<span class="hljs-keyword">const</span> excerptHtml = moreIndex !== <span class="hljs-number">-1</span> ? fullHtml.slice(<span class="hljs-number">0</span>, moreIndex) : fullHtml;
		<span class="hljs-keyword">const</span> hasMore = moreIndex !== <span class="hljs-number">-1</span>;
		<span class="hljs-keyword">return</span> { post, hasMore, excerptHtml };
	}),
);

{previewPosts.map(<span class="hljs-function">(<span class="hljs-params">{ post, hasMore, Content }</span>) =&gt;</span> (
	<span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"preview-content"</span>&gt;</span>
		<span class="hljs-tag">&lt;<span class="hljs-name">Content</span> /&gt;</span>
	<span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span></span>
	{hasMore &amp;&amp; <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">p</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"read-more"</span>&gt;</span>Read more...<span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span></span>}
))}</code></span></pre>


<p>Straightforward and effective :)</p>



<p></p>The post <a href="https://nerdpress.org/2026/02/28/a-wordpress-like-more-tag-in-astro/">A WordPress-like More Tag in Astro</a> first appeared on <a href="https://nerdpress.org">Nerdpress.org</a>.]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Using Silverstripe Templates outside Silverstripe</title>
		<link>https://nerdpress.org/2013/11/15/silverstripe-templates-outside-silverstripe/</link>
		
		<dc:creator><![CDATA[Max Girkens]]></dc:creator>
		<pubDate>Fri, 15 Nov 2013 08:21:21 +0000</pubDate>
				<category><![CDATA[CMS]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Silverstripe]]></category>
		<category><![CDATA[templates]]></category>
		<category><![CDATA[Wordpress]]></category>
		<guid isPermaLink="false">https://nerdpress.org/?p=2462</guid>

					<description><![CDATA[<p>In a recent website-project i had a WordPress Blog running next to the main CMS Silverstripe, handling the Blog-part of the site. Integrating the Blog in Silverstripe (which indeed would have made things simpler) was not  an option at the time. The usage of loads of WordPress plugins would&#8217;ve made a rewrite a major task, which &#8230; </p>
<p class="link-more"><a href="https://nerdpress.org/2013/11/15/silverstripe-templates-outside-silverstripe/" class="more-link">Continue reading<span class="screen-reader-text"> "Using Silverstripe Templates outside Silverstripe"</span></a></p>
The post <a href="https://nerdpress.org/2013/11/15/silverstripe-templates-outside-silverstripe/">Using Silverstripe Templates outside Silverstripe</a> first appeared on <a href="https://nerdpress.org">Nerdpress.org</a>.]]></description>
										<content:encoded><![CDATA[<p>In a recent website-project i had a <a href="http://wordpress.org/">WordPress</a> Blog running next to the main CMS <a href="http://www.silverstripe.org/">Silverstripe</a>, handling the Blog-part of the site.</p>
<p><em>Integrating the Blog in Silverstripe (which indeed would have made things simpler) was not  an option at the time. The usage of loads of WordPress plugins would&#8217;ve made a rewrite a major task, which was out of the budget.</em></p>
<p>The blog was integrated in the same page layout as the rest of the website. So ideally it would at least share the same Templates for header, footer etc. and would integrate the sites navigation built by Silverstripe.</p>
<p><strong>But how to use the pre-rendered <a href="http://doc.silverstripe.org/framework/en/3.0/reference/templates">Silverstripe template</a> <code>.ss</code> files in a WordPress theme?<br />
</strong></p>
<p>The following worked fine for me, using Silverstripe 3.0:<br />
<span id="more-2462"></span><br />
In the functions.php of the wordpress theme i added this code to init a silverstripe controller:</p>
<pre class="brush: php; title: ; notranslate">
//init silverstripe
require_once '&#x5B;path-to-silverstripe-root-folder]/framework/core/Core.php';
require_once '&#x5B;path-to-silverstripe-root-folder]/framework/model/DB.php';
//init the Database connection
DB::connect($databaseConfig);
//fetch some page, it that case i used the 404 ErrorPage
$SSPage = DataObject::get_by_id('Page', 4);
//init a the controller and cache it as a global variable
$SSctrl = new ContentController($SSPage);
//add the controller to the stack, so it becomes available as the current controller for the template
$SSctrl-&gt;pushCurrent();

</pre>
<p>and also some helper functions to get the actual templates</p>
<pre class="brush: php; title: ; notranslate">
function get_Silverstripe_Header()
{
    global $SSctrl;
    //render the controller with the includes/Header.ss template
    return $SSctrl-&gt;renderWith('Header');
}

function get_Silverstripe_Footer()
{
    global $SSctrl;
    //..or any other template, like the footer
    return $SSctrl-&gt;renderWith('Footer');
}
</pre>
<p>&#8230;and then just use these in the templates:</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php echo get_Silverstripe_Header() ?&gt;
</pre>
<p>Of course this is no way limited to WordPress. It just an idea how<em> to access Silverstripe Templates outside of Silverstripe code</em>.</p>The post <a href="https://nerdpress.org/2013/11/15/silverstripe-templates-outside-silverstripe/">Using Silverstripe Templates outside Silverstripe</a> first appeared on <a href="https://nerdpress.org">Nerdpress.org</a>.]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>WordPress: eine wp-config.php für lokal und live</title>
		<link>https://nerdpress.org/2010/12/16/wordpress-eine-wp-config-php-fur-lokal-und-live/</link>
		
		<dc:creator><![CDATA[Max Girkens]]></dc:creator>
		<pubDate>Thu, 16 Dec 2010 12:55:09 +0000</pubDate>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[lokal]]></category>
		<category><![CDATA[php5]]></category>
		<category><![CDATA[wp-config.php]]></category>
		<guid isPermaLink="false">https://nerdpress.org/?p=1293</guid>

					<description><![CDATA[<p>Wenn man WordPress mit dem gleichen Code (also der gleichen wp-config.php Datei) lokal und auch auf einem Web-Server benutzen möchte, ist das ganz einfach machbar indem man etwa sowas in die besagte wp-config.php schreibt: //wenn &#34;local&#34; in der Domain vorkommt, sind wir lokal unterwegs if(strpos($_SERVER&#x5B;'HTTP_HOST'], 'local.') !== false ){ define('DB_NAME', 'mydbname'); define('DB_USER', 'mydbuser'); define('DB_PASSWORD', 'mydbpassword'); &#8230; </p>
<p class="link-more"><a href="https://nerdpress.org/2010/12/16/wordpress-eine-wp-config-php-fur-lokal-und-live/" class="more-link">Continue reading<span class="screen-reader-text"> "WordPress: eine wp-config.php für lokal und live"</span></a></p>
The post <a href="https://nerdpress.org/2010/12/16/wordpress-eine-wp-config-php-fur-lokal-und-live/">WordPress: eine wp-config.php für lokal und live</a> first appeared on <a href="https://nerdpress.org">Nerdpress.org</a>.]]></description>
										<content:encoded><![CDATA[<p>Wenn man WordPress mit dem gleichen Code (also der gleichen wp-config.php Datei) lokal und auch auf einem Web-Server benutzen möchte, ist das ganz einfach machbar indem man etwa sowas in die besagte wp-config.php schreibt:</p>
<p><span id="more-1293"></span></p>
<pre class="brush: php; title: ; notranslate">
//wenn &quot;local&quot; in der Domain vorkommt, sind wir lokal unterwegs

if(strpos($_SERVER&#x5B;'HTTP_HOST'], 'local.') !== false ){
  define('DB_NAME', 'mydbname');
  define('DB_USER', 'mydbuser');
  define('DB_PASSWORD', 'mydbpassword');
  define('DB_HOST', 'mydbhost');
}

//ansonsten auf dem Produktiv Server

else{ 
  define('DB_NAME', 'mylivedbname');
  define('DB_USER', 'mylivedbuser');
  define('DB_PASSWORD', 'mylivedbpassword');
  define('DB_HOST', 'mylivedbhost');
  //wenn man möchte, kann man hier noch die FTP Daten eintragen 
  //und damit &quot;one-click&quot; die automatischen Updates laufen lassen
  define('FTP_HOST', 'myFTPhost');
  define('FTP_USER', 'myFTPuser');
  define('FTP_PASS', 'myFTPpassword');
}

//damit die ganze Kiste dann auch ohne Anpassungen funktioniert,
//muss man hier aber noch die WP_SITEURL und WP_HOME aus der DB überschreiben
//(und zB. dynamisch halten oder eben in die if Abfrage mit reinpacken)

define('WP_SITEURL', 'http://' . $_SERVER&#x5B;'HTTP_HOST'] );
define('WP_HOME', 'http://' . $_SERVER&#x5B;'HTTP_HOST']);

</pre>The post <a href="https://nerdpress.org/2010/12/16/wordpress-eine-wp-config-php-fur-lokal-und-live/">WordPress: eine wp-config.php für lokal und live</a> first appeared on <a href="https://nerdpress.org">Nerdpress.org</a>.]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Strato, WordPress, Umleitungsschleife&#8230;</title>
		<link>https://nerdpress.org/2009/11/12/strato-wordpress-umleitungsschleife/</link>
		
		<dc:creator><![CDATA[Max Girkens]]></dc:creator>
		<pubDate>Thu, 12 Nov 2009 12:05:31 +0000</pubDate>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Endlosschleife]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[Schnurpsel]]></category>
		<category><![CDATA[Strato]]></category>
		<category><![CDATA[Umleitungsschleife]]></category>
		<category><![CDATA[www domain]]></category>
		<guid isPermaLink="false">https://nerdpress.org/?p=565</guid>

					<description><![CDATA[<p>Um &#8220;duplicate content&#8221; Missverständnissen vorzubeugen hat ja WordPress diese canonical URL redirects. Klingt komplizierter als es ist. Im einfachsten Fall wird jemand der http://www.domain.com aufruft, auf http://domain.com umgeleitet. Klappt auch ganz hervorragend. &#8230; Ausser wenn nach dem redirect das &#8220;www.&#8221; aus irgendeinem Grund zwar aus der URL, aber nicht aus dem http-Header verschwinden möchte  Dann &#8230; </p>
<p class="link-more"><a href="https://nerdpress.org/2009/11/12/strato-wordpress-umleitungsschleife/" class="more-link">Continue reading<span class="screen-reader-text"> "Strato, WordPress, Umleitungsschleife&#8230;"</span></a></p>
The post <a href="https://nerdpress.org/2009/11/12/strato-wordpress-umleitungsschleife/">Strato, WordPress, Umleitungsschleife…</a> first appeared on <a href="https://nerdpress.org">Nerdpress.org</a>.]]></description>
										<content:encoded><![CDATA[<p>Um &#8220;duplicate content&#8221; <a href="http://www.goldmann.de/google-duplicate-content-ist-ein-problem_tipp_198.html">Missverständnissen</a> vorzubeugen hat ja WordPress diese <a href="http://markjaquith.wordpress.com/2007/09/25/wordpress-23-canonical-urls/">canonical URL</a> redirects.</p>
<p>Klingt komplizierter als es ist. Im einfachsten Fall wird jemand der</p>
<pre class="brush: xml; title: ; notranslate">
http://www.domain.com
</pre>
<p>aufruft, auf</p>
<pre class="brush: xml; title: ; notranslate">
http://domain.com
</pre>
<p>umgeleitet. Klappt auch ganz hervorragend.</p>
<p>&#8230;<span id="more-565"></span></p>
<p>Ausser wenn nach dem redirect das &#8220;www.&#8221; aus irgendeinem Grund zwar aus der URL, aber nicht aus dem http-Header verschwinden möchte  Dann wird WordPress <span style="text-decoration: line-through;">schön</span> weiter redirecten und fertig ist die Endlosschleife.</p>
<p>Ausführlicher erklärt ist das alles <a href="http://schnurpsel.de/wordpress-23-problem-ohne-www-bei-strato-65/">hier</a>.<br />
Dort hat <span style="text-decoration: line-through;">Schnurpsel</span> der <a href="http://schnurpsel.de/">Autor</a> hat auch direkt ein <a href="http://schnurpsel.de/wordpress-23-problem-ohne-www-bei-strato-65/">WordPress Plugin</a> (123 True HTTP Host 0.10), was diese Merkwürdigkeit 1a ausbügelt.</p>The post <a href="https://nerdpress.org/2009/11/12/strato-wordpress-umleitungsschleife/">Strato, WordPress, Umleitungsschleife…</a> first appeared on <a href="https://nerdpress.org">Nerdpress.org</a>.]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Simple Tags</title>
		<link>https://nerdpress.org/2009/10/27/simple-tags/</link>
					<comments>https://nerdpress.org/2009/10/27/simple-tags/#comments</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Tue, 27 Oct 2009 13:38:35 +0000</pubDate>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[simple tags]]></category>
		<category><![CDATA[tags]]></category>
		<guid isPermaLink="false">https://nerdpress.org/?p=480</guid>

					<description><![CDATA[<p>Eines meiner persönlichen Lieblingsplugins &#8211; wer die Tagsammlung meines persönlichen Blogs, kleinski.de gesehen hat, weiß auch warum &#8211; ist Simple Tags von Amaury Balmer. Denn dank des Plugins ist die Verschlagwortung von Artikeln binnen kürzester Zeit erledigt und, via Zugriff auf die Yahoo terms extractions API und den Service Tag The Net, werden bekannte Personen, &#8230; </p>
<p class="link-more"><a href="https://nerdpress.org/2009/10/27/simple-tags/" class="more-link">Continue reading<span class="screen-reader-text"> "Simple Tags"</span></a></p>
The post <a href="https://nerdpress.org/2009/10/27/simple-tags/">Simple Tags</a> first appeared on <a href="https://nerdpress.org">Nerdpress.org</a>.]]></description>
										<content:encoded><![CDATA[<p>Eines meiner persönlichen Lieblingsplugins &#8211; wer die <a title="Metatstats von kleinski.de" href="http://kleinski.de/statistiken/" target="_self">Tagsammlung</a> meines persönlichen Blogs, <a title="kleinski.de" href="http://kleinski.de" target="_self">kleinski.de</a> gesehen hat, weiß auch warum &#8211; ist <a title="Simple Tags im WordPresspluginverzeichnis" href="http://wordpress.org/extend/plugins/simple-tags/" target="_self">Simple Tags</a> von <a title="Amaury Balmers Autorenseite auf herewithme.fr" href="http://www.herewithme.fr/author/amaury" target="_self">Amaury Balmer</a>.</p>
<p>Denn dank des Plugins ist die Verschlagwortung von Artikeln binnen kürzester Zeit erledigt und, via Zugriff auf die <em>Yahoo terms extractions API</em> und den Service <a title="Tage The Net" href="http://www.tagthe.net/" target="_self">Tag The Net</a>, werden bekannte Personen, Namen und andere Ausdrücke, die man vielleicht selber gerade nicht auf dem Schirm hat, aus dem entsprechenden Pool gefischt und jeder Artikel ist mit wenigen Mausklicks getagged.</p>
<p><img decoding="async" src="https://s.wordpress.org/extend/plugins/simple-tags/screenshot-6.png?r=167620" alt="Tag it." width="485" height="61" /></p>The post <a href="https://nerdpress.org/2009/10/27/simple-tags/">Simple Tags</a> first appeared on <a href="https://nerdpress.org">Nerdpress.org</a>.]]></content:encoded>
					
					<wfw:commentRss>https://nerdpress.org/2009/10/27/simple-tags/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
	</channel>
</rss>
