WordPress.org

Ready to get started?Download WordPress

Forums

getting rid of posting (4 posts)

  1. Hroch
    Member
    Posted 1 year ago #

    Hi there,

    I am a VERY beginner in creating websites (having about half an hour experience by now). Please could you give me a hint (very detailed one please! :-) ) how to get rid of all posting abilities in twenty eleven theme? I want to create a website presenting a company, not a blog. Only hint I found was this: http://wordpress.org/support/topic/remove-posting-ability , unfortunately I don’t know where/how to edit core files... Getting rid of comments was no problem.

    Thanks for replay

  2. ubaidullahbutt
    Member
    Posted 1 year ago #

    You can disable posting ability in your theme, but I will not prefer to remove it from admin side, because every time wordpress will be update, the portion will come again.

    For example, in your twenty eleven theme, if you want to disable posting then remove the following code in index.php, category.php etc.

    <?php /* Start the Loop */ ?>
    				<?php while ( have_posts() ) : the_post(); ?>
    
    					<?php get_template_part( 'content', get_post_format() ); ?>
    
    				<?php endwhile; ?>

    Note: Important line is get_template_part( 'content', get_post_format() );, you can comment the line if you don't want posting in your website.

  3. Yeah. Don't do that, really don't.

    ubaidullahbutt the reason we tell people not to edit theme files directly is (as you've said) when an update to that theme comes out then they lose the modifications to those files. That tends to make people upset when that happens. ;)

    If you do want to modify template files (why would you want to get rid of posting capabilities...? Never mind for now) then create a child theme of that theme and make modifications to only the templates that you want to.

    http://codex.wordpress.org/Child_Themes

    That way if the parent theme gets updated you don't lose anything.

  4. ubaidullahbutt
    Member
    Posted 1 year ago #

    Oh yes Jan Dembowski, I also forgot, twenty eleven is default theme of wordpress that comes updated every time, you update the wordpress.

    Jan is right, you should create child themes.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags