Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #81959
    SEVERO
    Participant

    Hi there

    Have looked through the forum and have tried a couple of things but haven’t found a solution.

    Where do I find this file or what do I need to add to change this?

    Cheers

    #81963
    Paula S
    Member

    Hi Severo,

    This is possible by adding a snippet of code onto your child theme’s function.php file. What text would you like it to say? More information can be found here : http://codex.wordpress.org/Customizing_the_Read_More

    Let us know if you need further help and we’ll be happy to assist you (as long as it’s within support bounds) Have a nice weekend!

    #81967
    SEVERO
    Participant

    Hi there

    Thanks for the quick reply. I did see this link but couldn’t get it to work.

    This is function.php as it stands:

    <?php

    function x_excerpt_string( $more ) {

    $stack = x_get_stack();

    if ( $stack == ‘integrity’ ) {
    return ‘ … <div>Read More</div>’;
    } else if ( $stack == ‘renew’ ) {
    return ‘ … Read More‘;
    } else if ( $stack == ‘icon’ ) {
    return ‘ …’;
    }

    }
    add_filter( ‘excerpt_more’, ‘x_excerpt_string’ );

    And would like to add this:

    <?php the_content(‘ Read on…’); ?>

    Not too sure where to place it though 🙁

    #81975
    Christian
    Moderator

    Hey Severo,

    Please try changing the Read More texts in content.php located at wp-content\themes\x\framework\functions\global\.

    Thanks.

    #82033
    SEVERO
    Participant

    Hi there

    Yes, tried that with no success 🙁

    #82039
    Christopher
    Moderator

    Hi Severo,
    Lets do another thing.
    Please go to x/framework/lang/default.po

    Open up the po file with poedit software. Search for ‘Read More’ and replace it with desired phrase.

    You can find out more about this HERE.

    Thank you.

    #82050
    SEVERO
    Participant

    Hi there

    Not having a lot of luck. Quick question, why am I getting a ‘Read More’ button here and not on my home page?

    http://www.mad-daily.com/?s=CRM

    Cheers

    #82051
    Christopher
    Moderator

    Hi Severo,
    Would you please tell us what was the problem?
    Did you follow the instructions and updated your po file using poedit and still you can not change the read more text?
    Thanks

    #82054
    SEVERO
    Participant

    Poedit Error
    warning: header field ‘Language’ missing in header

    1 issue with the translation found.
    Entries with errors were marked in red in the list. Details of the error will be shown when you select such an entry.
    The file was saved safely and compiled into the MO format, but it will probably not work correctly.

    #82057
    Christopher
    Moderator

    Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:

    – Link to your site
    – WordPress Admin username / password
    – FTP credentials

    Don’t forget to select Set as private reply. This ensures your information is only visible to our staff.

    Thank you.

    #82064
    SEVERO
    Participant
    This reply has been marked as private.
    #82091
    Cousett
    Member

    Changed up some of the php in your function file and I think we got it working.

    Changed the PHP to:

    <?php
    
    function x_child_theme_setup() {
    	// override parent theme's 'more' text for excerpts
    	remove_filter( 'excerpt_more', 'x_excerpt_string' ); 
    	remove_filter( 'the_content_more_link', 'x_content_string' );
    }
    add_action( 'after_setup_theme', 'x_child_theme_setup' );
    
    function x_child_excerpt_string( $more ) {
      $stack = x_get_stack();
      if ( $stack == 'integrity' ) {
        return '<div><a href="' . get_permalink() . '" class="x-btn">Read On ...</a></div>';
      } else if ( $stack == 'renew' ) {
        return ' ... <a href="' . get_permalink() . '" class="x-btn">Read More</a>';
      } else if ( $stack == 'icon' ) {
        return ' ...';
      }
    
    }
    add_filter( 'the_content_more_link', 'x_child_excerpt_string' );
    
    ?>

    Hope this helps.

    #82114
    SEVERO
    Participant

    WOW!!! Thank you very much 🙂

    One last thing which I cam’t seem to figure out. How would I drop the button down about 20px?

    Cheers

    #82115
    Zeshan
    Member

    Hi Servo,

    Thank you for writing in!

    Please add the following CSS:

    .x-btn {
       margin-top: 20px;
    }
    

    Cheers!

    #82121
    SEVERO
    Participant

    LEGEND!!

    Thank you very much:)

  • <script> jQuery(function($){ $("#no-reply-81959 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>