How to fix broken upgrade to 3.1
There is no reference to ‘classes.php’ anywhere in the WP codebase, either in the 3.1 branch or in trunk. You probably have a modified version. Do a ‘svn stat’ and then a ‘svn diff’.
There is no reference to ‘classes.php’ anywhere in the WP codebase, either in the 3.1 branch or in trunk. You probably have a modified version. Do a ‘svn stat’ and then a ‘svn diff’.
I didn’t test it myself, but maybe this tip could solve your problem: If you would like yoursite.com/category/projects/projectname/ to appear as yoursite.com/projects/projectname/ Simply enter /. as the value for Category base in the permalink settings page.
UNIX line endings (\n) and UTF-8 are just common code standards. As far as I can see, they are not even mentioned in the Coding Standards. Most (all?) core PHP files are just plain US-ASCII. Try to follow that path to keep your files as compatible as possible. If you use UTF-8, add a line … Read more
In twentythirteen theme, the post format link is shown using the content-link.php file. The part that displays the link is: <h1 class=”entry-title”> <a href=”https://wordpress.stackexchange.com/questions/115376/<?php echo esc_url(twentythirteen_get_link_url());?>”><?php the_title(); ?></a> </h1> So the link is shown using the twentythirteen_get_link_url(); this function uses the wp function get_url_in_content() to get the first link in the content and shows it … Read more
Replace your code with this. This warning is because PHP4 style constructors are depreciated since WordPress 4.3 /** * @Agents(s) list widget Class */ if ( ! class_exists( ‘cs_agentlist’ ) ) { class cs_agentlist extends WP_Widget { /** * Outputs the content of the widget * @param array $args * @param array $instance */ /** … Read more
When you display the custom logo you can check if is set, if not you display another image. You can achieve this with the following code featured in the documentation. I adapted it to suit your needs: $custom_logo_id = get_theme_mod( ‘custom_logo’ ); $logo = wp_get_attachment_image_src( $custom_logo_id , ‘full’ ); if ( has_custom_logo() ) { echo … Read more
You could use the wp_get_nav_menu_items filter add_filter(‘wp_get_nav_menu_items’, ‘prefix_add_categories_to_menu’, 10, 3); Then you could do something like this: function prefix_add_categories_to_menu($items, $menu, $args) { // Make sure we only run the code on the applicable menu if($menu->slug !== ‘replace_this’ || is_admin()) return $items; // Get all the product categories $categories = get_categories(array( ‘taxonomy’ => ‘product_cat’, ‘orderby’ => … Read more
visit for demos http://wpmu.org/
You can use the WP_Query(); to check that like this: $my_query = new WP_Query(); $my_query->query(array( ‘meta_key’ => ‘X’, ‘meta_value’ => ‘Y’)); if ( $my_query->have_posts() ){ //it exists } else { //it’s not here } Hope this helps.
When the installer runs it calls wp_install(), that in turn calls populate_options() defined in wp-admin/includes/schema.php, which runs the following.. if ( !__get_option(‘home’) ) update_option(‘home’, $guessurl); Prior to that $guessurl is defined by.. $guessurl = wp_guess_url(); The guess URL function is defined in wp-includes/functions.php and looks like this. function wp_guess_url() { if ( defined(‘WP_SITEURL’) && ” … Read more