Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #27916

    Kalista Z
    Participant

    Hello,

    Where can I find this message..

    1) OOPS!
    You blew up the Internet.
    The page you are looking for is no longer here, or never existed in the first place (bummer). You can try searching for what you are looking for using the form below. If that still doesn’t provide the results you are looking for, you can always start over from the home page.

    2) “Read More” <— in posts

    I need to change these to French.

    Thank you!

    #28225

    Alexander
    Keymaster

    Hi Kalista,

    These strings are localized, so you can translate them on the fly with this plugin: http://wordpress.org/plugins/quick-localization/ This is what I would recommend trying first

    Or you can create a full French translation for X if you like. Our text domain is __x__ You can find more info about creating translations here: http://codex.wordpress.org/Translating_WordPress

    Another option would be to create a custom 404 page. You can find the code for it here: x/framework/views/global/_content-404.php

    If you’re going to be making code changes, I’d advise that you setup a child theme. You can find our collection here: http://theme.co/x/member/child-themes/ Or you can create your own with this information: http://codex.wordpress.org/Child_Themes A child theme allows you to make code changes that won’t be overwritten when an X update is released.

    The “Read More” text exists in a pluggable function. This means you can add a function to functions.php in your child theme, and override the original code.

    You can copy and paste this to the child functions.php, and change the wording as needed.

    function x_content_string( $more ) {
        
        $stack = x_get_stack();
    
        if ( $stack == 'integrity' ) {
          return '<a href="' . get_permalink() . '" class="more-link">' . __( 'Read More', '__x__' ) . '</a>';
        } else if ( $stack == 'renew' ) {
          return '<a href="' . get_permalink() . '" class="more-link">' . __( 'Read More', '__x__' ) . '</a>';
        } else if ( $stack == 'icon' ) {
          return '<a href="' . get_permalink() . '" class="more-link">' . __( 'Read More', '__x__' ) . '</a>';
        }
    
      }
      add_filter( 'the_content_more_link', 'x_content_string' );
    #28471

    Kalista Z
    Participant

    Very good answer! Thank you so much!!!

    #28473

    Kory
    Keymaster

    No problem, Kalista. 🙂

    #42722

    Brennan
    Participant

    Hi,

    The information above was very helpful in editing the body of the 404 error message, but I’m wondering if there is a way to edit the header and subheader for the page as well? The “Oops! You blew up the internet.” is freaking some of our clients out a bit, and it would be great to change the messaging to something a bit less “shocking” to them.

    Thank you!

    #43043

    Christian
    Moderator

    Hey Brennan,

    You can modify _landmark-header.php located in framework\views\(YOUR STACK). Find the lines

    <h1 class="h-landmark"><span><?php _e( 'Oops!', '__x__' ); ?></span></h1>
    <p class="p-landmark-sub"><span><?php _e( "You blew up the Internet. ", '__x__' ); ?></span></p>
    

    Change the text inside the quotes only. Deleting the quotes would cause an error.

    Hope that helps. 🙂

    #43646

    Brennan
    Participant

    Thank you! That worked great.

    #43690

    Christian
    Moderator

    You’re welcome Brennan.

    #123789

    Shannon M
    Participant

    I tried to edit my 404 page, and now I am only seeing the “Oops! You blew up the Internet” header. (The body text and search box are missing.)

    I am using a child theme, and I placed the page in the following spot:

    /wp-content/x-child-integrity-light/framework/views/global

    Do you know what I am doing wrong? Thank you.

    #124089

    Christopher
    Moderator

    Hi there,

    Please put _landmark-header.php file in wp-content -> x-child-integrity-light -> framework -> views -> integrity to makes it work not in ‘global’ folder.

    Thank you.