You will have to override customer_account_index.xml
.
To Override this file in your extension, copy customer_account_index.xml
at app/code/VendorName/ModuleName/view/frontend/layout
and add below code :
<?xml version="1.0"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-right" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<update handle="customer_account"/>
<body>
<referenceBlock name="page.main.title">
<action method="setPageTitle">
<argument translate="true" name="title" xsi:type="string">My Account</argument>
</action>
</referenceBlock>
<referenceContainer name="content">
<block class="Magento\Customer\Block\Account\Dashboard\Info" name="customer_account_dashboard_info" as="info" template="Magento_Customer::account/dashboard/info.phtml" cacheable="false"/>
<block class="Magento\Customer\Block\Account\Dashboard\Address" name="customer_account_dashboard_address" as="address" template="Magento_Customer::account/dashboard/address.phtml" cacheable="false"/>
</referenceContainer>
</body>
</page>
EDIT :
You can create around plugin for that.
1) create di.xml file at app/code/VendorName/ModuleName/etc/di.xml
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<type name="Magento\Customer\Controller\Account\Index">
<plugin name="MyCucomtLoginAccountLoginPost" type="VendorName\ModuleName\Plugin\Customer\Index" sortOrder="10" disabled="false"/>
</type>
</config>
2) Now, create plugin VendorName\ModuleName\Plugin\Customer\Index.php
:
<?php
namespace VendorName\ModuleName\Plugin\Customer;
class Index
{
protected $resultPageFactory;
public function __construct(
\Magento\Framework\View\Result\PageFactory $resultPageFactory
) {
$this->resultPageFactory = $resultPageFactory;
}
public function aroundExecute(\Magento\Customer\Controller\Account\Index $subject, \Closure $proceed)
{
$resultPage = $this->resultPageFactory->create();
$resultPage->getConfig()->setPageLayout('2columns-right');
return $resultPage;
}
}