-
AuthorPosts
-
October 29, 2024 at 2:55 pm #1470124
Hi
Is it possible to add plain text ( like an adress ) in the left side bar menu?
Like the text u you can add in the top bar menu..( telephone number etc. )
Greetz KarinOctober 30, 2024 at 5:11 am #1470195Hey leloux,
Thank you for the inquiry.
You can use the ava_main_header_sidebar hook in the functions.php file to insert additional content to the left sidebar menu or header:
Example:
The following will add a paragraph element:
add_action( 'ava_main_header', 'ava_header_sidebar_custom_text' ); function ava_header_sidebar_custom_text() { echo "<p class='av-sidebar-header-text'>Additional text</p>"; }
This one will insert a widget area called “header-top”:
add_action( 'ava_main_header', 'ava_header_sidebar_widget_area' ); function ava_header_sidebar_widget_area() { dynamic_sidebar( 'header-top' ); }
Best regards,
IsmaelOctober 30, 2024 at 11:10 am #1470229Hi Ismael
Tnx but where do i adjust and edit the additional text?
Can the additional text also be at the bottom of the left side bar menu?
Greetz
KarinOctober 30, 2024 at 3:52 pm #1470252Hi,
You can change the text in this line:
echo "<p class='av-sidebar-header-text'>Additional text</p>";
If you add the content and link to where we can see the actual element, then we can help you out with styling.
Best regards,
RikardOctober 30, 2024 at 4:13 pm #1470255Hi Rikard
That would be great but is it possible to put the text line at the bottom of the left side bar menu?
This is the content:Psychologenpraktijk Sterk
Hogezoom 15 4328 EE
Burgh-Haamstede
e-mail: (Email address hidden if logged out)
tel.nr: 06-54356557October 31, 2024 at 4:09 am #1470299Hi,
Thank you for the update.
We added this code in the functions.php file around line 52:
add_action('ava_after_main_menu', 'ava_header_sidebar_custom_text'); function ava_header_sidebar_custom_text() { echo " <div class='av-sidebar-header-text'> <p><strong>Psychologenpraktijk Sterk</strong></p> <p>Hogezoom 15</p> <p>4328 EE Burgh-Haamstede</p> <p><strong>Email:</strong> <a href='mailto: (Email address hidden if logged out) '> (Email address hidden if logged out) </a></p> <p><strong>Tel.nr:</strong> <a href='tel:+31654356557'>06-54356557</a></p> </div> "; }
Then added this css code:
.av-sidebar-header-text { padding: 20px 40px; }
We noticed that you’re not using a child theme. In order to preserve this modification during updates, we recommend activating a child theme and placing the code in its functions.php file instead.
Best regards,
IsmaelOctober 31, 2024 at 9:24 am #1470334Hi Ismael
Tnx!
I removed it despite of all your efforts; it does not looks good on the mobile device unfortunately..
Perhaps there is another better solution?
When i open the website on my mobile the additional text is far to big and you have to scroll a lot to see the actual menu…
Greetz
KarinNovember 1, 2024 at 5:56 am #1470396Hi,
Thank you for the update.
You can add this css code to hide the container on mobile view:
@media only screen and (max-width: 989px) { /* Add your Mobile Styles here */ .av-sidebar-header-text { display: none; } }
Best regards,
IsmaelNovember 2, 2024 at 1:49 pm #1470473Tnx Ismael!
Greetz
KarinNovember 2, 2024 at 9:34 pm #1470482Hi,
Thanks for the update, we’ll close this thread for now then. Please open a new thread if you should have any further questions or problems.
Best regards,
Rikard -
AuthorPosts
- The topic ‘Left side bar menu’ is closed to new replies.