Logic for Nearby places with post and categories

I'm developing a website which has states as categories and posts as cities. What we are trying to do is identify each post (city) and also show nearby cities to the current city. As of now we are simply using the category as the only filter and "nearby" is not actually nearby. (Similar to how related posts work) We tried to use Tags (adding some hidden tags by creating fake region division) but that has become complex on the fact that a city can also be near to another city from another state. I'm thinking of using a custom field with longitude or latitude as a matching value. Has anyone tried this or suggest an idea to make it simpler.


Three Questions with Twenty Eleven theme

I have a few things that I need help with in Twenty Eleven.   1. The logo I put in the header is resized to 578px by 160px, when it is supposed to be 326px by 90px.   2. I would like to simply the php code that controls this: http://i55.tinypic.com/33tsehh.jpg I added the gradient to the info box and also the about the author text and bio line. I'm not very knowledgeable with PHP so I don't want to mess with it without help.               <?php             /* translators: used between list items, there is a space after the comma */             $categories_list = get_the_category_list( __( ', ', 'twentyeleven' ) );                       /* translators: used between list items, there is a space after the comma */             $tag_list = get_the_tag_list( '', __( ', ', 'twentyeleven' ) );             if ( '' != $tag_list ) {                 $utility_text = __( 'This entry was posted in %1$s and tagged %2$s by %5$s.', 'twentyeleven' );             } elseif ( '' != $categories_list ) {                 $utility_text = __( 'This entry was posted in %1$s by %5$s. Bookmark the permalink.', 'twentyeleven' );             } else {                 $utility_text = __( 'This entry was posted by %5$s. Bookmark the permalink.', 'twentyeleven' );             }                       printf(                 $utility_text,                 $categories_list,                 $tag_list,                 esc_url( get_permalink() ),                 the_title_attribute( 'echo=0' ),                 get_the_author(),                 esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) )             );         ?>        1. I want to know how I could add a featured image for each post to the front page because it doesn't seem like it has one coded in. Here is a live link: http://gscdesigns.co.cc/ Thanks.


mysql query two database tables, users and usermeta and sort by custom meta int value

I am trying to get an array of site users sorted by a custom meta value (an int). I can query the users just fine and get them back to use in a foreach. I currently have the query results come back sorted already by display_name from the users table. I want it to sort by the custom usermeta value. Any ideas on how to modify this query to get this done?               function get_all_top_members() {         global $wpdb;        $gather_users = "SELECT * FROM ".$wpdb->prefix."users ORDER BY display_name ASC";     $all_users = $wpdb->get_results($gather_users);     return $all_users;     }


Is there a neater way to do this?

So, on most of my sites I tend to create one admin user for myself, and one or more other users for the client. Inevitably I always want to simplify the interface for the client user/s, and I've found myself using a number of clients to achieve this. I'm wondering whether there is a cleaner, faster and maybe easily reusable way to do this, instead of going through the same process of installing plugins and configuring them each time. The most common plugin mix I use is: Adminimize (to remove meta boxes and fine tune some admin elements like disabling screen options) Admin Menu Editor (to hide menu items and create new items) Hide Admin Panels (to hide menu items per user or role) Instead of Hide Admin Panels I can also use Members which gives me the same result, although it is a different plugin altogether. So, the question is whether I could simplify things a bit ahd still have the same kind of control over what different users see in WP-Admin. Thanks.


Uploaded images not displaying in network site

I have a network of sites and have recently added another site. When I upload an image it uploads to the correct directory but is showing a broken image link when viewed within the library or on the site. I checked the site's setting and everything looks correct. file actually uploads to blogs.dir\7\files\2011\03\1551-oct-cable.png broken image link location e.x. http://apollo.site.net/mainsite/kb/files/2011/03/1551-oct-cable.png I really have no idea where to go on this one.


Large Uploads in WordPress

I'm working with a church that uses WordPress to manage their website and podcast. So far, they have a 200-step process every week for publishing the podcast (I exaggerate, but it is a huge step-by-step list). Among other things, they have to:   1. Record the sermon   2. Master the sermon recording   3. Create an MP3   4. Upload the MP3 via FileZilla to their server   5. Create a Sermon (custom post type) in WordPress   6. Link the uploaded MP3   7. Publish the post There's not much WordPress can do about steps 1-3 at the moment, but I'd like to simplify steps 4-6 if I can. I know some online applications are capable of very large uploads (GMail, Dropbox, and the like). Each sermon is 70-80 MB and far too large to process in a simple HTML upload form. Is the Flash uploader capable of managing massive files like this if I max out the PHP filesize restrictions? Is there a better way to handle a large upload within WordPress? Ideally, they'd be able to create a new Sermon (custom post type), upload the MP3 from the edit Sermon page, and have WordPress automatically parse meta information (ID3 tags, duration, etc.). This would lead to a lower barrier of entry for new tech guys ... and I might be able to take a weekend off for once :-) Thoughts? Ideas?


How I can add blog in my magento site?

I have to add a blog in my magento site.Is it possible to integrate wordpress into magento by which we are able to post blog in the wordpress and then display in the magento site. Thanks in advance Pramod


Wordpress two row automatic sub navigation with double wp_list_pages. Is it impossible?

I'm working on large site with top-navigation menu for top-level pages only. Is there any way to make sub navigation menus work as on image attached? I hope the problem is in myinsufficient PHP-skills, not in limitations of Wordpress. ![desired result in balsamic mockup](http://i.stack.imgur.com/aCP7O.png) Top-level navigation menu is made with standard wp-nav-menu. This navigation bar is separate from subnavigation bars. The problem is in the first sub navigation bar (child pages of current top-level pages) and the second navigation bar (child pages of current child page) First line should show all the sub-pages of current top-level page (if there is any), and second line should display sub-pages of current sub-page (if there is any). I'm trying to make it easy for updating and navigating the website, so, that sub navigation show location in the page hierarchy. I tried all the wp_list_pages code examples from Codex, and tried to achieve the desired result with plugin "Custom Menu Wizard", but I couldn't make it work properly. Either only siblings are visible (no parent pages and their siblings) or the whole list of complex hierarchy (not relevant to current page). Is there any way to make this work, or should I use solutions like three-level drop downs?


Featured Posts for Category Pages

I was wondering if anyone knew how to have a different "featured post" based on it's category per category page? For example, if you are on the medical category page, you would see a medical post featured in a special div and so on.


How do I acquire all the meta-information for a particular page I am on?

I am trying to customize behavior for different displays of pages; I know I can use the Template Hierarchy and Conditional Tags to accomplish this. In the process of debugging, though, I'd like to be able to access all the meta- information about a page without having to iterate through all the `is_*` functions. Is there a way to access this meta-information without rolling my own function (which would basically iterate through all the `is_*` functions). It would also be nice if this function had other information in it as well such as page-id, author, category, etc.


How do I add /blog/ as a prefix to permalink structure for blog posts, tag pages, etc.?

I'm using Wordpress 3.1.3 as a full CMS, installed in the root directory of a domain. I have it setup using the built in options to have a static page as the home page, and then my blog at http://www.mydomain.com/blog. What I would like is to have my single blog posts, category pages, archive pages, and tag pages, and any other blog-related pages have the "prefix" of /blog/ in their link structure. So a post URL would be www.mydomain.com/blog/post-title * * * Right now, I only have the category pages working correctly. This was accomplished by adding the following line to my .htacces file: RewriteRule ^category/(.+)$ http://www.mydomain.com/$1 [R=301,L] Then, I set the Category Base to "blog" on the Permalinks Settings page in Wordpress. This gives category pages the URL of: www.mydomain.com/blog/category-name (without removing the category prefix in .htaccess, they had the URL category/blog/category-name). * * * In an attempt to get this working for the other things I want it to work for, I set my Tag Base to "blog." I also made my Custom Permalink Structure: /blog/%postname% (as suggested by a few threads I've found searching on Google). These settings give the URLs for the single blog posts, tags pages, and archive pages the URL structure I'm looking for. However, it makes them all lead to 404 errors. I deleted my .htaccess file to ensure Wordpress was writing to it, and it is. If I remove the /blog/ from the permalink structure, everything works correctly, but I no longer have the URL structure I'm looking for. I'm at a loss as to what I should do. I keep reading threads and guides saying this is as simple as adding /blog/ to the permalink structure, but so far it hasn't been nearly that simple. I would be very grateful if anyone knows how I can get this to work. .htaccess contents:               <IfModule mod_rewrite.c>     RewriteEngine On      RewriteBase /      RewriteRule ^index\.php$ - [L]      RewriteCond %{REQUEST_FILENAME} !-f      RewriteCond %{REQUEST_FILENAME} !-d      RewriteRule . /index.php [L]      </IfModule>


Adding rich text editor to my plugin

Hello Wordpress users, I'm trying to add a rich text editor to my own plugin. So I googled it first of course and I found serveral answers like: http://www.dev4press.com/2010/tutorials/wordpress/tips/add-rich-text-editor- to-your-plugin/ http://stackoverflow.com/questions/10377496/add-rich-text- editor-in-wp-plugin This code displays nothing so I tried finding a another solution: http://wordpress.org/support/topic/adding-rich-text-editing-to-your- plugin?replies=15 This displays a rich text edtior like : http://oi35.tinypic.com/mwcsug.jpg This seems to work fine, but as soon I switch to the WYSIWYG tab the text I inserted is deleted, I only see a blanco field and I can't type anything. Is someone familiair with this problem? Is this a bug or what can I do to make it work? FYI these scripts and styles are included in my plugin:               function highlights_style() {         wp_enqueue_style('thickbox');     }          function highlights_script() {         wp_register_script( 'jquery.js', HIGHLIGHTS_PLUGIN_URL . 'jquery.js', array('jquery','media-upload','thickbox'));         wp_enqueue_script( 'jquery.js' );              wp_enqueue_script('media-upload');         wp_enqueue_script('thickbox');         wp_enqueue_script( 'editor' );              wp_enqueue_media();              add_action( 'admin_head', 'wp_tiny_mce' );     }      And I use this to display the editor:               the_editor( '' , 'content' );      I hope someone can help me! Thanks!


