WordPress.org

Ready to get started?Download WordPress

Forums

MailPress
Use of the_excerpt(); (18 posts)

  1. H R
    Member
    Posted 4 years ago #

    Hi,

    First of all, congratulations for this magnificent plug-in!

    I', trying to use the the_excerpt function instead of the the_content, bit the emails don't show nothing... is there any solution for it?

    Thanks

  2. Herbert
    Member
    Posted 3 years ago #

    You can use the_excerpt() by changing wp-content/plugins/mailpress/mp-content/themes/your-theme-name/_loop.php

    change:

    <?php $this->the_content( __( '(more...)' ) ); ?>

    to:
    <?php the_excerpt(); ?>

    Hope this helps someone...

  3. Abcmoteur
    Member
    Posted 3 years ago #

    Hi, herbie4. I would use excerpt with Mailpress but I didn't fin "<?php $this->the_content( __( '(more...)' ) ); ?>" in my _loop

    My _loop : http://www.megaupload.com/?d=PYMRQVS9

    (/www/wp-content/plugins/mailpress/mp-content/themes/twentyten)

    Thanks.

  4. Herbert
    Member
    Posted 3 years ago #

    @Abcmoteur-> it is on line 36 of your file:
    <?php $this->the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyten' ) ); ?>
    Just change it as stated in my earlier post. Good luck.

  5. Abcmoteur
    Member
    Posted 3 years ago #

    Many thanks!

    I still have several queries : http://img4.hostingpics.net/pics/669738capturemailpress.jpg

    Thanks again herbie4. :)

  6. Herbert
    Member
    Posted 3 years ago #

    @Abcmoteur-> the delete part is not clear lookt like it comes from the mailpress header file, maybe some css in there

    for the image something like this should work:

    <center>
    <?php if(has_post_thumbnail) $this->the_post_thumbnail('','large'); ?>
    </center>

    put it on line 17 in _loop.php

    I hope this helps you...

  7. Abcmoteur
    Member
    Posted 3 years ago #

    When I add your code, mails aren't send. :s

  8. Herbert
    Member
    Posted 3 years ago #

    You can try to switch on your wp error reporting to get the details on the error.
    You can try just using:

    <center>
    <?php $this->the_post_thumbnail('','large'); ?>
    </center>

    And make sure the post has a thumbnail!
    I haven't tested this but wp template tags should work in mp loop.

  9. Abcmoteur
    Member
    Posted 3 years ago #

    I tried for this : http://abcmoteur.fr/actualites/classement-10-voitures-plus-cheres-du-monde-2011-forbes/ (doesn't work)

    I haven't logs in Mailpress settings.

  10. Herbert
    Member
    Posted 3 years ago #

    You can try to use this:

    <?php
    $args = array(
        'width' => null,
        'height' => null,
        'css' => '',
        'parent_id' => '',
        'post_id' => '',
        'filename' => '',
        'return_html' => true
    );
    $this->wp_get_post_image($args); ?>

    Maybe you have to use the $this-> or maybe not. Not sure.
    I didn't test it. Hope it works for you...

  11. Abcmoteur
    Member
    Posted 3 years ago #

    Unfortunately, it doesn't work.

    I try this:

    br />
    	<?php $this->the_image(array('unit' => 'px', 'max_width' => 700, 'force_max_width' => 0)); ?>
    <br />
    <?php the_excerpt(); ?>

    But it is a small image and how can I center image.

  12. Herbert
    Member
    Posted 3 years ago #

    Maybe you should set force_max_width' => 1?

    Or you could try using this:
    http://codex.wordpress.org/Function_Reference/wp_get_attachment_image

    Center the image with html or css.

  13. Abcmoteur
    Member
    Posted 3 years ago #

    Anything change with "1".

    I put :

    <br />
    	<div style="text-align: center;"><?php $this->the_image(array('unit' => 'px', 'max_width' => 700, 'force_max_width' => 1)); ?></div>

    Its work! :) BUT, how can I have a large image ?

  14. Herbert
    Member
    Posted 3 years ago #

    Are you sure the original image is large already?
    Otherwise maybe you can look up how to set the_image() parameters.

  15. Abcmoteur
    Member
    Posted 3 years ago #

    Yes, its a large image (800px).

    I try to change something but its not good. I don't know to do.

  16. Herbert
    Member
    Posted 3 years ago #

    I guess the_image() is not a wordpress function so I could not find any documentation on it. Maybe this is a function from a plugin you installed?
    If you use the wordpress function to get the image you can find the documentation here: http://codex.wordpress.org/Function_Reference/wp_get_attachment_image

    Hope it works out...

  17. Abcmoteur
    Member
    Posted 3 years ago #

    Hum... I find MP_Mail_api.class.php in /www/wp-content/plugins/mailpress/mp-includes/class

    But I don't understand.:s
    Look at line 66 or 104...

  18. Agnes
    Member
    Posted 3 years ago #

    Hi
    Any sucees in inserting the thumbnail in the loop.php?
    Any idea?
    Thanks
    Agnes

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags