New answers tagged

2

From your site i can say that script is not being loaded because of wrong opening quote for script tag.Use " instead of ” So <script src=”http://lookbook.nu/widget/profile.js?id=2303472&width=standard&align=left&stats_fans=1&fanbox=yes&hash=14575a9cd02fd36d2758e5db3cb92b5a”></script> Should be this <script ...


-2

It really depends who you are going to be using to send out emails. I recommend taking a look at Mailchimp or if you want to manage your email marketing within WordPress then Mail Poet is a good choice. I personally use mailchimp because I do not want to send out emails from my hosting server and prefer to use a 3rd party to do so.


2

Without actually knowing what you're trying to achieve I see the following problems: $post variable is not defined in your widget() method. Try setting it using $post = get_post( get_the_ID() ) for instance. By the time you call foreach ($posts as $post) { ... } $posts variable is also not set. You need some query for this one I guess - WP_Query() or ...


0

Changing the include_once within form() to require solved the bug.


3

Sidebars are stored in global variable $wp_registered_sidebars. You can get the sidebar properties using this variable. global $wp_registered_sidebars; if ( isset( $wp_registered_sidebars['sidebar-2'] ) ) { echo $wp_registered_sidebars['sidebar-2']['name']; } Note that do not use it too early, either on/after widgets_init hook or in a template ...


3

This is a known issue and will be taken care of soon, assuming you are using the "Twenty Eleven" theme: see this link. The bundled Twenty Eleven theme has some styling issues for pages with sidebars (See Trac ticket #36510)


3

Your have created three sidebars and that are primary_widget_area, secondary_widget_area, footer_widget_area But in the sidebar, you call a different sidebar name sidebar-3; that's why your sidebars are not displaying. Try the following code in sidebar.php: // To display primary_widget_area sidebar <?php if ( is_active_sidebar( 'primary_widget_area' ) ...


0

In your child theme's 'functions.php' file, you need to use the 'remove_action( 'widgets_init', '$name' ); script. For instance, in your twentytwelve-child theme's 'functions.php' file, use: remove_action( 'widgets_init', 'twentytwelve_widgets_init' ); //necessary to replace parent theme's code and then hook your new widget in your child theme's function ...


-1

You can simply use wp_enqueue_script or wp_enqueue_style in the widget method (function) in your custom Widget class and it will load the scripts only if the widget is active. See details and example here: https://wpshed.com/wordpress/load-scripts-styles-widget-active/


-1

I encountered this problem, and solved it. Please open your browser to the console, it is clear that there is a javascript error. fixed the error and widgets shown


1

You can add a Shortcode using the built-in text widget. To get the widget to process Shortcodes, add the following filter in your theme's functions.php: add_filter( 'widget_text', 'do_shortcode' ); This will result in widget text being passed thru do_shortcode, which will render any Shortcodes embedded in the text. Just note that this may not work for all ...


0

You can find more information in the Widgets API


2

Widgets should only be manipulated by users, and in general they should not be deleted because there is no version control for them. Therefor I suggest you rethink first before reading further. Widgets are located in two places in the DB, the sidebar_widgets option is an array of sidebars, indexed by the sidebar id. Each sidebar is represented by an array ...


0

Put this lines of code in function.php if (function_exists("register_sidebar")) { register_sidebar(); } Put this to sidebar.php <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?> <?php $image = new WP_query ('showposts=1'); if(have_posts()) : while($image->have_posts()) : $image->the_post; ?> <a ...


0

I think what you are asking to do is not possible. At least not cleanly. Why? Because the actual rendering of sidebars and widgets happens in the template files. get_sidebar() gets called from a template file which then calls the WP_Widget::widget() method for whichever widgets are assigned to the sidebar in question. But this happens after the wp_head ...


2

You can add a filter to page_link to modify link output: function wpd_add_fragment_to_pages( $url ) { return $url . '#navbar'; } add_filter( 'page_link', 'wpd_add_fragment_to_pages' );


0

The "Archives" Widget makes use of wp_get_archives() which, given the correct arguments (specifically the format argument), can supply the markup you need. I'd say customizing that Widget is a good place to start.



Top 50 recent answers are included