Questions tagged [widget-text]

The tag has no usage guidance.

1
vote
0answers
21 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' ), '...
0
votes
2answers
436 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 ...
1
vote
0answers
66 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 ...
0
votes
3answers
608 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 ...
0
votes
1answer
68 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
0answers
23 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
30 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
1answer
21 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
0answers
23 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> <...
1
vote
1answer
698 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 ...
0
votes
2answers
2k 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 ...
0
votes
1answer
677 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 ...
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 ...
1
vote
1answer
744 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 ...
0
votes
1answer
589 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
44 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 ...
1
vote
1answer
231 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 ...
0
votes
1answer
951 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
1answer
528 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 ...
1
vote
1answer
4k 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 ...
0
votes
1answer
757 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
69 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 ...
0
votes
1answer
811 views

How to use the filter 'widget_text' to a particular text widget with id

I have a sidebar with 10+ text widgets serving advertisements. Now I want to filter a particular text widget in a single post if that post has a data in meta field. I searched a lot and found Is There ...
0
votes
1answer
2k 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 ...
2
votes
5answers
21k 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' ); ?> ...
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 ...
0
votes
1answer
40 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
2answers
199 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 /* --------------------------------------------------------------------...
1
vote
3answers
4k 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 ...
0
votes
1answer
138 views

Default Wordpress widgets always appear

I added only 3 Widgets to my sidebar, however when I set their visibility to hidden in post pages they disappear but ALL the default widgets appear. I want to remove the default widgets from appearing ...
0
votes
0answers
1k views

Custom widget not appearing on front end

I have the following widget location defined in my theme's functions.php: register_sidebar( array( 'name' => __( 'Opening Hours', 'transparent' ), 'id' => 'sidebar-hours', '...
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
1answer
86 views

can't edit widgets after moving from subfolder to root

I had some issues with migration: childtheme that was ranamed and working was automatically renamed back + a lot of wrong absolute apps from even older version on site... Now, after I fixed everithing ...
0
votes
1answer
84 views

Loading shortcode stylesheet only when shortcode is in text widget [closed]

I would like to load shortcode stylesheet only when it will be put in text widget. Please help somebody.
-1
votes
3answers
2k views

Display widget outside sidebar?

I want to display a widget outside the sidebar, but I can't get my code to work. The theme name is radius-primary-sidebar and my widget id is text-20 (according to the html in the admin page. See ...
1
vote
0answers
123 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 ...
0
votes
1answer
326 views

How to use wp query posts with current post meta value in text widget

I would like to query information in my sidebar text widget. I added the function. The php query working. (see the code below) I have single posts with wine tastings. I would like to show in right ...
-2
votes
1answer
2k views

Adding more information to a Content Product Category

The template content_product_cat is responsible for showing the product categories images and its name. I want to display more information below the name of a category e.g a Category called 'Books', I ...
1
vote
0answers
25 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
0answers
568 views

How to use shortcodes on a widget sidebar when doing an ajax call?

I'm trying to use a shortcode from Promotion Slider Plugin inside a widget when doing an ajax call. As said here, I could achieve it doing: add_action( 'init', function() { ...
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.
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/...
0
votes
0answers
12 views

Text Widget Automatically Adding Website Link [duplicate]

I am working on this website and the "Useful Links" section at the bottom (second footer widget area) is not working because somehow the current page links got added to the links (please hover on the ...
1
vote
1answer
25 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
votes
1answer
132 views

Rollover button doesn't appear in sidebar [closed]

For some reason, I can't add a PayPal donate button to the sidebar of my website. I've been using CSS to create a rollover effect, and while it's worked on a static page of my site: http://...
0
votes
0answers
33 views

Widget Disappearing in IE

Im debugging my site in IE, and my widget area is disappearing. http://pcdconsultancy.co.uk/ Any ideas? I have no transparency or anything on this.
0
votes
1answer
760 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
2answers
840 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 ...
3
votes
2answers
446 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 ...
0
votes
1answer
520 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 ...