• Resolved 1000StartupHacks

    (@1000startuphacks)


    I don’t know how to code. I am trying to customize the 404 page on my website. The page is at http://www.1000startuphacks.com/404. Please scroll till bottom. I tried these two code snippets but they both didn’t work.

    <a href="https://1000startuphacks.com/subscribe">here</a>

    <a href="<?php echo "https://1000startuphacks.com/subscribe"; ?>">here</a>

    Any help will be much appreciated.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Are you using the “Text” editor?

    Thread Starter 1000StartupHacks

    (@1000startuphacks)

    I am using Notepad++ via ftp.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Which theme are you using?

    Thread Starter 1000StartupHacks

    (@1000startuphacks)

    It is not a free WordPress.org theme. I am adding the complete 404.php code if it helps –

    <?php get_header(); ?>
        <div class="container">
    		<?php
    			echo '<img src="https://www.1000startuphacks.com/wp-content/uploads/2016/12/404-hack-1000startuphacks-dot-com-1170x566.png" class="aligncenter" width="658" height="318" title="404 Hack" alt="404 Hack" /><br/><br/>';
    		?>
    		<div id="main">
                <div class="error-page">
    				<h1>404 Hack</h1>
    				<p><?php esc_html_e( 'It seems we couldn&rsquo;t find what you&rsquo;re looking for. Try using the search bar below.', 'thsh7' ); ?></p>
    				<?php get_search_form(); ?><br/><br/>
    				<p><?php esc_html_e( 'If you think you&rsquo;re seeing this page in error, kindly send us an email suppport@1000startuphacks.com with the above URL.', 'thsh7' ); ?></p>
    				<p><?php esc_html_e( 'Maybe you&rsquo;re visiting  a hack that has not been published yet?', 'thsh7' ); ?></p>
    				<p><?php esc_html_e( 'For receiving new hacks by email, subscribe <a href="https://1000startuphacks.com/subscribe">here</a>.', 'thsh7' ); ?></p>
    			</div>
            </div>
        </div>
    <?php get_footer(); ?>
    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    You’re adding it in this function:

    
    esc_html_e
    

    https://developer.wordpress.org/reference/functions/esc_html_e/

    It means it will convert all HTML to a string.

    Thread Starter 1000StartupHacks

    (@1000startuphacks)

    So what do I do? I don’t understand code. I hope it is possible to do.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Sorry I thought you were using that function intentionally. If you have no reason to use it then just remove it so that this:

    
    <p><?php esc_html_e( 'For receiving new hacks by email, subscribe <a href="https://1000startuphacks.com/subscribe">here</a>.', 'thsh7' ); ?></p>
    

    Turns into this:

    
    <p>For receiving new hacks by email, subscribe <a href="https://1000startuphacks.com/subscribe">here</a>.</p>
    
    Thread Starter 1000StartupHacks

    (@1000startuphacks)

    Sorry I thought you were using that function intentionally.

    Oh, no. I was adding those lines and I simply copy pasted the previous line of code and it had that function. Lol.

    It worked. Thanks for all your help @anevins. Much appreciated. 🙂

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Href Link Added To 404.php Not Working’ is closed to new replies.