• Hello there…

    Maybe some one here can help me ?

    I have this site https://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 https://www.askgraphics.com

    Greetings Jesper from Denmark ??

Viewing 6 replies - 1 through 6 (of 6 total)
  • 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;
    ?>
    Thread Starter smukkehansen

    (@smukkehansen)

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

    Thread Starter smukkehansen

    (@smukkehansen)

    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 ?
    https://www.rigmorlarsenseftf.dk/

    Greetings Jesper

    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.

    Thread Starter smukkehansen

    (@smukkehansen)

    Michael or not it’s works perfect, thanks to you ??

    Glad I could help!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘need some help to delete the word Protected: in top menu.’ is closed to new replies.