WordPress.org

Ready to get started?Download WordPress

Forums

Default Selection of 'post title' (and not status update) (17 posts)

  1. rkord
    Member
    Posted 4 years ago #

    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.

  2. rkord
    Member
    Posted 4 years ago #

    Any clue? Can somebody help?

  3. hundsim
    Member
    Posted 4 years ago #

    I'm very curious to find out about this aswell... :)

  4. rkord
    Member
    Posted 4 years ago #

    Can somebody help?
    zzzz ;(

  5. Tony Scott
    Member
    Posted 4 years ago #

    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?

  6. rkord
    Member
    Posted 4 years ago #

    Yep! That's precisely my qn.

  7. rkord
    Member
    Posted 4 years ago #

    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

  8. seeroy
    Member
    Posted 4 years ago #

    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.

  9. Nobble
    Member
    Posted 4 years ago #

    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'; ?>">

  10. hundsim
    Member
    Posted 4 years ago #

    @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.

  11. kamasheto
    Member
    Posted 4 years ago #

    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.

  12. Nobble
    Member
    Posted 4 years ago #

    shoot, I knew there was an easier way

  13. zuzuleinen
    Member
    Posted 3 years ago #

    @seeroy and @Nobble THANKS a lot!

  14. zuzuleinen
    Member
    Posted 3 years ago #

    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?

  15. scottsemple
    Member
    Posted 3 years ago #

    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
    ___________________________________
    http://www.massivemouse.com

  16. balla4eva33
    Member
    Posted 3 years ago #

    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

  17. balla4eva33
    Member
    Posted 3 years ago #

    Interesting, maybe it was a glich, because now all my titles are showing up as expected and I didn't make any changes. Oh well, I guess disregard my last comment!

    -Matt

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags