Change the background color of my theme widgets

Your widgets will get an ID based on the class name you specify. You can then write a CSS selector based on those values. Say that you prefix your widget classes with ‘foo_’, then you can select them with: div[id*=”foo_”] { background-color: red; } To add that to the admin pages add something like this … Read more

Create Dashboard Widget with form to keep team’s record

Here is a tutorial on submitting forms through dashboard widgets : http://www.wpexplorer.com/configurable-dashboard-widgets/ In the tutorial the author uses a single function for both displaying and updating the widget. What if you then use this approach and implement functionality similar to a save routine for custom meta boxes and custom fields to link the new meta … Read more

My widget not printing before_widgets and after widgets

first add this code to functions.php register_sidebar(array( ‘name’ => __(‘Top Footer’, ‘educate’), ‘id’ => ‘top-footer’, ‘description’ => __(‘Top Full width footer.’, ‘educate’), ‘before_widget’ => ‘<div class=”footer-widget %2$s” id=”%1$s” >’, ‘after_widget’ => ‘</div>’, ‘before_title’ => ‘<h3 class=”footer-widget-title”>’, ‘after_title’ => ‘</h3>’, )); after add this code where you want to show widget <?php if (is_active_sidebar(‘top-footer’)) { if … Read more

What widgets are used on a page? [closed]

This is unsolvable in general case, since widgets can be either generated by sidebar calls in arbitrary locations of templates or (rarely) even rendered individually without sidebar. So for general case at best you can hook into the processes and run some logic at the end of page load. If you are working on specific … Read more

How to add custom tinymce plugin to new text widget

I found the solution with help from Jacob Peattie and the article from https://make.wordpress.org/core/2017/05/23/addition-of-tinymce-to-the-text-widget/ Here’s a quick walkthrough on what i did: I made a new js file container the code of my original button, but modified it to the event listener of the widget tinymce jQuery( document ).on( ‘tinymce-editor-setup’, function( event, editor ) { … Read more

Header Sidebar Won’t Move Lower – Want to Align with Header Logo [closed]

This is more of a css question, but here’s what i found looking at your site: This selector will control it: .site-header .widget { margin: 40px 0 0 0; } this is the code that has padding: <aside id=”dokna_product_search-2″ class=”widget widget_dokna_product_search”> Or if that doesn’t work try making it more specific: That box (col-md-8.col-sm-7.clearfix) has … Read more

How to dynamically add the the input text field in widget?

How about jQuery append method? To make a counter, simply increment i variable every click. $(‘body’).on(‘click’, ‘.add-more-button’, function() { var i = 2; $(‘.widget-input’).append(‘<label>Link’ + i + ‘</label><input>’); i++; } This is just an idea, I guess someone more experienced can develop it further.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)