WordPress native “playlist” shortcode. Next and Prev there are but with no icons. How to fix?
in stylesheet: .wp-playlist-prev{ width:20px; height:20px; background-image: url(“./theme_images_folder/something_icon.png”); } same for the next button.
in stylesheet: .wp-playlist-prev{ width:20px; height:20px; background-image: url(“./theme_images_folder/something_icon.png”); } same for the next button.
The idea is just to programmatically create a path/url in a plugin for a WordPress site (like, “[mysite]/mypath”), and then load an arbitrary html or php file. In case anyone else is looking for something similar, this works for me (in my main plugin function file): register_activation_hook(__FILE__, ‘myplugin_activate’); function myplugin_activate () { create_custom_page(‘mytestpath’); } function … Read more
I’m the author of that plugin and I can confirm there was an issue. It was in the GM\VirtualPages\TemplateLoader::init(); method. Issue was caused by an untested switch from array_merge to wp_parse_args. They are similar, but I would have to inverse order of arguments moving from one to the other. Shame on me. I fixed that … Read more
pre_get_posts does not work as expected on true pages and static front pages. You should create a custom query using WP_Query to return the posts that you need. EDIT Thanks to @birgire in comments, here is an interesting approach using pre_get_posts with a static front page
Just modifying the .po file doesn’t do anything. The .po is the template. To be displayed, the .po must be compiled into an .mo file and it is the compiled .mo that makes the translations. If you’re just editing the .po in a text editor, you’re not changing anything. You’ll need a compiler. A good … Read more
What you describe it pretty much exactly the use-case for WordPress Multisite (formerly WPMU.) The downsides are of course that all sites are dependent on the same code and the same database so if you break one you break them all (though most of the tables are different for each site.) Of course the upside … Read more
I also used SVN before to update my wordpress installation. Up the working copied will get messed up very quickly with all the manual updates or files created by plugins. I would always recommend to use the update functionality of wordpress if you only want to step from one tagged version to another one. Although, … Read more
wp_schedule_event takes a hook as parameter, not a function. Try: wp_schedule_event(time(), ‘daily’, ‘my_daily_event’); add_action(‘my_daily_event’, array(&$this, ‘my_widget_cron’)); if ( !wp_next_scheduled( ‘my_daily_event’ ) ) { wp_schedule_event(time(), ‘hourly’, ‘my_daily_event’) } If you remove the widget from the sidebar, the cron will still continue to run. You can run the following code (outside of the widget class) to clear … Read more
Use add_query_arg() to do this. Here’s a useful function if you need to get the current page URL (when get_permalink is inaccesible, like on Archives): function get_current_page_url() { $request = esc_url($_SERVER[“REQUEST_URI”]); $pageURL = (is_ssl() ? ‘https’ : ‘http’).’://’; if ($_SERVER[“SERVER_PORT”] != “80”) $pageURL .= $_SERVER[“SERVER_NAME”].”:”.$_SERVER[“SERVER_PORT”].$request; else $pageURL .= $_SERVER[“SERVER_NAME”].$request; if (false === strpos(get_option(‘home’), ‘://www.’)) $pageURL … Read more
Following on from question comments. You can run a filter on sanitize_file_name_chars and add the degree symbol to the array of invalid chars, but it won’t halt the upload it will simply strip the file extension. However you can add another filter stop the upload, in a hacky kind of way by additionally hooking on … Read more