How can I redirect this contact form to a specific permalink

I'm converting a HTML site to WP for a client and they have a simple contact form in place. If the submission is sucessful it currently, in it's HTML form, sends them to thankyou.html but I want to be able to send it to a custom permalink (Ie; to a page with the ID of 8) within the new installation, is it possible with the following code?               if (isset($_POST['submit']))     {     $to = "DESTINATION@EMAIL.COM";     $subject = "Web Site Form Enquiry";     $name_field = $_POST['contactname'];     $address = $_POST['address'];     $phone_field = $_POST['phone_no'];     $email_field = $_POST['email'];     $enquiry = $_POST['enquiry'];          $headers = "From: $email_field \r\n" . "X-Mailer: php";     $body = "From: $name_field\r\n Address: $address\r\n Telephone: $phone_field\r\n E-Mail: $email_field\r\n Enquiry:\r\n $enquiry\r\n";          if (mail($to, $subject, $body, $headers))     {         // This needs to change to the permalink of a page with the ID of 8             header('Location: ../../thankyou.php');     }     else      {         // This needs to change to the permalink of a page with the ID of 12         header('Location: ../formerror.html');     }     }


Add custom classes to TinyMCE generated markup

Is there a way to add custom classes to the markup that the tinyMCE WYSIWYG editor? Obviously, I could apply any styles by targeting the post/page wrapper, but my concern is getting markup to play well with certain javascript plugins and responsive layout classes. Can the wordpress visual editor be enhanced like that?


Multiple custom fields with the same name

Is it possible to have several custom fields with the same name? For example, I have a custom field called "promotion" for a CPT called "event". Sometimes there are more than one promotion applied to the same event, each for a certain type of participant. So I'd like to have one "promotion" custom field with a value "X, A" and another "promotion" custom field with a value "Y, B". I tried to create this then retrieve it with `get_post_meta()` and display the result with `print_r()`, but all I get is one of the values only ("X, A"). Here's the code:               $event_promotion = get_post_meta($post->ID, "Event Promotion", true); print_r($event_promotion);      Perhaps it's just not possible to proceed this way?


Checking if field is set before comparing with meta_query in query_posts?

I have a query set up to compare the start and end dates for some custom fields. The start date is required for the post; however, the end date is not. This causes some issues with the following:               query_posts(         array (             'meta_query' =>                 array(                     array(                         'key' => 'start_date',                         'value' => $date,                         'compare' => '>=',                         'type' => 'DATE',                     ),                     array(                         'key' => 'end_date',                         'value' => $enddate,                         'compare' => '<=',                         'type' => 'DATE',                     ),                 )         )     );      This query works fine when the end date has been set on the post; however, when it hasn't, the post will not get queried at all. Is there a way to check first if the field exists first before doing the <= DATE compare?


Redirect after empty login username and password

I have chosen to display a login form in the first page of my wordpress website. If the user logs in successfully, he gets redirected to a specific webpage. If he enters a wrong password, he gets redirected to the login page again. The problem happens when someone does not enter username and password: he gets redirected to the wordpress admin login page. How can I redirect empty username logins back to the main login page ? this is the code I am using to redirect failed attempts :               add_filter('login_redirect', '_catch_login_error', 10, 3);          function _catch_login_error($redir1, $redir2, $wperr_user)     {         if(!is_wp_error($wperr_user) || !$wperr_user->get_error_code()) return $redir1;              switch($wperr_user->get_error_code())         {             case 'incorrect_password':             case 'empty_password':             case 'invalid_username':             default:                 wp_redirect(home_url()); // modify this as you wish         }              return $redir1;     }


Diplaying widgets causes responsive slider to not show up

I'm making a custom home page template. On the top I have an image **slider(using the Responsive slider plugin)**. Than I query some posts and after that I want to include one of my widgets. The problem is if I add the get_sidebar() call or display just one single widget(using Widget Instance plugin's shortcode), the slider is gone. I mean it does not get loaded. The entire page loads ok, javascript works, jquery works.. everything works except the slider. If any more info is needed, just comment and I'll add.


Display products from specific category in shop page

I know many people asked for this question but I didn't find a proper way to do it. How to add a simple meta_query (product_cat) before the execution of the shop page's query. Maybe by using a filter ? Regards, Adrien


Search post in all blogs in WPMU?

Is there a coding doc or tutorial to create a SEARCH where it search post in all Blogs in WPMU that will place in WPMU primary site SEARCH?


Protect custom php file with login

I've developed a php app and I'd like that it's restricted to WP users (use WP like a private area). Is there a way to use WP `is_user_logged_in` function in a custom file (i.e. `www.mysite.com/app.php`)? where should I put the folder with the app ? I tried but the page is not recognized.. (`.htaccess`?)


Dynamically changing navigation links (next and previous) via AJAX

In my wordpress site, I have inside the loop of single.php , a select tag in which the options are the posts of the current category returned via a custom query. On changing selected option, I have many javascript functions that are working well, but the last function among them (function f_next-previous), doesnt seem to work. The aim of this function is to update the next and previous links without reloading the page. The code relative to navigation links (next and previous) in my template is working well and is above:

<?php previous_post_link( '%link', '' ); ?>

<?php next_post_link( '%link', '' ); ?>

      The javascript code of this function is:               function f_next-previous(id)     {            $.ajax({              cache: true,              type: "GET",              timeout: 5000,               url: 'wp-content/themes/twentyten/pages/next-previous.php?p='+id,              success: function(msg)               {                $('#nav-above').html(msg);              },           error: function(msg)           {              alert("Your browser broke!");                 return false;         }       });          }      The file next-previous.php content is :               <?php     $p=$_GET['p'];      require( '../../../wp-load.php' );                    $my_query = new WP_Query();     $my_query->query(array( 'post__in' => array($p)));          if ($my_query->have_posts()) : while ($my_query->have_posts()) : $my_query->the_post();  ?>
<?php previous_post_link( '%link', '' ); ?>

<?php next_post_link( '%link', '' ); ?>
          <?php          endwhile;     endif;          ?>      While testing this php file by giving it a value to the p parameter, it gives logical result in the browser. Jquery and function scripts are well included and all AJAX in my website is ok. What am I missing in this work????


How do I redirect users after submitting a topic for moderation?

I'm using bbPress (Version 2.5.3) with the plugin bbPress Moderation (Version 1.8.3) on WordPress 3.8.1. After a user submits a new topic for moderation, the forum shows up again without the new question, and with no explanation that the question is awaiting moderation. Can I redirect the user to another URL with an explanation?


wordpress get meta value by meta key

How to get the meta value by meta key I want to get the value by the meta key. This is what I have tried so far:                  $args = array(         'post_type' => 'post',         'post_status' => 'publish',         'posts_per_page' => -1,         'meta_key' => 'picture_upload_1'     );     $dbResult = new WP_Query($args);          var_dump($dbResult);      but I am not receiving the meta value


I can see comments but I can "reply" please help

Here is my Custom Post Type               'supports'        => array('premise-member-access', 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments'),      Comments enabled on settings->discussion Comments enabled on lesson page ✓ Allow link notifications from other blogs (pingbacks and trackbacks) ✓ Allow people to post comments on new articles With this code I still get comments closed               comments_template('/templates/comments.php');      Weirdly enough the comments are open on my localhost but only when I echo it on the top not when I put it in the bootstrap tabs Please help need this in order to complete my MVP http://competeleap.com/courses/keywords-spy-on-your-competitors/1 Also here is the comments code on my single-lessons.php page               <?php     global $withcomments;     $withcomments = 0;     global $postid;     $postid = get_the_ID();          comments_template('/templates/comments.php', true);               ?>      I am using roots.io for my theme but already went over it with them and this problem is not roots related. Let me know if there is anything else that I should post in order to get help from you guys, thanks in advance.


Custom Post Type vs Shortcode: Which one is more performant?

I am designing a Wordpress blog where I will have two types of posts: a. Normal posts; regular posts with a number of text paragraphs   b. Posts with table content, where the table structure will be more or less like http://click.apache.org/docs/user-guide/html/images/introduction/simple- table.png Knowing that normal posts will be the regular Posts > Add New from the admin area. I came up with two solutions for the table-type posts: **Solution A** A custom post type. My knowledge of custom post types is very limited but I believe I would need to create the custom post type, a template for it as well as any custom fields I may need **Solution B** Shortcodes, where I treat posts with table content just like regular posts only that where I want to place the table I will use a string such as:               [PEOPLETABLE]231|Albert Master|albert.master@gmail.com|Bonds     210|Alfred Alan|aalan@gmail.com|Stocks     256|Alison Smart|asmart@biztalk.com|Residential Property[/PEOPLETABLE]      The html in the post will then be rendered by passing this string to a shortcode where the parsing will take place and the HTML generated. Am I right in saying that Solution B is faster as it does not involve custom templates and custom fields?


Display a tag before the menu list content

Is that possible to insert a text before the menu items? In this case, I want to lead a `<h3>` tag for the list content (like a menu title). I tried the `if/else` to recognize that the menu have content and show the title. But if the menu have no content, so it should not have to display the title. Here it is:               $args = array(       'menu'        => 'Destination • South America',       'echo'        => false,       'fallback_cb' => '__return_false'     );          if (empty($args)) {       echo "

";     }else{       echo "
South America
";     }     echo strip_tags(wp_nav_menu( $args ), '
');      Because I have content, so It should output: **South America**   Argentina   Brazil   Chile   Colombia   Equador   Uruguay   Venezuela   If I would not have any content, so it should not display the **South America** Thank you!


WordPress salts set in config and database

I have come across the following code in a new clients existing website in `wp-config.php`               define('AUTH_KEY',         'put your unique phrase here');     define('SECURE_AUTH_KEY',  'put your unique phrase here');     define('LOGGED_IN_KEY',    'put your unique phrase here');     define('NONCE_KEY',        'put your unique phrase here');     define('AUTH_SALT',        'put your unique phrase here');     define('SECURE_AUTH_SALT', 'put your unique phrase here');     define('LOGGED_IN_SALT',   'put your unique phrase here');     define('NONCE_SALT',       'put your unique phrase here');      I searched online and found a post that suggests if the keys and salts are duplicated in the config then WordPress will generate new salts and keep them within the database. This appears to be true as there are records within `wp_options` table with the salt names and values. Primary question: Is 'WordPress keeping salts within the database' a security risk? Care to explain: Is there a reason why they are primarily in the config file and should I replace the config file values with the database ones and remove the database values?


Site goes back to homepage when you dont include the www

I have made multiple pages in my Wordpress site but whenever I go to these pages without the www in the beginning the site always redirects to the homepage. I know if i was getting an error it would be something with the DNS but these pages just go back to the homepage. Not sure what I did wrong in the configuration.


Use admin notices to show errors

I'm using the `transition_post_status` hook to perform some operations after publishing a post. If an error occurs, I would like to use the admin notices to show a message to the user:               add_action('admin_notices', 'wpsites_admin_notice');          function wpsites_admin_notice() {        $screen = get_current_screen();             if ('post' == $screen->post_type) { ?>           <div class="error">              <!-- error message -->           </div>        <?php }     }      But inside `wpsites_admin_notice`, How can I access the errors generated in the `transition_post_status` hook?


Using Multiple Themes in a Single WordPress Site?

I've got a subdirectory in which I'd like to implement a completely different theme for my site (basically, its a sales letter). Can someone tell me how to do that? Do I need to install a separate copy of wordpress in the subdirectory?


Resolving a 500 Error with GoDaddy Hosting?

I have a WordPress site on godaddy hosting and I'm getting intermittent 500 internal service errors. I've tried editing permissions and `.htaccess`, but the problem still abounds. Anyone else had similar issues that you've solved?


In the Edit Post page how do I modify with jQuery the status select list?

Here is my JS:               jQuery('#post_status option[value="draft"]').text('Approve');      I simply trying to modify the text inside the option element in the status select form element in the Edit Post page. For some reason it does not work. I am using 'admin_footer' action to add the JS. Maybe there is another way? I also tried this:               jQuery('#post_status option[value="changes-required"]').prop('selected', true);


add_theme_support( 'custom-header' ) does not add option menu in dashboard

I'm writing a new theme from scratch, based off the Toolbox theme. My installation of WP is straight out of the box. I added add_theme_support('custom-header'); to my functions.php file, but the "header" options screen does not appear in the dashboard. I can see it if I visit the site, in the toolbar at the top, but not in the dashboard. Am I missing something?


add_image_size and iPad Retina Display (high pixel density)

i was just wondering if anyone has come up with or thought about a solution for inline images and the new iPad coming out. i would love to use a combination of add_image_size and this jQuery Script (https://github.com/mcilvena/jQuery-Retina-Display-Plugin) to pull this off. basically, we have content contributors in the office that would upload an image at say 900 x 900 pixels, and then the system would keep one large image for the retina display and then generate another image at 50% of that size for normal displays. just curious if anyone has seen this being done. Cheers!


Multisite Login Issues

I'm trying to set up Wordpress Multisite properly and I've got all the sites up, but only the primary domain's wp-admin can be accessed. I've seen various fixes for it but they only cause bigger issues. I've tried adding the following to wp-config.php, as per the instruction of several blog posts stating that this was a fix:               define('ADMIN_COOKIE_PATH', '/');     define('COOKIE_DOMAIN', '');     define('COOKIEPATH', '');     define('SITECOOKIEPATH', '');      However, when I add those lines, I receive the following error:               The constant “COOKIE_DOMAIN” is defined (probably in wp-config.php). Please remove or comment out that define() line.      I found a fix for that error that stated moving domain_mapping.php to wp- content/mu-plugins (or wp-content/plugins) is supposed to fix that error, but it did not. I'm at a loss for how to proceed. I do think it has something to do with my domain mapping settings but I don't know how to fix that. I've added some of my domains (50 total) to test with, but I don't see how they're mapped to anything with the sparse configuration for each available in Wordpress. Any help is appreciated.


How to split up the_title and insert a span tag

My titles, site wide, will follow this theme all within a h1 tag: Main title heading / Sub-title text I'm trying to wrap a span tag around all text after and including the '/' so my markup will look like this:
Main title heading / Sub-title text
      How do I accomplish this? I'm not great with PHP but I've tried playing with explode but can't get the end result all I end up doing is hiding everything after the '/' **EDIT:** Code removed & Pastebin created, this is my whole page for index.php: http://pastebin.com/0T9mt7Fu


Creating a wp_editor instance with custom tinyMCE buttons

Is there a way to define `wp_editor()` with custom tinyMCE buttons? I've noticed the wp_editor function reference mentions that one of the `$settings` arguments can be `tinymce (array) (optional) Load TinyMCE, can be used to pass settings directly to TinyMCE using an array()`. My page uses a number of different instances and I'd like to add certain buttons to certain instances. For example,               Instance #1 : Standard buttons     Instance #2 : bold, italic, ul + (custom) pH, temp     Instance #3 : bold, italic, ul + (custom) min_size, max_size      Does anyone know how I'd go about doing this if I've already registered the buttons as tinyMCE plugins as per this tutorial? * * * **EDIT** Here's the code I'm using in my plugin file to get this working:               function add_SF_buttons() {         if ( ! current_user_can('edit_posts') && ! current_user_can('edit_pages') )             return;         if ( get_user_option('rich_editing') == 'true') {             add_filter('mce_external_plugins', 'add_SF_buttons_plugins');         }     }          function add_SF_buttons_plugins($plugin_array) {         $plugin_array['pH'] = $this->plugin_url . '/js/tinymce_buttons/pH.js';         $plugin_array['pH_min'] = $this->plugin_url . '/js/tinymce_buttons/pH_min.js';         $plugin_array['pH_max'] = $this->plugin_url . '/js/tinymce_buttons/pH_max.js';         return $plugin_array;     }      -               if (isset($SpeciesProfile)) {         add_action( 'init' , array (&$SpeciesProfile, 'register_species' ));         add_action( 'init' , array( &$SpeciesProfile, 'register_species_taxonomies' ));              add_action( 'init', array (&$SpeciesProfile, 'add_SF_buttons' ));     }      -               <?php wp_editor( $distribution, 'distribution', array( 'theme_advanced_buttons1' => 'bold, italic, ul, pH, pH_min', "media_buttons" => false, "textarea_rows" => 8, "tabindex" => 4 ) ); ?>      Unfortunately, this doesn't work - the above editor simply displays the same buttons as every other instance on the page. * * * Thanks in advance,


Can't give tags rels

In my Wordpress post I click on edit post and skip over to the html editor tab and click on it. I have a pre on that page and when i give it a rel and publish its all fine but when I skip back over to visual editor it just takes out the rel attribute.


custom field to always to .get_the_title()?

Is there a way to have always the `the_title();` tag also includes a custom field called subtitle? I want to have a title like this: "subtitle-custom-fild: Posttitle" Like "Cool: The new TV show from Werner Herzog." in this case, cool would be the custom field value, and "the new TV...." would be the_title(). I am getting this at the moment with the following code:
<?php $values = get_post_custom_values("myCustomField"); echo $values[0]; ?>: <?php the_title(); ?>"><?php $values = get_post_custom_values("myCustomField"); echo $values[0]; ?>
<?php the_title(); ?>

      The Problem is, that google indexes the posts sometimes with the custom field in title, sometimes without it - which in some cases makes no sense. I also gave all possible "title tags" the complete title the same way in the "title=" attribute.... Is there any way to tell wordpress - if theres a custom field subtext - print it always in front of the post_title? Thank you! AD


Extracting post categories

I'm in the middle of assisting a colleague in reconfiguring a Wordpress database for use on another platform. The database is essentially details regarding all the posts and accompanying metadata, etc. One of the things I'm stuck on is determining how to correlate each post with its Wordpress category. Essentially, I'd like to be able to pull out every post with its corresponding category into a spreadsheet, and to be able to do that, I clearly need to know their relationship within the tables. Can anyone point me in the correct direction? Any help would be sincerely appreciated. Thank you.


Adding a tooltip above Categories postbox in Post Editor

I'm looking to add an onmouseover tooltip link above the categories postbox/widget in the post editor screen of the Wordpress backend to help further clarify to the users on my site which is the most suitable category to post in. Does anyone have a simple and elegant solution that avoids hacking the core files? First I want to add the text: ![Add text.](http://i.stack.imgur.com/xo8s9.png) Then I want to add a Tool Tip like this when some one hovers the mouse over that text: ![Tooltip](http://i.stack.imgur.com/ImOru.png)


Restrict access to specific content

I need to create several users in WP and to restrict their permissions to specific contents. For example: I create a custom content type called "Cook Profile" with several text fields and the possibility to insert attachments. User Foo must access only his own Cook Profile. In add he must be able create posts, but he can only delete or modify his own posts. Is that possibile? Is there a plugin that make this possible? Thanks


How do you add a custom link to the wordpress login page?

http://redrokk.com/wordpress/wp- content/uploads/2012/07/blank_wordpress_login_form1.png I want to add a custom link before the 'Lost your password?' link. I'm currently using a function that has some css to style my wordpress login page(I don't have a separate page for the login page). Any thoughts on how to do this?


WP 3.1 meta_query for multiple custom field values

I'm trying to use some conditional logic to compare custom fields in my query, but a bit stuck. How would I get all posts with ReleasedProject AND PermanentArtist set to 'true'? Here's what I have so far, I'm assuming it's something to do with 'compare': Thanks osu **EDIT** : To clarify what I want to do - I'm trying to exclude pages that have two custom field values (ReleasedProject and PermanentArtist in this case) set to 'false'. These are set through checkboxes generated using the plugin Custom Field Template. I've updated the code to illustrate that I need to filter out all pages with these two custom fields set to false:               global $post;     $artist_args = array(         'post_type' => 'page',         'post_parent' => $post->ID,         'posts_per_page' => -1,         'orderby' => 'name',         'order' => 'ASC',         'meta_query' => array(             array(                 'key' => 'ReleasedProject',                 'value' => 'false'             ),             array(                 'key' => 'PermanentArtist',                 'value' => 'false'             )         )     );     $my_query = new WP_Query($artist_args);


delete attachment for one post without deleting actual attachment post

I'm writing custom ajax calls for media attachments from **FrontEnd** , I have everything read to use, except the actual logic. I'm using WP E-Commerce plugin, where I want many images for one post. And I want to use thouse images on variose posts. consider case: I have created product and uploaded 3 images for this product. Now I create another product and use one of the (3) uploaded images as this product image. Then I go to first product and delete that image I copied for the second product. Of course That will delete it for second product too. That's why I'm trying to find a solution where I can just unset/uncheck/delete_for_that_post thing. or maybe I don't get how it works? Could someone direct my to the right direction? Summery question would sound like this: Can I use I media attachment for many products? thanks


Only display post content in search results

How can I just show the post content in a search result? Currently, the search results displays the post title, author and date above the page content. Here is how it looks now: http://sikkervaccination.dk/?s=thailand


Hook custom post type (ai1ec_event) to update transposh language

I'm using All-in-One Event Calendar and Transposh on a website that is designed to import content from websites all over the world, and automatically translate them. Right now any event that is imported will automatically be placed in a category (for instance, 'japanese-events'). I'd like to place a hook that sets the transposh language depending on the category.    I've done this for regular posts:               <?php     add_action( 'publish_post', 'set_transposh_language',10,2 );     function set_transposh_language($post_id, $post)     {     if (in_category( '<category name>', $post_id )) update_post_meta($post_id, 'tp_language', '<language>');     ?>      But I can't get it working for ai1ec_event post types, so any help would greatly be appreciated!       edit: S_HA_DUM mentioned using $post data, unfortunately I don't understand how to use this. I tried (unsuccessfully):               global $post;     $event = new Ai1ec_Event( $post->ID );     if (has_term( '<category name>', $event)) update_post_meta($post_id, 'tp_language', '<language name>');


Moving WP installation form subdomain

I have a WP installed on a subdomain blog.domain.com. What do I have to do in order to get it moved into domain.com/blog directory?


How to display the content HTML of a page without displaying the gallery code as well

I am using the below to fetch the content of a page by its name and output the html                 $my_wp_query = new WP_Query();       $page = $my_wp_query->query(         array(           'post_type' => 'page',           'name' => 'some-page-slug'         )       );       $page = $page[0];            $page_data['content'] =  apply_filters('the_content', $page->post_content);      The field `$page->post_content` unmodified contains a string with the content I have typed in the backend as well as a reference to the gallery in the form `[gallery="1,2,3,4"]` at the end of the string. When I run it through the `apply_filters('the_content', $page->post_content)` method, it restores the HTML tags such as the `<p>` elements, however it also includes the gallery code which has its own style and quite lengthy markup as illustrated below.
Residential Gallery. Etiam lobortis sapien vel erat sodales et suscipit leo pretium. Pellentesque a arcu sed velit congue sagittis ac vel erat. Curabitur non felis leo, vel vestibulum purus. Donec eget velit eget magna rutrum facilisis. In hac habitasse platea dictumst.

Quisque sit amet pellentesque risus. Aliquam erat volutpat. Ut at magna justo, tincidunt viverra odio. Pellentesque a arcu sed velit congue sagittis ac vel erat. Curabitur non felis leo, vel vestibulum purus. Donec eget velit eget magna rutrum facilisis. In hac habitasse platea dictumst. Quisque sit amet pellentesque risus. Aliquam erat volutpat.

Ut at magna justo, tincidunt viverra odio. Curabitur non felis leo, vel vestibulum purus. Donec eget velit eget magna rutrum facilisis. In hac habitasse platea dictumst. Quisque sit amet pellentesque risus. Aliquam erat volutpat. Ut at magna justo, tincidunt viverra odio.

      I would like to only retrieve the HTML text with `<p>`'s etc and not the gallery's `<style>` and `<div>` tags. How might I achieve this?


Custom Field Multiple Clauses

I am having a weird situation, I have two meta keys in my custom posts. Start Date and End Date, In simple SQL, I want to execute following query `where startDate > '2013-12-10' and (startDate <= '2013-12-10' and endDate >= '2013-12-10')` I am basically looking for posts which are between a range of startDate and endDate and should show further posts also. I have tried this code, don't know whether its correct or not but tried and it didn't threw any error:               $args = array(         'posts_per_page' => 100,         'post_type' => 'create_events',         'meta_query' => array(             'relation' => 'AND',             array(                 'key' => 'startDate',                 'value' => date('Y-m-d'),                 'compare' => '>'             ),             array(                 'relation' => 'AND',                 array(                     'key' => 'startDate',                     'value' => date('Y-m-d'),                     'compare' => '<='                 ),                 array(                     'key' => 'endDate',                     'value' => date('Y-m-d'),                     'compare' => '>='                 ),             ),         'orderby'  => 'meta_value',          'meta_key' => 'startDate',         'order' => 'DESC'         )     );     query_posts($args);      Might be my logic be wrong,


Randomly pick one testimonial post

I want to show one randomly picked testimonial on a page. Each testimonial is a post with a category of 'quote'. Each post has a custom field named 'who' with a name. I'm trying to use this code.
           <?php           $quote_args = array(                     'post_type' => 'post',                     'category' => 'quote',                     'orderby' => 'rand',                     'showposts' => 1                 );                      $quote  = new WP_Query($quote_args);                      if($quote->have_posts()):                     while($quote->have_posts()):                         $quote->the_post();                                     ?>
                                     <?php echo the_content(); ?>                                     <?php echo get_post_meta($post->ID, 'who', true); ?>


unused post IDs

Recently I installed plugin called Delete-Revision and noticed that every post has registered few post IDs. I usually use save drafts and update post a few times when I write a post. Here's the screenshot http://i.stack.imgur.com/0pqgx.png . As you see I have 53 posts and Wordpress already registered 646 post IDs. How can I stop it and clear unused IDs?


Allow users to upload flash videos?

I would like to allow users to upload videos to their profiles. I'm using the couponpress theme for wordpress, which is a coupon listing theme. It lets users upload images for their coupons or advertisements, but some of the users on my site have video (flv/swf) ads that they want to list instead of a still image. I need to be able to upload a video for users. Does anyone know of a plugin or solution to achieve this? Thanks a lot.


Retaining old HTML archives and displaying themes conditionally

I am converting a website from straight html (with tables! Ugh!) to WordPress. The company has a new design every year, and but keeps an archive of their old site(s) with the old design(s) on their website, so people can look back over the years. **Keeping the old HTML archives on a WP site**   What would you recommend to keep the old HTML archives? WP doesn't play well with serving up plain HTML pages. I don't really want to go to all the trouble of creating a decade's worth of sub-domains and hosting the archives there (eg, 2009.mydomain.com, 2008.mydomain.com) because then I'll have to go through all those html pages and update any references to the archives as well (not really a problem with `grep` and `sed`, just a pain to do). However, thats really the only way I can think of doing it effectively. **Keeping the "annual archive" system**   Once the old archives are up and running, how do I "maintain" this system in WordPress? I know WP does a nice archive system, but I'd need to show all the 2011 posts and pages with the 2011 design, all the 2012 posts/pages with the 2012 design. My thought was display themes conditionally -- maybe to add a custom field to each post/page and add a function that checks the custom field and serves the appropriate CSS file. Of course, this requires that the theme templates don't really change much from year to year. Or perhaps change entire themes, conditionally (easy enough to copy this conditional function to every theme). Is there a better way of doing this? The other option I thought of was to export the year to be archived to HTML and serve it up as (eg) 2011.mydomain.com. However, then you lose the ability to search through posts/pages, etc. This is particularly annoying as there is a whole custom- post system planned, and archiving the site annually will kind of negate the benefit of the custom-post taxonomies. I'd prefer to keep the wordpressiness and perhaps just use Apache redirection of future "subdomains" to the appropriate archive, to keep a consistent feel across the site's archives (don't want half the archives accessed via 2006.mydomain.com and the future archives from mydomain.com/archives/2012). I hope I have explained this relatively clearly. Any suggestions would be welcome.


Trim posts from WP-Query?

I wish to show in my front page a number of posts determined by the following criteria: show all posts from current month (actually from the month corresponding to the most recent post) ; but if that number is less that (say) 8, then show the 8 most recent posts. Assuming that I know that no month will have more than (say) 20 posts, I'd tought of setting posts_per_page = 20, grab normally the most recent 20 posts, and afterwards do the appropiate trimming (slice) in php. (To do it in SQL seems too convoluted) BTW: at first I thought that `add_filter( 'posts_results', ... )` would be appropiate, but it's difficult to discriminate there whether the query corresponds to the main loop, or to some other query (eg., the Most-recent- posts widget...). I then coded the logic in the theme, in the `index.php` template. The problem is that WP-query does not seem to support -cleanly- a trim of the posts... I must manually reassign the `posts` and `count` attribute (I think that the `rewind()` method should recompute the `count`, but...) Do you feel this is too dirty? Any other ideas?


ShortCode and extra </p>

[box id='1' text="some texte"] the shortcode, at one point is outputting text the html result is : `</p> some text </p>` There is an extra closing paragraph in the start and and opening at the end... WHY ? where those come from ?.... any idea ?.. it screw my w3 validation ! ** note i have found that... but look all "patched" to me...any clean solution... wp is dirty ? reference


meta_query on a date range using an array of values

How can I do a query to return the post if the custom field array contains a date that is within the specified range? The query below is basically what I am after but it does not work...               // the income_dates array looks like this     // a:3:{i:0;s:10:"2014-02-01";i:1;s:10:"2014-03-01";i:2;s:10:"2014-03-29";}          $today = date("Y-m-d");     $date1 = date("Y-m-d", strtotime($today . "-1 Month"));     $date2 = date("Y-m-d", strtotime($today . "+1 Month"));          $args = array(         'post_type' => 'income',         'meta_query' => array(              array(                 'key' => 'income_dates',                 'value' => $date1,                 'type'  => 'date',                 'compare' => '>'             ),             array(                 'key' => 'income_dates',                 'value' => $date2,                 'type'  => 'date',                 'compare' => '<'             ),         )     );


metabox upload file

I have a custom meta filed with upload file functionality but the problem is I can't get the fileurl button value when hit "insert into Post" below are my jQuery code                   window.send_to_editor = function(html)               {             dlink = jQuery('button.urlfile',html).attr('title');             jQuery('#download_link').val(dlink);             tb_remove();         }                   tb_show('', 'media-upload.php?post_id=1&type=image&TB_iframe=true');         return false;


Passing variables through permalink structure

I have a WordPress page which is accessible via /accommodation/. What I want to be able to do is pass in a parameter using the URL - ie going to /accommodation/value1/ would load the same page as /accommodation/ - but still show the /accommodation/value1/ in the browser address bar. I guess another way of putting it would be to say I need to be able to access /accommodation/ by adding anything I like to the end of the URL, whilst retaining the URL I entered in the browser window. I've then got some code in the page template which does different things based on the values passed into the page. Whilst I could use a query string, I want to avoid doing that so I can keep the "pretty URLs". Many thanks for any help / suggestions.


WordPress Loop Through Particular Pages

I have the following code setup as a page template and assigned to a page:                       <?php if ( have_posts() ) :              while ( have_posts() ) : the_post(); ?>                 <?php                 echo $post->ID;                 $thumb = get_post_meta($post->ID, 'Thumbnail', true);                 ?>
<img src="<?php echo $thumb; ?>"
                               <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php the_title(); ?>
                          <?php the_excerpt();  ?>                          <?php the_content(); ?>
                  <?php endwhile; ?>         <?php endif; ?>      I curently have this page template on post=21. Now this all work fine but it only works for the page this template is assigned to. I actually don't want this to be part of a template but I just want to use the code within my index.php file but I actually would like it to loop through these pages, i.e. 21,22,23 only, inorder to retrieve the info I have requested here. Can someone please assist on how to pass the page id into this loop or how to make it loop just through pages 21,22 and 23. This has got me stuck. Thanks.


What to hook into to check a value before a post is published?

My website is set up with pages as categories, meaning that if a user publishes without choosing a category, no one can see the post unless they know the specific address. What do I need to hook into in order to check if a category is chosen after the "publish" button is pressed but before the post is published publicly?


How to set up a simple email subscription?

I am working on a new Wordpress site, and I want to have a placeholder "under construction" page while I'm setting it up that has a link to subscribe to an email service. The subscription service would be used to tell users that the real website is live. Here is an image of the placeholder page I made: http://i.imgur.com/ZTHPILD.png How would I set up the email subscription service (what method would be easiest and make the most sense for this purpose)?


Problem retrieving informations and displaying desired structure with custom post type and taxonomy

I have to create a website with a part concerning houses, grouped by type. I thought of using custom post type "house" and custom taxonomy "house_type".               function custom_post_house() {         $labels = array(             'name' => __('house'),             'add_new' => 'Add new house',             'add_new_item' => 'Add new house',             'edit_item' => 'Update house',             'menu_name' => __('house')         );         $args = array(             'labels' => $labels,             'public' => true,             'show_in_nav_menus' => true,             'menu_position' => 5,             'show_ui' => true,             'show_in_menu' => true,              'capability_type' => 'post',             'hierarchical' => true,             'with_front' => true,             'supports' => array( 'title', 'editor', 'thumbnail', 'excerpt'),             'has_archive' => false,         );         register_post_type( 'house', $args );     }     add_action( 'init', 'custom_post_house' );          function taxonomies_house() {         $args = array(              'hierarchical' => false,              'label' => 'House type',              'query_var' => true,              'rewrite' => true,             'show_admin_column' => true ,         );         register_taxonomy( 'house_type', 'house',  $args);     }     add_action( 'init', 'taxonomies_house', 0 );      i've created some house type (type1, type2...)   - some houses to which i have attributed a house type               house 1 => type1     house 2 => type1     house 3 => type2     house 4 => type3     house 5 => type1      What i need to have (what my client wants) A menu like this :               -Home     - Houses & Services -type1 => list of all type1 houses                         -type2 => list of all type2 houses                         -type3 => list of all type2 houses     - Other menu...      When i'm a house page, i need to have in the sidebar, the link of all the other houses of the same type. For instance : if i am in House1, i want to display the links of "Type1 house" => house1, house2, house 5 I've created as many pages as house type with a template :               <?php     /**      * Template Name: House type 1      */     get_header(); ?>

     <?php     wp_reset_postdata();      $args = array (         'post_type' => 'house',          'orderby' => 'meta_value',          'house_type' => 'type1', //specific to a house type         'order' => 'DESC',          'posts_per_page'=>'-1'     );     $query = new WP_Query($args);     $i=0;     echo '
';     while ( $query->have_posts() ) : $query->the_post();     ?>
<a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Read %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark">
<?php the_post_thumbnail('medium'); ?>

<?php the_title(); ?>

     <?php      $i++;     endwhile;      echo '
';     ?>

     <?php get_footer(); ?>      If i put theses specific pages in the menu, i've got the right lists. BUT i have several problems : 1) **I have to create as many templates as house type** (because of the taxonomy filter 'house_type' => 'type1' in the previous example. => Is there a way to avoid this, to achieve my goal ? 2) **When i'm on the house page, how to display the links of the house with the same house type ?** I've tried get_taxonomies, get taxonomy, wp list categories, but this doesn't seem to retrieve the information i need (or i cant see how). 3) The client wants a breadcrumb. But this structure (custom post called in a page template) messes with the breadcrumb : Instead of having               Home > Houses & Services > Type1      i have               Home > houses (the custom type name) > house1      I've tried several breadcrumb plugins but they all fail to display the correct path. **has anybody used this kind of structure with a working breadcrumb ?** Thanks in advance


Echo possibly causing custom template formatting conflict

I've created custom PHP code which allows for user input from two dropdowns and queries a database to return listings which are displayed on a page. The PHP code works fine as a standalone: Here. The problem comes when I add it to a custom Wordpress template. The code breaks the template formatting and ends up looking like this. Notice the second dropdown and the confirm button are gone. I've narrowed the problem down to a PHP echo statement that returns the choices for the first dropdown. Though I can't figure out why it's causing the problem. I'm happy to provide more details if needed. thanks! The code for the custom template is below.               <?php     /*     Template Name: Jobs Child Page of Parent 2     */          get_header();      the_post();     ?>          <?php     if (isset($_GET['cat']))     {     $cat = $_GET['cat'];     }     else     {     $cat = "0";     }     if (isset($_GET['type']))     {     $sub = $_GET['type'];     }     else     {     $sub = "0";     }     ?>

                       <?php if(function_exists('bcn_display'))                       {                            bcn_display();                       }?>

                         <?php echo   get_the_post_thumbnail($post->ID, "excerpt-thumb"); ?>

                 <?php             $page_id = get_the_ID();             if($page_id==2){ ?>
About Us — A Picture of Pinnacle

 <?php }else {?>
<?php the_title(); ?>

                          <?php  } ?>                          <?php the_content(); ?>                                      <link rel="stylesheet" href="/joblisting/styles.css" type="text/css" />                                                         <?php include "/joblisting/select.class.php"; ?>
             <form id="select_form" action="">

Choose a category:	                                                              <select id="category" name="category" class="wrapper-dropdown">                                 <?php echo $opt->ShowCategory($cat); ?>                                 </select>

Choose a type:	                                                              <select id="type" name="type" class="wrapper-dropdown">                                     <option value="0">choose...</option>                                    <?php                                     if ($sub != "0")                                     {                                         echo $opt->ShowType($cat, $sub);                                     }                                     ?>                                  </select>

                             <input type="submit" value="Confirm" class="classname" />

             </form>             <?php include "/joblisting/display.php"; ?>

                                  <?php     if($post->post_parent) {     $parent = get_post($post->post_parent);                       if($page_id=2){ ?>  <?php }else {?>           <?php      echo get_the_title($post->post_parent); }      ?>
          <?php } ?>               <?php                     $children =& get_children( 'post_type=page& post_parent='.$post->post_parent );                     foreach($children as $child){                         ?>

                                      <?php } ?>

                 <?php if(!dynamic_sidebar("home-widget-column-1")){?>

Featured Practice Opportunity

<img class="alignnone size-medium wp-image-74" title="sample-2" src="<?php echo bloginfo("template_url"); ?>/images/sample-2-283x185.jpg" alt="" width="283" height="185">

Quisque in libero ipsum, ut dictum sem. Cras ac ornare purus. Etiam sapien mauris, suscipit at aliquet vel, vestibulum id tortor. Donec porta porta orci ut pharetra. Sed risus nunc, condimentum at ultricies quis, ultrices sed felis. Vivamus ac eros vitae lacus convallis dapibus. Nunc ullamcorper sodales sapien ut consequat. Ut elit leo, iaculis vel tempus nec, feugiat ac est.
                         READ MORE

                            <?php } ?>                 <?php if(!dynamic_sidebar("home-widget-column-2")){ ?>

Search for Job Opportunities

                             <form>
<select><option>Select your profession...</option></select>

<select><option>Select your specialty...</option></select>

<select><option>Select your location...</option></select>

<input type="submit" value="SEARCH JOB"/>
                             </form>

                               <?php } ?>                   <?php if(!dynamic_sidebar("home-widget-column-3")){ ?>

Articles, News, Press and Announcements

December 09, 2012, Sunday
                                     A wordpress post #3

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus pellentesque felis ut neque vestibulum eu  Read more

December 09, 2012, Sunday
                                     A wordpress post #2

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec ac urna blandit nisi egestas gravida  Read more

December 09, 2012, Sunday
                                     A wordpress post #1

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec pellentesque, odio et molestie scelerisque, tellus  Read more

                     <?php } ?>

          <?php get_footer(); ?>


Is there a way to direct unregistered user to registration page when click a link?

everyone: this question seems pretty commmon to ask, but I did not find any answer. I was wondering, if there is a php function that I could use to direct a user to the site's registartion page, so that I can use php instead of link that I need to customize every time I change the link. THank you


Display feedburner subscribers count in single.php

I tried to find a tutorial to do that _points to title_. I could only find one tutorial several times, but it doesn't work for me. The tutorial is posted in various blogs, so I thought it's working (e.g. here). It's not. I'm posting it within my single.php and I get the following error messages:               Warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: Entity: line 2: parser error : AttValue: " or ' expected in /home/zoomingj/public_html/wp-content/themes/alltuts-child/single.php on line 76          Warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: <html lang=en> in /home/zoomingj/public_html/wp-content/themes/alltuts-child/single.php on line 76          Warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: ^ in /home/zoomingj/public_html/wp-content/themes/alltuts-child/single.php on line 76          Warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: Entity: line 2: parser error : attributes construct error in /home/zoomingj/public_html/wp-content/themes/alltuts-child/single.php on line 76          Warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: <html lang=en> in /home/zoomingj/public_html/wp-content/themes/alltuts-child/single.php on line 76          Warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: ^ in /home/zoomingj/public_html/wp-content/themes/alltuts-child/single.php on line 76          Warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: Entity: line 2: parser error : Couldn't find end of Start Tag html line 2 in /home/zoomingj/public_html/wp-content/themes/alltuts-child/single.php on line 76          Warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: <html lang=en> in /home/zoomingj/public_html/wp-content/themes/alltuts-child/single.php on line 76          Warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: ^ in /home/zoomingj/public_html/wp-content/themes/alltuts-child/single.php on line 76          Warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: Entity: line 2: parser error : Extra content at the end of the document in /home/zoomingj/public_html/wp-content/themes/alltuts-child/single.php on line 76          Warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: <html lang=en> in /home/zoomingj/public_html/wp-content/themes/alltuts-child/single.php on line 76          Warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: ^ in /home/zoomingj/public_html/wp-content/themes/alltuts-child/single.php on line 76          Fatal error: Uncaught exception 'Exception' with message 'String could not be parsed as XML' in /home/zoomingj/public_html/wp-content/themes/alltuts-child/single.php:76 Stack trace: #0 /home/zoomingj/public_html/wp-content/themes/alltuts-child/single.php(76): SimpleXMLElement->__construct('<!DOCTYPE html>...') #1 /home/zoomingj/public_html/wp-includes/template-loader.php(43): include('/home/zoomingj/...') #2 /home/zoomingj/public_html/wp-blog-header.php(16): require_once('/home/zoomingj/...') #3 /home/zoomingj/public_html/index.php(17): require('/home/zoomingj/...') #4 {main} thrown in /home/zoomingj/public_html/wp-content/themes/alltuts-child/single.php on line 76      Is it that I just cannot use that kind of code within the single.php? I also tried to put the code in my function.php instead, but it gave me the exact same error messages. If this doesn't work, do you know about any other code that is likely to work within the single.php then? EDIT: The code snippet I wanted to insert:               <?php     //get cool feedburner count     $whaturl="http://api.feedburner.com/awareness/1.0/GetFeedData?uri=your feedburner id";          //Initialize the Curl session     $ch = curl_init();          //Set curl to return the data instead of printing it to the browser.     curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);          //Set the URL     curl_setopt($ch, CURLOPT_URL, $whaturl);          //Execute the fetch     $data = curl_exec($ch);          //Close the connection     curl_close($ch);     $xml = new SimpleXMLElement($data);     $fb = $xml->feed->entry['circulation'];     echo $fb;     //end get cool feedburner count     ?>      In line76: `$xml = new SimpleXMLElement($data);` Thanks a lot in advance.


Get categories without post

I want to get categories that had NO post. Below is sql for getting category with post..               SELECT terms.term_id,terms.name,COUNT(post.ID) FROM wp_posts as post     JOIN wp_term_relationships as rel ON post.ID = rel.object_ID      JOIN wp_term_taxonomy as ttax ON rel.term_taxonomy_id = ttax.term_taxonomy_id     JOIN wp_terms as terms ON ttax.term_id = terms.term_id     WHERE ( ttax.taxonomy='category' AND post.post_type='post' AND post.post_status != 'revision') GROUP BY (terms.term_id)          But how to get catgeory with NO post? Thank you for your help.


Conditional template tag for buddypress pages

I'm trying to assign a special template only to buddypress pages (activity, members, profile...). All other posts / pages use a different template. Problem is: I just can't find a good way to tell if a page is "rendered" by buddypress or by the wp "core". I've looked in the bp codex and found the template tag bp_is_member() and others, but none for an overall approach. Are there hooks that I could use or other template tags that I didn't find? I'm not looking for a customization of the sidebar only, so conditional widget plugins won't do the job. Any help is appreciated Heiner


thickbox never gets called (weird behavior)

I have the exact same files (except for wp-config) running on a local server and a test server, and in my functions.php I have this:                   function len_scripts() {             if (!is_admin()):                 wp_enqueue_script('jquery');                 wp_enqueue_script('thickbox');             endif;         }      add_action('wp_print_scripts', 'len_scripts');      On my localhost, everything works fine and all files are happily working. But on the test server, somehow, thickbox never gets called, i don't get any errors on the console and Firebug Network tab simply doesn't know it was supposed to be calling that file. thickbox.css gets called, jquery.js also. thickbox.js doesn't. Any ideas why this might be? EDIT:   * len_scripts() is called on wp_print_scripts, so no big deal here - there are other enqueue functions that i left out, and they are all working as expected.   * Firebug console does not throw any errors, in fact, it doesn't recognize thickbox.js at all, like if the function calling it was never there. It doesnt appear in the console, the DOM, or the Network tab. No mention, not even 404 (but the file is indeed there).   * In my final markup i get the script tag for jquery, then the script tag for other .js files, but never for thickbox. I do get a link tag for thickbox.css though, along with my other .css tags.


Get user info outside Wordpress

Not quite sure why this is happening, hopefully someone can help. I have a wordpress installation, lets say for arguments sake it's installed to http://www.example.com/wordpress. I have a file called test.php with the following code:               <?php          include '/php_path_to_blog/wp-blog-header.php';         echo get_current_user_id();     ?>      Now the odd part is if i have a user logged in and place this file within my wordpress directory and call it by going to http://www.example.com/wordpress/test.php it outputs the correct user id of the current logged in user. However if I move the file to the root directory of the site and call it by going to http://www.example.com/test.php, it outputs 0 as if there were no user logged in. It seems that some functions work properly outside of the installation directory and some don't. I would like them to work outside the wordpress isntallation directory. Any help would be greatly appreciated.


Replace post/page titles with an image in Wordpress

I have a Wordpress theme bought from a well known site. I'm trying to change the location of the main site logo to where the page/post titles appear. The page.php for the title is as follows; How would I add an image to this?

<?php the_title(); ?>

      the site url is http://www.djdavestewart.com/site/sound-system-hire/ Thanks for your help Gary


Problems with 404, .htaccess, permalinks and Wordpress custom posts locally on Snow Leopard

I have a custom "about" post:               function about_register() {             $labels = array(                 'name' => _x('About Page', 'post type general name'),                 'singular_name' => _x('About Item', 'post type singular name'),                 'add_new' => _x('Add New', 'About Item'),                 'add_new_item' => __('Add New About Item'),                 'edit_item' => __('Edit About Item'),                 'new_item' => __('New About Item'),                 'view_item' => __('View About Item'),                 'search_items' => __('Search Team'),                 'not_found' =>  __('Nothing found'),                 'not_found_in_trash' => __('Nothing found in Trash'),                 'parent_item_colon' => ''             );                  $args = array(                 'labels' => $labels,                 'public' => true,                 'publicly_queryable' => true,                 'show_ui' => true,                 'query_var' => true,                 'rewrite' => true,                 'capability_type' => 'post',                 'hierarchical' => false,                 'menu_position' => null,                 'has_archive' => 'about',                 'supports' => array('title','thumbnail')             );                  register_post_type( 'custom_about_post' , $args );         }      I created a page called archive-about.php and put my Wordpress loop in there and pulled up my custom meta information. However, when I go to mysite.com/about I get a 404 error. Searching the internet - I went to my permalinks page and tried to flush rewrite rules by hitting save. I was instructed to put the following into my sites .htaccess file:               # BEGIN WordPress     <IfModule mod_rewrite.c>     RewriteEngine On     RewriteBase /mysite.com/     RewriteRule ^index\.php$ - [L]     RewriteCond %{REQUEST_FILENAME} !-f     RewriteCond %{REQUEST_FILENAME} !-d     RewriteRule . /iqfood/index.php [L]     </IfModule>          # END WordPress      However, when I did this my entire site is now 403! If I remove this and leave my .htaccess file blank my site returns...but the link               localhost/mysite/about/       still doesn't work. In order to make the archives work, do I use the default settings in permalinks or something else? What should I be setting my rewrite rules to in Mac OSX (snow leopard) to run Wordpress locally? Is there something wrong in the code posted above?


Category List with custom urls

How do i get the list of categories as wp_list_categories does but using get_categories and then displaying the links in a foreach loop. The reason is i want the links to point to the current page with [?search- type=normal&s=cat_name; ] instead on pointing to the category url. This will then filter the results when clicked on the same page.               <?php                       $categories = get_categories(array('hide_empty' => 0, depth => 0, 'hierarchical' => false));                      echo '
';                      foreach($categories as $category) {                          echo '
term_id.'">'.$category->name.'
';                                   $sub_categories = get_categories(array('hide_empty' => 0, 'parent' => $category->term_id, 'hierarchical' => true));                              if(!$sub_categories) {                                   } else {                                   foreach ($sub_categories as $sub_category) {                                       echo '
';                                  echo '
term_id.'">'.$sub_category->name.'
';                                  echo '
';                              }                         }                      }                      echo '
';             ?>


Local Installation: install.php offered to download instead of running

I am running ubuntu 10.04 desktop, php5.3, and wordpress 3.2.1. I copied the wordpress directory to `/var/www/sitename/blog`. I have set up mysql, and edited wp-config.php appropriately. But when I navigate to `http://localhost/sitename/blog/wp-admin/install.php`, I am only offered to save or download the install.php file. I can run php scripts in any `/var/www/` directory, including `/var/www/site/blog/wp-admin/`. I have been searching for a solution, but have not found anything relevant. What do I need to do in order to make the installation run?


delete_post hook - deleting multiple items

I am using `delete_post` hook.               add_action('delete_post', array($this, 'remove_audio_file')); // delete post event      (Using it inside the class). When I delete a single post I have no problem retrieving its ID.               global $post;      However, when I delete multiple posts (2 or more) `$post` becomes `NULL`. Can you advise why is that / what I am doing wrong ? EDIT:               function remove_audio_file() {             global $post;             if ($post != NULL) {                $unique_id = get_post_meta($post->ID, 'ecpt_unique_id', true);                 $username = get_userdata($post->post_author)->user_login;                 $uploadrr = new bt_uploader();                 $dirPath = $uploadrr->audio_folder() . $username . '/' . $unique_id;                 if (is_dir($dirPath)) {                     foreach(new RecursiveIteratorIterator(new RecursiveDirectoryIterator($dirPath, FilesystemIterator::SKIP_DOTS), RecursiveIteratorIterator::CHILD_FIRST) as $path) {                         $path->isFile() ? unlink($path->getPathname()) : rmdir($path->getPathname());                     }                 }              }         }


Redirect on successful login

I am using the following snippet to control redirects after successful logins....               add_action( 'wp_login', 'redirect_on_login' ); // hook failed login     function redirect_on_login() {                 $referrer = $_SERVER['HTTP_REFERER'];                 $homepage = get_option('siteurl');                 if (strstr($referrer, 'incorrect')) {                 wp_redirect( $homepage );                 }                 elseif (strstr($referrer, 'empty')) {                 wp_redirect( $homepage );                 }                 else                 {                   wp_redirect( $referrer );                 }             }      What i want it to do is this...   * If $referrer is www.mydomain.com/?login=incorrect then redirect to the homepage   * If $referrer is www.mydomain.com/?login=empty then redirect to the homepage   * Anything else then redirect to $referrer I'm sure there is something wrong with my logic as whatever $referrer is it just redirects me to the same. Am i missing something obvious? ## UPDATE As requested, here is a bit more of an explanation...   * Somebody goes to my custom WordPress login page at www.mydomain.com   * They try to log in with an incorrect password or username   * The following function runs...              add_action( 'wp_login_failed', 'pu_login_failed' ); // hook failed login     function pu_login_failed( $user ) {         // check what page the login attempt is coming from         $referrer = $_SERVER['HTTP_REFERER'];         $loginpage = 'http://www.mydomain.com/login';         // check that were not on the default login page         if ( !empty($referrer) && !strstr($referrer,'wp-login') && !strstr($referrer,'wp-admin') && $user!=null ) {             // make sure we don't already have a failed login attempt             if ( !strstr($referrer, '?login=failed' )) {                 // Redirect to the login page and append a querystring of login failed                 wp_redirect( $loginpage . '/?login=incorrect');             } else {                 wp_redirect( $referrer );             }             exit;         }     }      This is how the ?login=incorrect gets added, I am probably going about it the wrong way though


Right click&copy images: protection

I saw there's a Wordpress plugin that prevents people from using right click on text or images, called WP Protect. I was wondering if there's a way to hardcode it into Wordpress instead of using a plugin. What I'm worried about is mainly the images. Being able to mark text is perfectly fine with me. I tried to find tutorials for this, but all I could find was the plugin I mentioned.


Specific website content

I want to design a website that, in addition to the usual parts like blog, contact us, image gallery, etc., has another part for books and articles. The admin must be able to enter book and article details (title, author, reference, publisher, publish date, etc.) to these posts and users must have an advanced search to find the books and articles which they want. Since I use WordPress for the whole site, should I write plugins for the books and articles parts? Or use WordPress for the usual parts and write a separate PHP page for books and articles? If you advise WordPress, how can I create an advanced search?


Configure VirtualHost for a perfect Wordpress Environment

I'm trying to install wordpress in a Cloud Server with rackspace. But my lack of knowledge in server configuration (LAMP , etc) is making me do a lot of miss configurations . First I think the .httaccess is not allow. Second the update Wordpress and plugins featured is not allow Third may be more numbers... let me show my virtualhost file:                   <VirtualHost *:80>       # Admin email, Server Name (domain name) and any aliases       ServerAdmin adrian@my.com       ServerName  my.com       ServerAlias www.my.com                 # Index file and Document Root (where the public files are located)       DirectoryIndex index.html, index.php       DocumentRoot /home/devdreams/domains/my.com/public                 # Custom log file locations       LogLevel warn       ErrorLog  /home/devdreams/domains/my.com/log/error.log       CustomLog /home/devdreams/domains/my.com/log/access.log combined              <Directory />           Options FollowSymLinks           AllowOverride All           Order deny,allow           Deny from all           Satisfy all         </Directory>            AccessFileName .htaccess                   <Directory /home/devdreams/domains/>             Options Indexes FollowSymLinks MultiViews             AllowOverride None             Order allow,deny             allow from all         </Directory>                   ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/         <Directory "/usr/lib/cgi-bin">             AllowOverride None             Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch             Order allow,deny             Allow from all         </Directory>              Alias /doc/ "/usr/share/doc/"              <Directory "/usr/share/doc/">             Options Indexes MultiViews FollowSymLinks             AllowOverride None             Order deny,allow             Deny from all             Allow from 127.0.0.0/255.0.0.0 ::1/128         </Directory>              LoadModule rewrite_module modules/mod_rewrite.so               </VirtualHost>      Could somebody help me configure my VH for a wordpress environment thaaks


How to highlight the current page in the nav menu?

I'm customizing a WordPress theme for my school, and I'm a bit annoyed by the fact that the current page in the nav menu is not indicated. For example: ![enter image description here](http://i.stack.imgur.com/4kcef.png) You can clearly see that I'm hovering over a page in the nav menu, and that the page I'm hovering over is highlighted, as expected. However, the page that I'm currently on, called "Arhiva", is not highlighted, and I think that this can be somewhat confusing. I don't want the current page and the page the mouse is hovering over to be highlighed in the same manner though. I believe that a bold entry text in the nav menu would do just fine to separate the current page from other pages. How can I achieve this? Theme's current CSS can be viewed here: http://petagimnazija.hr/wp/wp- content/themes/chiron/style.css.


Styling Previous/Next Pages differently from Index

A friend of mine pointed me towards using child elements to style my index page so that I could have one loop and several different visual styles (a featured post, a smaller sub-featured post, and several smaller thumbnails). This is very helpful in that I can add posts and the existing posts will just flow through this styling. For example, I can style the .hentry class by:               .hentry:nth-child(3)     {     background-color:#00000;     }      And so on. The problem I run into is when clicking on the next/previous links on the bottom of the content portion, those following pages maintain that styling. Is there a way I can style those pages differently? URL: http://piquantblog.com Thanks in advance!


Where is phpMyAdmin inside WordPress?

Even if I've been coding (mainly Java and Python) for some years, I'm totally new with web apps and PHP. So please forgive me if this is a novice question. I had a WordPress blog with a friend who was managing all the WordPress hosting. Now my friend has decided to go away and he sent me the blog backup:   1. All the WordPress files.   2. The dump of database in `dump.log`. I have purchased hosting where I can restore the old blog. Looking for how to set up the blog again, I found everywhere the guideline "Restore the database from phpMyAdmin", but I don't know where can I launch phpMyAdmin from the backup I have. Please explain to me what I have to do.


Putting footer content in a "page" - Doing it wrong?

So, in my shortish WordPress development career, I've gotten in the habit of creating a "page" for the content in a footer, and adding different fields with the wpalchemy class. Everything with this approach seems to work fine, except for the fact that users can go to mysite.com/footer and see something I do not want them to see. Should I somehow force this url to 404? or is there something fundamentally wrong with my approach?


Contact Form 7 add ID to radio buttons

Need some assistance to dynamically generate IDs for a group of radio buttons in Contact Form 7. Example:                         <input type="radio" name="test" value="Test">      Test                         <input type="radio" name="test2" value="Test2">      Test                Thanks!


How can I create an alternate full-HTML editor for posts?

I have created a custom post type; the content of this custom post type should be a full html page - not just a snippet of html. The standard editor appears to interfere with the html and it does not appear to be ready to handle a full html page source as its content. Ideally, I would love to be able to disable the 'editor' capability for this custom post type and replace the editor with a custom plugin - only, I'm not sure about the best course of action to implement this functionality. I am open to writing the plugin myself, but it would be nice to learn that such a plugin exists already.


Wordpress manage users as non admin

Is it possible to let a non-admin user (e.g an editor / author or another role) manage the users? I am working on a Wordpress website where multiple people manage the website, and there will be someone who must be able to manage the users, but does not need access to all the admin features. Thanks.


How to change the parent Domain Name in Multisites Project?

I have a multisite project. And then i want to change the parent domain name now. It is currently as: Parent:               www.site1.com      Multisites:               www.oldsite.com/abc     www.oldsite.com/def      So how can i change the parent domain `oldsite.com` into `newsite.com` ? So the multisites will be automatically affected as:               www.newsite.com/abc     www.newsite.com/def      How can i get it?


jQuery Issue with Smooth Slider Plugin

I have the Smooth Slider plugin installed and it works on the default theme. I selected it as Display Slider on this Post/Page, and used the template tag for that specify page.php as               <?php if ( function_exists( 'get_smooth_slider' ) ) { get_smooth_slider(); } ?>        However, when I change to my custom theme with the same code it fails and gives the error message:   Uncaught TypeError: undefined is not a function for the line:   jQuery("#smooth_slider_7").cycle({ What should I do? I thought JQuery was already included for wordpress and I later added the code:               <?php wp_enqueue_script("jquery"); ?>      To the header


prevent wordpress from creating thumbnails of an image

I have a theme installed which automatically generates differnet sizes of images (thumbnails) when I add a "featured" image in a post. supermuc-106x80.jpg supermuc-116x80.jpg supermuc-150x100.jpg supermuc-150x150.jpg supermuc-290x180.jpg supermuc-300x174.jpg supermuc-600x250.jpg supermuc-600x400.jpg supermuc-905x500.jpg supermuc.jpg Thats OK so far. My problem is when I want to add some more pictures/photos inside the post it also creates differnet sizes of the picture but actually this is not "featured" image so all those sizes are just wasting my disk space. Is there any way or plugin to allow me select which thumbnails will be generated when I upload an image? So I can "disable" all sizes I dont want to be created and save disk space?


Loop to pull content from parent element in custom post type

I created a hierarchical custom post type called "films." It is hierarchical so it can have children elements. I am using a conditional statement in my single-films.php to show different content for the parent page from the children pages like so:               <?php if( $post->post_parent != 0 ) {         echo "Press Page";     } else {         echo "Film Page";     } ?>      In the condition that the page is a child, I want to use a custom wordpress loop, that loops through it's parents content. I am guessing I will need to use a loop similar to this (for the children):               <?php $posts = query_posts('&post_parent=0'); ?>     <?php while(have_posts()) : the_post(); ?>          wordpress content          <?php endwhile; ?>      This isn't working correctly. I need it to pull any content I wish (custom field, title, featured image, etc) from it's parent. Any idea how I can modify this loop to pull content from it's parent?


Shortcode append to the the_content()

Currently I have a short that embeds a div into the the_content. This works fine like thus: [shortcode param=1 param=2] This returns a message at the end of the post, but within the current article, however instead of being:               <article>       <div>     </article>      I'm looking to produce:               <article>     </article>     <div>      Is this possible, and what functions do I need use? I've already tried using add_filter and apply_filter but they went into a infinite loop instead of:               return $message.      Thanks.


Automatically show 'taxonomy' meta box by default in Appearance > Menus?

Is there a way (with code) to automatically show the 'taxonomy' meta box in Appearance > Menus ? This way, the users don't have to click on the 'Screen Options' tab > 'Show on screen' > 'taxonomy' checkbox


Remove Actions added by SEO ultimate Plugin

I am trying to remove the action hooks added by SEO ultimate plugin for some pages. The way it is added in the plugin's class is                   //Hook to output all <head> code i changed the priority to 2         add_action('wp_head', array(&$this, 'template_head'), 2);      The SEO plugin creates a global variable like this               global $seo_ultimate;         $seo_ultimate =& new SEO_Ultimate(__FILE__);      In my plugin, i try removing it by               add_action('wp_head',array($this, 'remove_seo_header'),1);              }         function remove_seo_header() {                   remove_action('wp_head', array($seo_ultimate,'template_head'));     }      But it does not remove the action. Can anyone point out where am I wrong?


Re-process Images

I've got a blog that has the highest-resolution version of all its images embedded in the posts, rather than a thumbnail linking off to an image attachment page. Can you tell me how I can re-process all embedded images so they're output as reduced size thumbnails that link off to their own attachment page (which is WordPress default settings)? Am I right in thinking I can involve the Regenerate Thumbnails plugin in this?


Current and next month posts

Thanks for reading firstly. I am coding a site that requires 3 post titles for the current month and 3 post titles for the next month (upcoming events)! I am struggling to get this to work. I am using wp_query to do this but I cannot get to work at all! Any help would be appreciated :) Thanks! Just to expand on this as I might not have made myself clear! I want to be able to show this months 3 events / posts and next months 3 events / posts - How would I do this? Please help as I am going slightly insane.. Cheers! This is the code for the current month 3 blog title:
<?php the_time('F') ?> Events
                          <?php if(have_posts()) : while(have_posts()) : the_post();?>
                                                                                <?php the_time('j') ?>
                                                                           <?php the_time('M') ?>
                                  <a href="<?php the_permalink() ?>"><?php the_title(); ?>
                   <?php endwhile; endif; wp_reset_query(); ?>


Very Slow loading. Plugins report provided by P3 included

My problem perhaps has to be with the plugin I'm using. However I wanted to be sure if something else could be causing the problem. I'm retrieving two feeds using WP RSS multi-importer plugin, but that page's loading time is increibly slow. feed 1: `http://www.paho.org/arg/index.php?format=feed&type=rss` feed 2: `http://feeds.feedburner.com/diariosalud/tVxp?format=xml` which are loaded instantly in simplepie.org/demo This is my page hosted -> http://bit.ly/fdp-rssimporter and these are my results of P3, running only that page twice:               WordPress Plugin Profile Report     ===========================================     Report date: 9 junio, 2014     Theme name: Openstrap     Pages browsed: 2     Avg. load time: 7.9207 sec     Number of plugins: 12     Plugin impact: 89.26% of load time     Avg. plugin time: 7.0697 sec     Avg. core time: 0.6246 sec     Avg. theme time: 0.1077 sec     Avg. mem usage: 91.25 MB     Avg. ticks: 88,235     Avg. db queries : 66.50     Margin of error : 0.1186 sec          Plugin list:     ===========================================     P3 (Plugin Performance Profiler) - 0.0181 sec - 0.26%     iThemes Security - 0.3094 sec - 4.38%     Bstw - 0.0113 sec - 0.16%     Duplicator - 0.0166 sec - 0.23%     Jetpack por WordPress.com - 1.5392 sec - 21.77%     Lightbox - 0.6302 sec - 8.91%     Meta Slider - 0.0917 sec - 1.30%     Post Expirator - 0.0053 sec - 0.07%     TinyMCE Advanced - 0.0088 sec - 0.12%     Types - 0.2622 sec - 3.71%     RSS Multi Importer - 3.9929 sec - 56.48%     Wysija Newsletters - 0.1840 sec - 2.60%


Change wp-login.php url and lost password to custom name

I'm using SiteMile's auction theme and I'm trying to change the "wp-login.php" to "login." I tried using the plugin, Rename WP-Login and that worked, however the "lost password" link doesn't work. I get something like the following instead, "/-/-/-/-/-/-/-/" after the primary url. Any help is much appreciated.


Debugging unserialize errors

`NOTICE: wp-includes/functions.php:232 - unserialize()` I get this error of varying lengths on the admin pages of several of the sub- blogs of my multisite instance. It doesn't happen on all the blogs, and doesn't immediately seem to be tied to a specific plugin. Does any know an efficient way to debug these messages (short of manually running the 131 queries and counting the data) or a good way to rebuild serialized data in the database?


Set front page option using custom fields?

Hello wordpress gurus! I want to be able to set the frontpage via a custom field. So for example, in the new page area in the wordpress admin there is a custom field that displays "Set as frontage", instead of the user going to the Settings > Reading settings and setting the front page there they can do it via the new page. I'm familiar with metaboxes and some coding but i'm not sure how i could implement this. I also found this article on setting the front page programatically: http://kuttler.eu/code/set-static-front-page-and-blog-page-programmatically- in-wordpress/ Its just the matter of putting it together with the custom field. Help appreciated. Thanks


Putting main WordPress blog under a different folder name

I want to use WordPress primarily as a static page CMS for a small business site. I want to use the "pages" feature for most of the pages on the site, except for a news blog, for which I want to use the blogging part of WordPress. So I want a structure like this: example.com - main page example.com/about example.com/location example.com/services example.com/news Where the first four are "pages" that don't need dynamic content, but the "news" part is a blog with company news, etc. How do I implement a URL structure like this? If I install Wordpress to example.com/news folder, all the pages look like this: example.com/news/about Thanks for your help.


Different thumbnail size than actual picture in post

I am wondering how to achieve something specific. I am not sure if this functionality is already built into Wordpress, or if there is some PHP happening. This is the site I am basing some of my design from: http://www.premiumpixels.com/ As you can see, the images that are on the front page are cropped, yet, when you click on the post itself, it gives you a larger view all together. Attempts to actually crop the image in Wordpress and make it a featured image has been futile. I am wondering how to achieve this? It seems like he is using the front page thumbnail as a featured image and the actual blog post image has just been merely inserted. Yet, when I try this, I get both images on my front page. Can someone shed some light on this?


List of WordPress menu item indices?

The following code will rename the "Posts" menu item to "Blog Posts" in the WordPress Dashboard:               function lc_change_post_menu_label() {     global $menu;     $menu[5][0] = 'Blog Posts';          }     add_action( 'admin_menu', 'lc_change_post_menu_label' );      Works fine, and all is well. Problem is, I want to target other menu items, for example I want to rename "Pages" to "Site Pages". Is there a list somewhere that contains the index number for all WP admin menu items? `var_dump` isn't helping and I don't have a lot of time to waste since I've already wasted almost two hours of trial and error, trying to target these silly things.