Drupal version 8 remove or customise "submitted by"

Posted under » Drupal on 12 May 2016

It is irritating to see the "submitted by" in Drupal when you do a corporate website for a client.

To not show it, you have to go thru some layers of admin menu. The URL is /admin/structure/types/manage/page or /admin/structure/types/manage/article

However, if you want to find it the menu way, its Administration > Structure > Content types >
You will see that there is nothing there

The goods are hidden in a drop down menu

Even if you missed that, and pressed the default "Manage fields", you can still find it. Click the "edit" tab.


When you have reached the edit tab, you will still not see the "author submitted by" part. So you must click the "Display Settings" / "Don't display post information".

Now you are getting warmer. Now untick the "Display author and date information" check box.

Now go back to your site and you will see the "submitted by" is gone.

Read the official drupal 7 documentation.

Most of the documentation is applicable to version 8 except the customising the template part. In version 8 you can customise it by enabling the display author first and then change the /themes/newsplus/templates/node.html.twig

{% if display_submitted %}
          <div class="node__meta">
            <span{{ author_attributes.addClass('user-picture') }}>
              {{ author_picture }}
            </span>
			{% set haribulan = node.getCreatedTime|date('d M Y') %}			
			<span>{% trans %} <b>Published date</b> : {{ haribulan }} {% endtrans %}</span>
            {{ metadata }}
          </div>
        {% endif %}

Here you can see that I've customised the date format as well.
 

web security linux ubuntu GIT svn Raspberry apache mysql php drupal cake symfony javascript Ajax css