Tag Info

New answers tagged

0

Expanding on @Eugene's answer, if you want to limit this to a specific menu, just check the term ID of the menu: function custom_nav_args($args){ $menu = $args['menu']; if($menu->term_id = 17) /* replace term_id with menu id, or use $menu->name to do it by menu name*/ { $args['walker'] = new My_Custom_Walker(); } return $args; ...


1

You're going to want to use AJAX for this. Wordpress provides resources for connecting JS to PHP callbacks which is outlined in detail in the Codex. Basically, you'll want to take the following steps: Attach a handler to the first category select box using the .change() jQuery method. Use an AJAX function to post that data to the ajax url to call your PHP ...


0

That is not native behavior of it. If you check the source of WP_Widget_Categories $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? __( 'Categories' ) : $instance['title'], $instance, $this->id_base ); The title comes exclusively from the value saved in instance (or default if not). There is no logic to tie it in with current ...


1

Answer can be found here: http://stackoverflow.com/questions/13863087/wordpress-custom-widget-image-upload Even though the problem described isn't exactly the same as I had, the code posted in the answer still helped me as that code actually does exactly what I needed. I also think that I didn't originally find this answer as it's on the regular Stack ...


1

This actually seems like a quite plausible approach - to me. There is nothing wrong with looping through it, sometimes it is the only/fastest way anyway. I don't know how you get your sidebars, but for this $sidebars_widgets = get_option( 'sidebars_widgets' ); can be used. Which gives you an associative array containing a list of widgets per sidebar ...


0

login to localhost/phpMyAdmin and create dump of your DB Configure XAMPP and install clean Wordpress Import dump of your old DB to new Wordpress Change site_url and 'homeinwp_options` table Copy all your plugins from plugins folder and themes from themes folder Copy all uploaded files from `uploads' folder Check if everything goes well. Those points are ...


0

This is my personal view if I am the theme user. I would say it depends on the theme features If it's a one page theme? I will like to have all the options in the customizer window. If it's a niche/app based theme? I will just use the customizer for basic options and setup all the other options in my very Theme options panel in Admin Area.


0

Simply search & activate plugin "Widget Logic" from wordpress dashboard--> plugins, which creates "Widget logic" section to let you place some conditions for individual active widgets !is_page('home'); home-->Page ID, Page Title or Page Slug Place above code in "Widget logic" section, which display respective widget in all pages except "home" page.


0

If you look at your browser's error console, you'll see the 404 errors for your background images, which will point to where the issue is. This URL: ../wp-content/themes/themename/images/cat-party.jpg basically says, "go up one directory from the current directory, then from there look in wp-content, then themes, then images, etc..". That works fine on ...


0

I added your code and it fixed for widget-updated i.e. as I update widget, all options work fine. But now as I add any new widget, it doesn't work well until I've refresh the page or hit save once. I'm trying to fix below code in my project: $( document ).on( 'widget-updated' , function( event, $widget ){ $('.of-color').wpColorPicker(); ...


0

Here's one way to achieve this: /** * Display a random feed in the RSS Widget * Activated by the wpse_random_url string in the feed url * * @see http://wordpress.stackexchange.com/a/187599/26350 */ ! is_admin() && add_filter( 'wp_feed_options', function( $feed, $url ) { // Modify this list of feeds to your needs: $urls = [ ...


0

I'm not the only one with this problem. The simplest way I feel is the site wide readme.html method or the wp-admin/about.php method. This wordpress post has four ways to check and this question on stackoverflow had good info. I looked and looked but couldn't see it in the At a Glance box until later since the top and bottom already were both telling me to ...


2

Specific support for third party plugins are off topic, but your question can be answered in a general scope. get_the_ID() will not work for this specific issue, what you need is an array of post ID's that is currently being displayed on the page you are viewing. The current array of posts that is being displayed on any given page is stored in the $posts ...


0

The shortest possible answer would be to correct 'post_author' to 'author', since that is the key WP is looking for. If a key is incorrect or misspelled it will be ignored, as was the case with 'post_author'.


0

That's a commercial theme, so it's best to ask in the support forum where you bought the theme. Few people here will have the same theme. And, third-party themes and plugins are off topic here on WP-Dev.


2

The limitation is down to the existing arguments and how pretty much all widgets typically output content: echo $args['before_widget']; if ( $title ) { echo $args['before_title'] . $title . $args['after_title']; } // Widget content echo $args['after_widget']; Some widgets may offer before/after content hooks, but if you want a "global" fix there's ...



Top 50 recent answers are included