WordPress.org

Ready to get started?Download WordPress

Forums

Any way to set custom field value when posting by email? (5 posts)

  1. boogi
    Member
    Posted 11 months ago #

    I use a custom field hack to make a given post's permalink go to an external link (sort of like Daring Fireball's linked list). In order to do this, I have to set a custom field value for each post with the external link. The problem is that I'm trying to post via email (using Jetpack) and I don't see a shortcode to set a custom field value. If Jetpack doesn't work, is there any other way to do this? Thanks in advance!

  2. Pioneer Valley Web Design
    Member
    Posted 11 months ago #

    You would need to provide a great deal more information to get anyone to be able to assist with this.

    For question on Jetpack, visit:

    http://jetpack.me/support/

  3. boogi
    Member
    Posted 11 months ago #

    Thanks for the response and sorry for my slow reply -- I just noticed it now. What information do you need? I basically setup my blog to allow for any given post's permalink to link to an external link (similar to Daring Fireball's linked list) when the post is intended to be a link to something cool I found rather than my own original work. You can take a look at what I mean by visiting my site guboogi.com (the post titles with the arrow at the end are links that go to external sites).

    I set this up by following these steps: http://www.wpbeginner.com/wp-tutorials/how-to-link-to-external-links-from-the-post-title-in-wordpress/

    Basically, I set a custom field value in the post with the external link URL, and the permalink will then link to that instead of the "single" view of my post.

    I would love to post using Jetpack's "Post by Email" feature, but there's no way for me to set a custom value in the email, so that would require me to login to my WordPress dashboard after each post and set the custom value myself. I was wondering if there was any way to add a shortcode tag to the Post by Email feature so that I could set custom field values directly from the email.

  4. boogi
    Member
    Posted 10 months ago #

    Friendly bump just in case anyone has any ideas? Thanks in advance!

  5. elevensuns
    Member
    Posted 1 week ago #

    Check this plugin. Its called CF Setter and it lets you define custom fields from the body of an email.

    http://hypertext.net/projects/cfsetter/

    Followed the instructions on this page.

    Include the following short code on the body of the email:

    [cf]value_to_insert_in custom_field[/cf]

    It inserts the value in the custom field in worpress when posting by email.

    To display the field I used the following short code on the template file:

    <!-- Display Custom Field -->
    <?php
    	$myname = get_post_meta($post->ID, ‘custom_field_name, true);
    	if ( $myname ) {
    ?>
    
    <h3 ><?php the_meta(custom_field_name) ?></h3>
    
    <?php }
    else {
     }
    ?>
    <!-- End Display Custom Field -->

    It evaluates if the field is empty and then shows results.

    Substitute custom_field_name for the name of your Custom Field Name

    It works like a charm! Hope it works for you guys!

    http://codex.wordpress.org/Custom_Fields
    http://codex.wordpress.org/Function_Reference/get_post_meta

Reply

You must log in to post.

About this Topic