This topic has 10 replies, 1 voice, and was last updated 6 years, 9 months ago by Yogendra.
-
AuthorPosts
-
-
kmorrowGuestHi! It is me again, working on the Bayou on Bay site. My client reached out to me and would like to add links to the subheadings in the Menu (team widget) section and the Events (blog widget) section. When she adds the code to the subheading within the widgets, it doesn’t work for her. Is there another way to make this happen?
Thanks!
Kacey
-
YogendraGuestHello Kacey,
How are you?
Can you please let me know exactly what you want? I guess you want to add links to the text right
We are open Tue-Fri from 11:00am-Late, Sat & Sun from 10:00am-Late
Happy Hour runs from 3pm-6pm on Wed, Thu, and Sun, every night from 10pm-close, and all day long on Tuesdays.Thanks
-
kmorrowGuestYep, That is what they want. They want to be able to add a link to the text of the Our Menu and Events widgets.
Any suggestions?
-
kmorrowGuestI figured out how to add a link after the subheading in the HTML. If there is an easier way within the widget for the client, let me know, otherwise I can instruct them on how to adjust the HTML. Thanks!
-
YogendraGuestHello Kacey,
First of all you need to change the subheadings input type from textbox to textarea.
You can easily change this in your widget file ie( team-section-widget.php ).For ex change the line from
<input class=”widefat” id=”<?php echo $this->get_field_id(‘subheading’); ?>” name=”<?php echo $this->get_field_name(‘subheading’); ?>” type=”text” value=”<?php echo $subheading; ?>” />
to
<textarea class=”widefat” rows=”4″ cols=”12″ id=”<?php echo $this->get_field_id(‘subheading’); ?>” name=”<?php echo $this->get_field_name(‘subheading’); ?>”><?php echo $subheading; ?></textarea>
You also need to change the sanitation function of subheading in update function of widget. Remove the wp_filter_post_kses() function here.
Eg Change this
$instance[‘subheading’] = wp_filter_post_kses($new_instance[‘subheading’]);to
$instance[‘subheading’] = $new_instance[‘subheading’];
Now you will be able to add links using anchor html tag.
Thanks
- This reply was modified 6 years, 9 months ago by Spiracle Themes.
-
YogendraGuestOne more thing after pasting the code. Please change this ” and ‘ to plain double quotes and plain single quotes. You will see the difference when pasting that ” and ‘ are different from those used in the code
One more thing do not edit parent theme widgets. Always edit the child theme widgets.
Thanks
-
-
YogendraGuestHello Kacey,
There is a black section just after the slider. See this screenshot. This is because of the fixed height you have given there
Use height auto
slider-wrapper {
overflow: hidden;
position: relative;
height: auto;
background-color: #000;
}One more thing i can’t see a logo in other pages and in sticky header. You can add these by going to
Appearance->Customize->Sticky Header and Logo SettingsThanks
-
kmorrowGuestThanks for checking that out. I changed the height to auto and it seemed to have worked. I am surprised the logo isn’t showing up on the sticky header. I have it in there under the Customize Settings. I removed it and readded it. I can see it on the sticky header, but not on the blog posts. It would be nice to see it in the header on the blog posts.
-
YogendraGuestHello Kacey,
First of all, You need to add a second logo for content pages. You can add this by going to Appearance->Customize->Sticky Header and Logo Settings and find section Logo for White Background Pages. This will not only add logo to the content page but will be used as sticky header logo for white bakcground pages also.
Thanks
-
kmorrowGuestThanks for the above suggestions for changing the code to allow for links to be added in the widget. I will give it a try!
As far as the logo goes, I did already include an image in the Logo For White Background Pages, so I am not sure what is going on? it is the same image that I added for the Logo for Sticky Header. I could try a different image and see if that changes anything?
Thanks again.
-
YogendraGuestok check and let me know
Thanks
-
-
-
AuthorPosts