Support » Plugin: Frontier Post » Pull the Default Post “Content”

  • ND

    (@nigeltduke2)


    Hello. Is there a a way for me to make Frontier pull my theme’s default post Title and body(content) whenever I start a new post? For example, my site is currently set to have some default text in the body and title of the post whenever I click the “New Post” in WP-Admin Dashboard. Whenever I click that, the new post starts with prefilled text in body and title.

    I noticed with Frontier, it does not pick that up so I am guessing Frontier is using it’s own template.

    Just wondering how I either

    1. set frontier to have default text with the template it currently uses

    or

    2. make it pull my theme’s default post title and body contents…

    Either of these would work for me.

    Thanks,

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author finnj

    (@finnj)

    Hi,

    Not at the moment, but it is a fairly easy change that I will apply to next release, as it could make sense to others.

    It will mean that you will have to call a filter from your functions.php, to add template content.

    I will let you know here when I release it for test, expect in a week or so

    ND

    (@nigeltduke2)

    That sounds great finnj! Thank you very much for your support

    Plugin Author finnj

    (@finnj)

    Hi,

    Now available to test in version 5.1.6 : https://downloads.wordpress.org/plugin/frontier-post.5.1.6.zip

    Please let me know it works for you, and I will release it as the stable version

    I have added an example of how to use in the extension demo plugin: https://wpfrontier.com/frontier-post-extension-plugin/

    You can insert the following in your functions.php:

    
    function fp_my_template_content($tmp_post , $fpost_sc_parms)
            {
            // $fpost_sc_parms holds short code parameters
         
            // set post content & title
            if ($tmp_post->post_content < " ")
                $tmp_post->post_content = 'Replace this with your template post content and you are good to go';
            
            if ($tmp_post->post_title < " ")
                $tmp_post->post_title = 'Replace this with your template post title';
            
            
            return $tmp_post;
            } 
            
            add_filter('frontier_post_prepare_post', 'fp_my_template_content',10,2);
    
    • This reply was modified 2 months, 2 weeks ago by finnj.
Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.