• miku88

    (@miku88)


    On the bottom of this page https://teresitamoralesifbbpro.com/ it says “Latest From Blog”. I’d like to change that wording so I went into bottom.php and changed it. It messed up the whole page. The php code I am trying to change looks like this: (I put in bold the part I want to change.)

    <div class=’bottombox’>
    <h3> <?php _e(‘Latest from blog‘); ?> </h3>
    <ul class=”recposts”>
    <?php $loop = new WP_Query( array( ‘post_type’ => ‘post’,’showposts’ => 5 ) ); ?>
    <?php while ( $loop->have_posts() ) : $loop->the_post(); ?>

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi! Teresita Morales looks like my perfect personal trainer lol, well, so you want to change that title “Latest from Blog”, why are you messing up the page after the change? did you change only the text string part:

    <h3> <?php _e('Latest from blog'); ?> </h3>
    just edit to
    <h3> <?php _e('Your custom text'); ?> </h3>

    If not working try to change that text in the .mo .po file in your dierctory template, you can use Poedit (google it) to do that, open the file an change the text to match your text then save it.

    The _e part means that is a domaintext so you can use it to change the language of your theme with out changing the php code, just editing the .po .mo files in this case you are going to change the text for customizing purpose not for language translation.

    Thread Starter miku88

    (@miku88)

    Thanks for the info! I only changed the text- Latest from blog. I tried several times. Maybe I’ll try it again. I don’t really want to use Poedit. It seems like it should be so easy.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Are you using a Child Theme?

    Thread Starter miku88

    (@miku88)

    Yay I figured it out. (I think) It’s because I was trying to write “Let’s Chat” and the word “Let’s” has an apostrophe and it was messing up the PHP or something like that? It works without the apostrophe. So how should I write it so I can use an apostrophe? Thanks!

    Ok, now i can see your mistake, yes, is a comun mistake if you dont know the sintax of php, just add a backslash directly before the apostrophe.

    <h3> <?php _e('Let\'s Chat'); ?> </h3>

    Now the PHP interpreter treats the character literally and not going to interpret it.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How do I change html in wordpress?’ is closed to new replies.