Questions tagged [widget-text]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
9
votes
3answers
2k views

Can the new 4.8v text widget visual editor be removed?

Can the new 4.8 widget visual editor in the default text widget be unhooked or removed and the widget restored to the pre-4.8 editor style? I don't need or want the visual editor in widgets; I use ...
5
votes
2answers
5k views

Is There A Hook To Process The Content Of The Text Widget?

Is there any filter which can be used in a plugin to process the content of the text widget before it is rendered?
4
votes
5answers
38k views

How to display custom widget anywhere

I've a custom widget for ads, it helps me to show ads on sidebar but I'm trying to display it under every single post or on front page near to slider. <?php the_widget( 'AdWidget_300' ); ?> ...
3
votes
2answers
480 views

Add New Footer Widget Area with Limited Options?

I'm trying to add a new footer widget area to my theme. I was able to add the new footer widget area and it works correctly. But I would like to limit what can be done with the widget area by the end ...
3
votes
2answers
1k views

Add copies of the same text widget instance to multiple sidebars

Note: This is not the popular question about how to create multiple instances of a widget. I have a text widget that I am using to display "business hours". This text needs to go in multiple ...
2
votes
1answer
2k views

Custom shortcode in widget forced to top of widget

A custom shortcode i made is being forced to the top of the widget outside of the widget container. Any ideas why? This is my code... function nktmediaplayer_func($atts) { extract(shortcode_atts(...
2
votes
3answers
675 views

wordpress widget textbox in the sidebar

I have a normal textbox widget that I am using in certain sidebars. The text widget generates a div within a ul. Is there anyway to make the widget generate another ul li instead? <ul><h3&...
1
vote
2answers
5k views

How to change text widget title h2 to h1

I created text widget and wordpress created some default styles it uses h2 tag and class "widgettitle". How can i change tag to h1 and remove class from it. This is my function.php file function ...
1
vote
1answer
996 views

Text Widget Links Not Working

I am trying to add a simple link to an 'About' page in a Sidebar Text Widget but when I test it the link does not work and I get an error on the linked page: "The page cannot be displayed because an ...
1
vote
1answer
26 views

When adding a widget, what kind of widget should I used to add images and text and styling?

Is there such a thing? I would settle for images, text and maybe headers. I know I can add HTML into the text widget. So is that what I should be doing? But how do I add images to the site? That ...
1
vote
1answer
27 views

Plugin translations not installed but… strings are translated!

I've had for a long time a site with the famous Recent Tweets Widget. The plugin came as part of a theme, and back in the day, it included translation .po and .mo files for French language. I didn't ...
1
vote
3answers
1k views

Font awesome Icon HTML in widgets disappear on save

I've created a Text widget and put font-awesome icon HTML in editor Text Mode <i class="fab fa-facebook"></i> but toggling to Visual mode makes the code disappears though I can see it ...
1
vote
1answer
5k views

Creating a widget with a number of custom fields

I am attempting to create some custom widgets. I have created one, which only needed a different title field. However I am now stuck when trying to create a widget which allows me to have multiple ...
1
vote
1answer
1k views

Extending the WP_Widget_Text class

I am trying to alter the output of the default WordPress text widget. Since the widget is written in OOP I hoped it could be a simple deal of extending the class and overwriting one method – but it ...
1
vote
3answers
5k views

Make forced line break in title of text widget

I am using text widget in page, my title is too long and i want to make (Br)break in particular place, but i can not. After saving (br)break is gone, also tried (nbsp) but same result came. How to ...
1
vote
1answer
8k views

Script Code in Text Widget Does NOT Show

I have a self hosted Wordpress 3.7 and using the Twenty Thirteen theme. I have placed a text widget on the sidebar and put a simple code from Amazon inside it: <SCRIPT charset="utf-8" type="text/...
1
vote
1answer
3k views

Adding Shortcode to Text Widget

At the moment, I'm running WordPress v3.2.2 (soon to upgrade to v3.4.2), and am trying to insert shortcode to insert Issuu into a text widget on our sidebar. The WordPress plugin I installed and am ...
1
vote
0answers
56 views

WP - Genesis - How to get the content of a widget in php? [closed]

Provided I have a widget area that I register in genesis like this: genesis_register_sidebar( array( 'id' => 'my_header', 'name' => __( 'Image Header', 'my_header' ), '...
1
vote
0answers
382 views

Help With Custom Image and Text Widget

I recently got into making a custom WordPress theme and I've learned a lot along the way, but I've hit a roadblock with making a custom widget.This is the basic output HTML I'd like my widget to ...
1
vote
2answers
1k views

Text widget doesn't save the content

I am trying to save data in the default text widget. But when I click save, all the data are not saving and the field becomes empty. It happens when I edit in title field or text field. As I new to ...
1
vote
1answer
306 views

Filter widget outputs

I've been trying to find a good solution for my problem, but I can't seem to find anything on this topic at all. I've got a custom sidebar, created by using register_sidebar and I've used wordpress's ...
1
vote
0answers
127 views

Widget on the right side of the page overlaps with the left side [closed]

I added the mailchimp widget to the right column of my blog. But for some reason, it overlaps with the main content of the blog. Here is a screenshot of what happens Would anyone know why this ...
1
vote
0answers
26 views

Widget not displaying in WMPU sites

I'm modifying a theme for a WPMU install, and I've hit a wall. In order to display a text widget in a specified area, I'm using: $args = array( 'before_widget' => '<ul class="widget-...
0
votes
2answers
968 views

How to make widget title accept php?

I am trying to make widgets accept php, but without resorting to plugins. So far I have enabled php for the widget_text but cant make it work for widget_title. I am using the following code in ...
0
votes
2answers
1k views

Change The Woocommerce Product Categories Dropdown Widget Placeholder Text

I've searched everywhere on the internet and tried to code it myself I want to change the default "Select A Category" placeholder text to "Select A Sub Category" so far I have tried this but it's not ...
0
votes
1answer
162 views

Widget back end radio button issue

I am using such kind of arrangements in my widget.php → <p> <input class="radio" type="radio" <?php checked( $instance[ 'the_style_1' ], 'on' ); ?> id="<?php echo $this->...
0
votes
1answer
882 views

Hook called before text widget save

I want to know which hook/action is called just before the Text Widget content and title is stored in the database. I googled alot but could not able to get the hook name. What I want is whenever a ...
0
votes
1answer
1k views

Different “Text Widgets” in Sidebar on Many Different Pages?

Hi there I have a few questions on adding different sidebar texts to sidebars per page. On one part of my site, I have pages dedicated to individual animals. I have figured out how to change the ...
0
votes
2answers
227 views

Can't Write Custom Widget Code In One ECHO

I am creating a WordPress custom widget and I created the below one that is working fine when I add it in function.php. <?php /* --------------------------------------------------------------------...
0
votes
1answer
23 views

Passing user enetered value in widget: number of words, for example

<a href="<?php the_permalink(); ?>"> <?php the_title(); ?></a> The above is the code snippet from one of the widgets of my theme. Now in the widget arrangement, this is the ...
0
votes
1answer
1k views

How to add custom tinymce plugin to new text widget

So I have a custom TinyMCE plugin, which adds a button to the editor. I'm using the mce_external_plugins and mce_buttons filter to add my TinyMCE plugin. After WP 4.8 introduced the simple TinyMCE ...
0
votes
1answer
56 views

Shortcode inside text widget do not call enqueue style

I did a plugin who call enqueue style inside a shortcode. But when i add my shortcode in a text widget the enqueue style are not included en the page. wp_enqueue_style('css-rfnb', RFNB_PLUGIN_DIR_URL ...
0
votes
1answer
1k views

Wordpress Widget Not Saving Instance

I have very simple wordpress widget, that has 3 input field. Whenever i submit data, it does not save to database. I have added and deleted the plugin , deactivated and reactivated multiple times, but ...
0
votes
1answer
3k views

Input with pattern not working

On the admin widgets.php page I am trying to setup a pattern on an input to only allow digits. If I enter an invalid character like a non-digit it still accepts it and when I save the Widget with an ...
0
votes
1answer
42 views

How to add WordPress Settings in sidebar widgets

Is it possible to insert the Site Title in a widget text box? I tried <?php wp_title(); ?> but nothing displayed.
0
votes
1answer
4k views

Custom CSS for a particular text/html widget in Wordpress

I have a couple of text widgets on my Home Sidebar. There is one text widget in particular that I want it to implement custom CSS written in my child theme rather than the default styling provided by ...
0
votes
2answers
2k views

How to allow PHP In WordPress text widget

I want to add a text widget to my new WordPress website, but in the text widget there are some PHP snippets and I am finding it difficult to do it. Please help me Guys.
0
votes
1answer
1k views

accessing wordpress serialized data outside wp

I've never worked with serialized data... I need a little help with how to load "text" widgets title and content in php script outside wordpress... my script just connects to database (including wp-...
0
votes
1answer
555 views

How to add a recent post function to a text widget I created for practice?

I am currently being trained to create widgets and my mentor has asked me to create a text widget then add the ability to display the 5 most recent posts (all categories) on it. I am a little stumped ...
0
votes
3answers
891 views

I want a widget to appear on only one page

I have a rotating images widget I want to display on my homepage. My selected homepage is a static front page I created with several other pages to make my blog look more like a website than a blog, ...
0
votes
0answers
11 views

How do I create a form inside my back end of widget and display it in a certain area for the end of my widget

I have used the youtube video: (https://www.youtube.com/watch?v=OJdIUU1pjl4&t=1261s) to learn how to create my first custom widget. From here I have create a class with a front end display and a ...
0
votes
1answer
16 views

How to get individual values from custom widget?

I have the following custom sidebar: I want to know if it's possible to get the values stored in each widget individually. I already tried doing the following: global $wp_registered_widgets; $widgets ...
0
votes
1answer
431 views

Need to add custom text field to Woocommerce under add to cart button

I'm a WP newbie so please stick with me here. I handle this online catalog of products and we need a custom input field to go beneath our invisible "Add To Cart" button. The text needs to be changed ...
0
votes
0answers
11 views

Change values on several pages

I'm building a catalog website that shows products, they are present on several pages and each time i want to change some details i have to enter to each page and change. Is there any solutions to ...
0
votes
0answers
19 views

Text widget is placing everything side by side. I want to post it above

As I add text widgets within a page in my home screen, They are going side by side. I have three text widgets as if there are three columns of text in my page. I like this, but i want to put a title ...
0
votes
0answers
30 views

Allowing HTML elements in title widgets spacing problem

I found some code online to allow me to put span tags in text widget title, so I could change the colour of some titles. It works, but the thing is that I need to make title half red half black color. ...
0
votes
1answer
37 views

Let custom text widget use the same font as the theme

On this page, I have created a text widget. I don't know how to match this up with the font on the rest of the site. The theme uses the Playfair Display font. I don't have extensive knowledge of ...
0
votes
0answers
24 views

Title not Emptying in a Widget

<?php echo $args['before_title'].$title.$args['after_title']; ?> The above code generates the widget title. Here is it's admin image → Here is additional code: <p> <...
0
votes
1answer
846 views

Widget without DIV wrapper

Whenever I add a text widget it adds a div around the content I add. E.g. <div class="textwidget"> <my content> </div> which messes up the formatting of some of my content. Is ...
0
votes
1answer
70 views

custom css in one page

I am trying to add custom css to wordpress page. Which is trying to load an image from the gallery for some reason though certain parts of the css are not working. Not sure if this has to do with the ...