Forums

need some help to delete the word Protected: in top menu. (7 posts)

  1. SmukkeHansen
    Member
    Posted 4 years ago #

    Hello there...

    Maybe some one here can help me ?

    I have this site http://www.elstedvej.dk
    When I put password on Beboerne the menu changes the name to Beskyttet:Beboerne (on Danish) Beskyttet is Protected.
    Do anyone know how to move the word Beskyttet/Protected ?
    I have tried functions.php and header.php but whit out luck!
    The themes I use is RoyalYellow from http://www.askgraphics.com

    Greetings Jesper from Denmark ;-)

  2. MichaelH
    Volunteer
    Posted 4 years ago #

    You don't WANT to modify core files if you can help it.

    Instead, in the header.php for that theme, starting with line 57,

    replace this block of code

    if( $post->post_parent == 0 )
    {?>
    
    								<td>
    					<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
    					</td>
    
    <?php } endwhile;
    ?>

    with this block of code:

    if( $post->post_parent == 0 )
    {?>
    <? if ($post->ID == 56 )
    {?>
    					<td>
    					<a href="<?php the_permalink(); ?>">Beboerne</a>
    					</td>
    <?php } else { ?>
    					<td>
    					<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
    					</td>
    	<?php } ?>
    <?php } endwhile;
    ?>
  3. SmukkeHansen
    Member
    Posted 4 years ago #

    Thanks ;-)))
    You just save my day ;-)

  4. SmukkeHansen
    Member
    Posted 3 years ago #

    Hello Michael

    Now I make another site whit the same theme and also whit a password i the Header, but i can't use your tip here.
    Can you se what I can do to move the word Beskyttet ?
    http://www.rigmorlarsenseftf.dk/

    Greetings Jesper

  5. MoTStudio
    Member
    Posted 3 years ago #

    I'm not Michael, but I think I can help!

    You CAN use the same code as before AND follow Michael's same directions, BUT you need to change the number 56 in:

    ($post->ID == 56 )

    to the number 6!

    The reason for this change is because the page number for the password protection changed in your different layouts.

    So the new code to insert will be:

    if( $post->post_parent == 0 )
    {?>
    <? if ($post->ID == 6 )
    {?>
    					<td>
    					<a href="<?php the_permalink(); ?>">Beboerne</a>
    					</td>
    <?php } else { ?>
    					<td>
    					<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
    					</td>
    	<?php } ?>
    <?php } endwhile;
    ?>

    See if that doesn't fix it.

  6. SmukkeHansen
    Member
    Posted 3 years ago #

    Michael or not it's works perfect, thanks to you ;-)

  7. MoTStudio
    Member
    Posted 3 years ago #

    Glad I could help!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.