Support » Fixing WordPress » getting rid of posting

  • 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: , unfortunately I don’t know where/how to edit core files… Getting rid of comments was no problem.

    Thanks for replay

Viewing 3 replies - 1 through 3 (of 3 total)
  • 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.

    Moderator Jan Dembowski


    Brute Squad and Volunteer Moderator

    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.

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

    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.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘getting rid of posting’ is closed to new replies.