Jayj.dk

Menu

Skip to content
  • Blog
  • WordPress
  • Themes
  • Plugins
You are here: Home / WordPress / Skift logo på WordPress login side
By Jesper Johansen

Skift logo på WordPress login side

Skift logo på WordPress login side
Please note: This is an old post. The information is probably not accurate and up-to-date anymore.

Som standard har WordPress sit eget logo på din blogs login side (dinside.dk/wp-login.php). Det er dog ikke altid du ønsker at have WordPress’ logo der – nej, du vil egentligt gerne have dit eget!

Heldigvis kan du nemt ændre det til dit eget logo. Du kan også ændre billede-linket, som linker til WordPress.org som standard.

Det eneste du skal gøre, at er indsætte følgende ting i dit temas functions.php

Skift logo på login siden

Brug følgende kode for at skifte logoet. Husk at ændre linket og højden, så de passer til dit logo.

function jayj_login_logo() {
   echo '<style type="text/css">
	h1 a {
	   background: url( '. get_bloginfo( 'template_directory' ) . '/images/logo.png) 50% 50% no-repeat !important; 
           height: 178px; /* Højden på logoet */
	}
   </style>';
}

add_action( 'login_head', 'jayj_login_logo' );

Du kan naturligvis tilføje mere CSS for at ændre loginskærmen endnu mere.

Skift URL’en

Som sagt, så linker logoet som standard til WordPress.org. Du kan bruge følgende kode for at skifte det til forsiden af din blog:

function jayj_change_wp_login_url() {
        echo home_url();
}

add_filter( 'login_headerurl', 'jayj_change_wp_login_url' );

Skift titlen

Når man kører over logoet, siger den “Køres af WordPress”. Hvis du vil ændre det til din blogs navn, så brug:

function jayj_change_wp_login_title() {
      bloginfo( 'name' );
}

add_filter( 'login_headertitle', 'jayj_change_wp_login_title' );

Eller… brug et plugin

Hvis du ikke ønsker at rode med dit temas functions.php, er der naturligvis et hav af plugins du kan bruge. Jeg anbefaler følgende plugin af WordPress core-udvikleren Mark Jaquith.

Plugin: Login Logo

Installer plugin’et, smid et logo med navnet login-logo.png ind i din wp-content mappe, og vupti – så har du skiftet logo. Se plugin siden for mere information.

Posted in WordPress on April 19, 2011

Related Posts

  • Youtube Profile Field 3.1
  • Grid Columns Media Button WordPress plugin
  • Multiple Select Lists in the Theme Customizer
  • Youtube Profile Field updated to version 2.2

Post navigation

← Previous Post
Next Post →

Popular Posts

  • A free HTML5 and CSS3 theme
  • HTML5 Theme Updated to Version 2.0
  • Create a custom “Download” post type using WordPress
  • Cakifo, a Free WordPress theme
  • Japibas – Free Premium WordPress Theme
  • Multiple Select Lists in the Theme Customizer

Categories

  • WordPress
  • Updates
  • News
  • Web
  • Themes
  • Uncategorized

You can also find me on:

Powered by WordPress and Hybrid Core.

  • Twitter
  • Github
  • WordPress.org
  • LinkedIn