• How do I make ‘Post Title’ as the default section (on the homepage for registered users).
    Currently it’s ‘status update’ – and really want to move this to the ‘post title’.

    Please help asap.

Viewing 15 replies - 1 through 15 (of 16 total)
  • Thread Starter rkord

    (@rkord)

    Any clue? Can somebody help?

    Anonymous User 632843

    (@anonymized-632843)

    I’m very curious to find out about this aswell… ??

    Thread Starter rkord

    (@rkord)

    Can somebody help?
    zzzz ;(

    Do you not mean make ‘Blog Post’ the default.

    I’ve played around with the code (via a child theme) and tried to achieve this – ie Blog Post with the Post title box as well, with without success.

    Anyone?

    Thread Starter rkord

    (@rkord)

    Yep! That’s precisely my qn.

    Thread Starter rkord

    (@rkord)

    Looks like this doesn’t have a straightforward solution.
    To repost the qn,
    I am looking to have ‘Blog Post’ as the default tab (currently the default tab is ‘Status update’).

    Help appreciated

    In this section of code from post-form.php its the selected section that makes something the default posting style:

    <li><a id="status"<?php if ( $_GET['p'] == 'status' || !isset($_GET['p']) ) : ?> class="selected"<?php endif; ?> href="<?php echo site_url( '?p=status' ) ?>" title="<?php _e( 'Status Update', 'p2' ) ?>"><?php _e( 'Status Update', 'p2' ) ?></a></li>

    THIS SECTION sets it: || !isset($_GET['p'])

    Just cut it and put it where you want the default to be. All of the tabs are right after that section of code.

    In addition to seeroy’s comment, if you are making blog post the default entry and you want the post title field to be visible on pageload, find the postbox-type-post div inside post-form.php and change

    <div id="postbox-type-post" class="post-input <?php if ( 'post' == p2_get_posting_type() ) echo ' selected'; ?>">

    into

    <div id="postbox-type-post" class="post-input <?php if ( 'post' == p2_get_posting_type() || !isset($_GET['p']) ) echo ' selected'; ?>">

    Anonymous User 632843

    (@anonymized-632843)

    @seeroy and @nobble THANKS a lot! Works perfectly.

    PS. One day I hope I’l be so good at php that I can write a plugin things like this. I assume that being the ultimate solution so that the changes don’t disappear at future theme updates.

    You could have just added this line to your js.php file >> p2_toggle_threads >> .ready():

    jQuery('#post-types a#post').click();

    Much cleaner this way.

    shoot, I knew there was an easier way

    @seeroy and @nobble THANKS a lot!

    One question: I’ve made the Post Title the default section using @seeroy and @nobble advices. But there is a little problem: When i first enter the site I don’t see the text “Post Title” in the title bar. I can see the text only after I’ve clicked the title bar and then clicked the post bar. Can anyone help me?

    UPDATE: With the latest version of P2, this has changed.

    The function that controls the default post type is called p2_get_posting_type and it’s stored in the template-tags.php file. The default setup is:

    function p2_get_posting_type() {
    	$p = isset( $_GET['p'] ) ? $_GET['p'] : 'status';
    	return $p;
    }

    If you’d like to change the default post type — from status to post, for example — just change “status” to “post”. The other options are “quote” (for the Citation form) and “link” for the Hyperlink form.

    Cheers,
    Scott
    ___________________________________
    https://www.massivemouse.com

    balla4eva33

    (@balla4eva33)

    Scott,

    You’re correct on the new version, but the only issue here is that it doesn’t post the title then. It still posts it as if it were a status update, even though you had the option to enter the title, the title doesn’t show up on the blog. Are you seeing the same results? Did you find a fix for that?

    Thanks,
    Matt

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Default Selection of ‘post title’ (and not status update)’ is closed to new replies.