Remove “Private:” from the titles of private WordPress pages

# add to functions.php of your theme
function the_title_trim($title) {
  $title = attribute_escape($title);
  $findthese = array( '#Protected:#', '#Private:#' );
  $replacewith = array( '', // What to replace "Protected:" with '' //What to replace "Private:" with );
  $title = preg_replace($findthese, $replacewith, $title);

  return $title;
}
add_filter('the_title', 'the_title_trim');

WordPress Path to actual active theme / Pfad zum eigentlich aktiven Theme

preg_replace("/\/\w*?\.css/", "/", get_stylesheet_uri());

Gibt den Pfad des aktiven Themes zurück, auch wenn dies ein Child-Theme ist. Vorrausgesetzt, das Child Stylesheet ist mit WordPress Bordmitteln im Theme eingebunden und aktiviert.

Returns the path of the actual active theme, even if this is a child theme. This only works if the child themes stylesheet is included with WordPress methods.

Return value comes with trailing Slash!!

URLs in WordPress

site_url();
bloginfo("wpurl"); //check this!

Returns Root Domain URL without trailing slash.


home_url();

Returns URL of the WordPress Home target without trailing slash. Usually is the same as the root domain, but needn’t be!


admin_url();

Returns the URL leading to the WP Admin directory including trailing slash. URLs in WordPress weiterlesen

WordPress

Das Internet ist voll von freien Webredaktionssystemen, die auf PHP und MySQL basieren. Auch deren Verwendung ist allgegenwärtig. Unter diesen Redaktionssystemen nimmt WordPress jedoch eine Ausnahmestellung ein. Mit einer expotentiell wachsenden atemberaubenden Zahl von inzwischen über 140 Millionen aktiven Installationen betreibt das WordPress Redaktionssystem inzwischen etwa ein Drittel des gesamten Web.

Wenn auch die zugrundeliegende Softwarearchitektur von WordPress mitunter, wie viele seiner Pedants, wie z.B. Typo3, historisch gewachsen ist, so ist die sehr einfache Handhabung und Flexibilität von WordPress im Vergleich zu anderen Systemen nicht von der Hand zu weisen. Ganz sicher hat das WordPress Projekt seinen Erfolg diesem Pragmatismus zu verdanken.