Working with Custompress

I'm very, very new to CustomPress and am having problems configuring it. I think I understand the main idea, but am having problems knowing what to add to where to get the custom fields to show within posts. The screenshots here are quite small when it comes to adding the code.

I'm also trying to integrate the plugin with some kind of front page publishing plugin so members can also add posts using custom fields, but that seems to be impossible.

  • Nithin

    Hi angeljs,

    Hope you are doing good today. :slight_smile:

    CustomPress are custom post type plugin, by default custom fields are not displayed in your CustomPress post. You can display custom fields, either by adding shortcodes in your default page editor, or you'll have to edit the page templates by embedding codes.

    You can use this shortcode to display the entire custom fields related to a particular listing:
    [custom_fields_block]

    If it's in a php file, the the embed code will be:

    <?php echo do_shortcode('[custom_fields_block]'); ?>

    To embed specific custom fields, you can find that under CustomPress > Content Types > Custom Fields > Embed Code for each custom fields.

    Please do note that if you are embedding php code in your page templates, it be inside the loop.

    I'm also trying to integrate the plugin with some kind of front page publishing plugin so members can also add posts using custom fields, but that seems to be impossible.
    I'm not sure to which plugin you are trying to integrate, have you tried the custom fields input shortcodes? It should allow you to add input fields, you can find all the shortcodes, and how to implement these under CustomPress > Content Types > Shortcodes.

    Please let us know if you have any issue in following these, have a nice day. :slight_smile:

    Kind Regards,
    Nithin

  • Rupok

    Hi angeljs, I hope you are having a wonderful day.

    To add your custom content after the post, you can create a MU Plugin. For creating a MU Plugin, create a folder named "mu-plugins" inside your "wp-content" folder. Then inside that "mu-plugins" folder, create a file with any name and with a .php extension. Now paste the code inside that file and save.

    <?php
    function custom_content_after_post( $content ) {
        $content = $content."Your Content Goes Here";
        return $content;
    }
    add_filter( 'the_content', 'custom_content_after_post' );

    For getting more idea on mu plugins, you can go through this article: http://premium.wpmudev.org/manuals/wpmu-manual-2/using-mu-plugins/

    This will add your custom content just after the main post element and before the comment section. If you want to show your custom content before the main post element, you can just modify the following line:
    $content = $content."Your Content Goes Here";
    with this one:
    $content = "Your Content Goes Here".$content;

    Please let us know if you have any confusion or if you are stuck at any point. We will be glad to help further.

    Have a nice day. Cheers!
    Rupok

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.