title: Echo possibly causing custom template formatting conflict

text:
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(); ?>


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

text: 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


title: Display feedburner subscribers count in single.php

text: 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.


title: Get categories without post

text: 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.


title: Conditional template tag for buddypress pages

text: 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


title: thickbox never gets called (weird behavior)

text: 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.


title: Get user info outside Wordpress

text: 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.


title: Replace post/page titles with an image in Wordpress

text:
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


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

text: 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?


title: Category List with custom urls

text:
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 '
';             ?>


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

text: 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?


title: delete_post hook - deleting multiple items

text: 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());                     }                 }              }         }


title: Redirect on successful login

text: 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


title: Right click&copy images: protection

text: 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.


title: Specific website content

text: 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?


title: Configure VirtualHost for a perfect Wordpress Environment

text: 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


title: How to highlight the current page in the nav menu?

text: 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.


title: Styling Previous/Next Pages differently from Index

text: 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!


title: Where is phpMyAdmin inside WordPress?

text: 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.


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

text: 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?


title: Contact Form 7 add ID to radio buttons

text: 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!


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

text: 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.


title: Wordpress manage users as non admin

text: 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.


title: How to change the parent Domain Name in Multisites Project?

text: 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?


title: jQuery Issue with Smooth Slider Plugin

text: 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


title: prevent wordpress from creating thumbnails of an image

text: 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?


title: Loop to pull content from parent element in custom post type

text: 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?


title: Shortcode append to the the_content()

text: 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.


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

text: 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


title: Remove Actions added by SEO ultimate Plugin

text: 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?


title: Re-process Images

text: 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?


title: Current and next month posts

text:
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(); ?>


title: Very Slow loading. Plugins report provided by P3 included

text: 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%


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

text: 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.


title: Debugging unserialize errors

text: `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?


title: Set front page option using custom fields?

text: 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


title: Putting main WordPress blog under a different folder name

text: 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.


title: Different thumbnail size than actual picture in post

text: 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?


title: List of WordPress menu item indices?

text: 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.


title: Why is the CSS horizontal alignment for divs inside div container not displayed in my WP Theme?

text:
WP 3.0.4 multisite network enabled, local installation with MAMP, PHP 5.3.2, WP THEME: Twentyten Child (Wordpress Theme) Having trouble with not displaying my CSS styling for horizontal alignment of 4 div-boxes inside a div-container. NOTE: The same css styling works fine with HTML 4.01 Transitional//EN on my hand-coded html/php website. But on my WordPress site, the four boxes stepped down from each other, like a staircase. Same behavior in Firefox v3.6.13 and Safari v5.0.3. **My CSS:** > div .box-container { display: inline; margin: 0.63em 0pt; padding:10px; > width: 640px; background-color:rgb(229, 231, 225); position:relative; float: > left; overflow:hidden; } > > div .small-box { border: 1px solid rgb(153, 51, 102); margin: 10px 5px; > padding: 0.325em; float: left; background-color: rgb(255, 244, 227); width: > 128px; line-height: 0.85em; max-height: 8em; min-height: 8em; position: > relative; } **My HTML:** >
 > >
SOME TEXT & IMAGE
 > >
SOME TEXT & IMAGE
 > >
SOME TEXT & IMAGE
 > >
SOME TEXT & IMAGE

 The box-container div width is specified as 640px, but I notice the padding extends it beyond this. In any case, it is plenty large to accommodate the four small boxes, which total 512px plus their total 40px margin, plus the 20px padding on the box- container div. **My Problem:** I don't understand why the padding pushes the size of the box-container div. When I tried to use max-width: 640px, I observed that the boxes all lined up vertically, and the box-container div was no wider than 170px. EDIT: The padding has since been removed from the box-container div, and margins adjusted on the small-box divs. REAL PROBLEM IS AS STATED IN THE FIRST 2 PARAGRAPHS: The four small boxes are stepped down from each other, like a staircase. I want them to align horizontally. The small-box divs are actually all the same size, their contents consist of text & image. Help? **Edit:** Screenshot of my hand-coded website, behaving as expected: ![screenshot of my hand-coded website, behaving as expected](http://i.stack.imgur.com/VZ2Nc.png) Staircase effect I'm seeing in WordPress my WordPress Theme: ![Staircase effect I'm seeing in WordPress my WordPress Theme](http://i.stack.imgur.com/ufw2i.png)


title: Different header for each category

text: I'm working on a project where each category should have a custom header page. Any suggestions? I'm just looking for some direction on how to accomplish this.


title: Cron Job to Delete over 30 days old post from post type

text: This is my first time creating a WP cron job and I would like to have someone else review it for mistakes. I wrote this cron job to delete temporary wishlists that are over 30 days old. The wishlists are saved as custom post types with post_type value as "wishlist". Also I'm using post_author value as 1 to only remove wishlist created by users that were not logged in (This way the wishlists in the query are only the temporary ones). I would like the cron job to run once a day and adding this to functions.php. Here is the code below, please let me know if this is done correctly. Thank you               // Cron Job to Delete Wishlists over 30 Days     if(!wp_next_scheduled( 'remove_old_wishlists_schedule')){         wp_schedule_event(time(), 'daily', 'remove_old_wishlists_schedule');     }          add_action('remove_old_wishlists_schedule', 'cr_remove_old_wishlists');          function cr_remove_old_wishlists(){     global $wpdb;     # Set max post date and post_type name          $date = date("Y-m-d H:i:s", strtotime('-30 days'));     $post_type = 'wishlist';          // Query post type     $query = "         SELECT ID FROM $wpdb->posts          WHERE post_type = '$post_type'          AND post_status = 'publish'          AND post_author = '1'         AND post_date < '$date'         ORDER BY post_modified DESC     ";     $results = $wpdb->get_results($query);                      foreach($results as $post){                          // Let the WordPress API do the heavy lifting for cleaning up entire post trails                     wp_delete_post( $post->ID, true);               }     }


title: How to structure a site with product variations pages?

text: I'm doing a website for a friend for his trailer business (riveting I know!), and was looking for some advice on how to build it out. Basically there are a few major types of trailers, then each main type has a few variations in size. So it's something like: Single Axels:   * 6x4    * 8x4    * 9x5 Tandems:   * 6x4    * 8x4    * 9x5 So each variations would have its own product page. This would consist of a description, some headings and a few image galleries. All of the pages would have a very similar structure, as they're basically the same thing, just with different heading and pictures. I've made a quick and ugly wireframe to illustrate more clearly what I mean: ![enter image description here](http://i.stack.imgur.com/iW6eQm.png) I'm just unsure of the best way to build this out. My first instinct (Which I think may be wrong), was to create a custom post type, say for Single Axels, and attach all the various custom fields needed. Then there would be a post for each variation (6x4, 8x4 etc). Now I'm just a bit confused as to how I display these posts as their own separate page?


title: Auto-deleting comments that trigger the blacklist

text: By default, the WP 'blacklist' feature finds comments containing the blacklisted string and moves them to the spam folder. What I am trying to do is change it so that instead of going to spam, the comment goes directly to the trash (or even better isn't stored at all). In /wp-includes/comment.php around line 700:               if ( wp_blacklist_check($comment_author, $comment_author_email, $comment_author_url, $comment_content, $comment_author_IP, $comment_agent) )         $approved = 'spam';     }      I tried modifying the line to `$approved = 'trash';` but I am still getting comments containing blacklisted words being moved to my spam folder. The only comment related plugin I am running in Akismet, is it possible that Akismet is moving the comment to spam before comment.php processes it?


title: Utilize TinyMCE hyperlink chooser outside of TinyMCE

text: Is it possible to use the "Insert/edit link" dialog box outside of TinyMCE? For example, if I wanted to add that dialog box to a generic button within a plugin settings form, is it possible to include just the portion of the TinyMCE that is required to make it work?


title: Why doesn't the WYSIWYG support H1-H6 tags?

text: I'm just wondering how i can have a client write normal paragraph text separated by headers if there is no header capability in the WYSIWYG editor, at least not that i've been able to locate?


title: Using admin-ajax prevents regular php form submission

text: I have a page with a table of posts and groups of checkbox filters in the sidebar. Looks something like this: `www.example.com/toylist`               |___________|    |_______________________|     | [ ] Red   |    |  1. Big Red Box       |     | [ ] Blue  |    |  2. Big Blue Box      |     | [ ] Green |    |  3. Big Green Box     |     |           |    |  4. Small Red Box     |     | [ ] Box   |    |  5. Small Blue Box    |     | [ ] Ball  |    |  6. Small Green Box   |     |           |    |  7. Big Red Ball      |     |           |    |  8. Big Blue Ball     |     | [Filter]  |    |  9. Small Green Ball  |      The sidebar is a form which posts data to the same url and appends parameters based on the chosen options. (`www.example.com/toylist?color=red&type=ball`) The page is set to show all posts by default and read the URL filters and return the appropriately filtered posts. This worked successfully with just PHP. I then added ajax for a better user experience so when you click on the checkboxes, the table with repopulate with the filtered posts, instead of having to click on the filter button. I found that in order to use ajax with wordpress, you should route it through admin-ajax.php using the `wp_ajax_` hook. I added the hooks and changed the form's submission action to admin-ajax.php. Now, when javascript is disabled, the form obviously does not work anymore. I get a 404 because the browser is attempting to display admin-ajax.php. Is there a way to have a form work with and without javascript turned on using the wordpress ajax hooks? **Update** : Ok, so I fixed the 404 error. My url in the form action was incorrect. Functionally it works now without javascript, however the page it displays, `www.example.com/wp-admin/admin- ajax.php?action=my_function&color=red&type=ball` obviously is not picking up the styles in my theme. How do I route it back to 'www.example.com/toylist` with the return data from my function?


title: Wordpress Staging and Testing of Plugins Best Practices

text: I'm just being testing a lot around for pagespeed. Doing this on a live system is a pain since you only can work between 2am to 7am. I do have employees creating content on the live system also comments are stored in the live db. Wordpress seems to recommend to use one db (see: http://codex.wordpress.org/Running_a_Development_Copy_of_WordPress) Does this work with testing plugins and themes? Where do they store their settings? Kind of think this won't work since the plugins store their information in the database. Probably I need a local dev/staging installation or? What are the best practices for staging wordpress? Is there any smart way to only move the settings and updated files (theme, wordpress, ..) From dev to staging and from staging to live? ~~Is there any smart plugin allowing an staging environment?~~ Because that would be off-topic.


title: Using $seed on a custom post type for randomly displayed posts

text: I saw this link to display posts randomly without duplicating them. However how do you apply this to a custom post type? Below is what I'm using in functions to make it randomly display.                   session_start();          add_filter('posts_orderby', 'edit_posts_orderby');          function edit_posts_orderby($orderby_statement) {              $seed = $_SESSION['seed'];         if (empty($seed)) {           $seed = rand();           $_SESSION['seed'] = $seed;         }              $orderby_statement = 'RAND('.$seed.')';         return $orderby_statement;     }


title: add_image_size() and uploading the exact size leaves 1x1 image in uploads

text: I've added an image size of `370x150` which works, but if I upload an image to those exact dimensions `get_post_thumbnail()` no longer works as expected. If I look into my uploads folder I'll have a `thumbnail`, `medium`, and `full` along with a `1x1`. I add the image size like so:               add_image_size('homepage_featured', array(370, 150));      and call that image like so:               the_post_thumbnail('homepage_featured');      which then pulls up the 1x1 image size. I could probably circumvent this by adding a conditional before my thumbnail call which tests if that size exists:               $thumb = get_the_post_thumbnail($post->ID, 'homepage_featured');     $thumbArr = explode('width="', $thumb);     if(!empty($thumbArr) && is_numeric($thumbArr[1][0]) && $thumbArr[1][0] >= 370)         the_post_thumbnail('homepage_featured');     else         the_post_thumbnail('full');      but that seems silly. Is this a normal thing or is it a problem with my custom theme? Is there a better way to test if a certain thumbnail size exists than the above method?


title: Output posts attached images as thumbnails linked to full-size with lightbox class

text:
I'm trying to create a function to be placed in a template page to output the post's attached images. I would like to have the images display as the theme's specified thumbnail size and be linked to the full-size image so that I can give them a lightbox-triggering class (in this case thickbox). I currently can only get an image to output using `the_attachment_link` which links and displays the image but doesn't let me customize it like I need to in order to add the class. Here is my current code, including what works, what I think should work, and another solution I've tried:               function product_images() {     global $post;         $attachments = get_posts( array(             'post_type' => 'attachment',             'posts_per_page' => 0,             'post_parent' => $post->ID,             'exclude' => get_post_thumbnail_id()         ) );              if ( $attachments ) {             $content .= '
';             foreach ( $attachments as $attachment ) {                 // What works to display image but doesn't allow customizing output                 $imgthumb = the_attachment_link($attachment->ID, false);                 $content .= $imgthumb;                      /*What I WANT to work!                 $imgthumb = wp_get_attachment_url($attachment->ID);                 $content .= '';                 */                      /* Also tried                 $imgthumb = wp_get_attachment_image_src( $attachment->ID, 'thumbnail' );                 $imgfull = wp_get_attachment_image_src( $attachment->ID, 'full' );                 $content .= '';                 */             }             $content .= '
';         }     return $content;      } Thanks in advance for any help! I've been trying to get it going for several hours. I've looked at several other articles on this site but none were the same problem. I've also poured over the Digging into Wordpress article about image tags.


title: Will I see a performance hit if I use native API calls like get_the_title() instead of $post->post_title?

text: Let's say I've already got the $post object through some earlier process of looping through an array of IDs and using get_post() on each one of them, storing the resulting object in some array. Later on, I want to loop through that array and do something with each post. I already have a $my_post object, so I could `echo $my_post->post_title`, or I could get fancy and `echo apply_filters('the_title', $my_post->post_title, $my_post->ID)` or I could just use the native `get_the_title($my_post->ID)`. Here's where my performance question comes in. How reliable is the native cache (I'm not talking about some crazy plugin, just the built-in `wp_cache_get($post_id, 'posts')` etc..)? I guess what I'm asking is: what is the likelihood that get_the_title() will dip back into the DB and re-grab the post, as opposed to using the cache, and would I be better off from a performance perspective just using the object data that I already have? Clearly you get more sugar if you use the built-in stuff. But does it risk going back to the DB?


title: Questions regarding add_meta_box()

text: Registered a custom post type (`xyz`) and after that added a meta box using this excellent Tuts+ tutorial, so then I can reduce the usage of 'Advanced Custom Fields' where I can (but I love ACF most). But doing so, I came up with some questions:   1. What is the difference between `'high'` and `'core'` in the `$priority` parameter?   2. How the `'normal'` and the `'advanced'` are different from each other in the `$context` parameter?   3. However I added a meta box it showed a Standard meta box with sortable field-group. How can I achieve an Embedded-like meta box (as how ACF provides with `'Seamless'`) so then the field-group embeds on the body and user can't sort 'em as their wish? Is that only a CSS issue?   4. If I think to provide boolean `false` to `'supports'` parameter when registering custom post type (CPT) and make meta box with meta fields to the post type to get the data - is that good for all causes - whether a data hierarchy, SEO, and so on? ## EDIT I'm well aware about the Codex, and already tried the codex things here. On #1 & #2, I can't figure out how they are modifying my meta box due to their value changes. #3 is custom demand, seeking, but till couldn't find it. #4 is a general query, need your advice on experience.


title: Getting started with e-commerce sites on WordPress

text: Are there any good resources for building an e-commerce storefront? I am aware of the e-commerce plugins available but I am mainly interested in learning practices and techniques for the design and development of an e-commerce site for someone who has never built one before. Obviously, nothing is stopping me from just trying, but figured I would ask if there are good resources out there to learn from.


title: Editing 375 posts simultaneously? Maybe from the database?

text: I have a question regarding my site, tablified.com. I need to change a line of code on ALL of my posts. Within each post, there is a certain line of code that needs to be altered. This code is this: > [a href="https://market.android.com/details?id=COM.NAMEOFAPP.EXAMPLE>< > src="http://tablified.com/wp-content/uploads/2011/07/androidicon.png" alt="" > title="Click to Download from Android Market" width="300" height="48" > class="alignnone size-full wp-image-4507" /] This is found at the bottom of every post. As you know, this simply displays a clickable picture that takes the user to another page. For all 376 posts, 95% of this code is the same. The only thing that differs between posts is:               COM.NAMEOFAPP.EXAMPLE      that line is specific for every app on the official Android Market. I have found a new plugin that will allow me to display a widget at the bottom of the post with a nice picture and link to the official Android Market. To make a long story short, that entire line of code needs to be edit to look like this:               [app]COM.NAMEOFAPP.EXAMPLE[/app]      All I did was remove the first part of the code:               < src="http://tablified.com/wp-content/uploads/2011/07/androidicon.png" alt="" title="Click to Download from Android Market" width="300" height="48" class="alignnone size-full wp-image-4507" />      with `[/app]` so now you are left with               [app]COM.NAMEOFAPP.EXAMPLE[/app]       of course with the proper name of that particular app in between the `[app][/app]`. My question is, what is the quickest way to accomplish this? If I export all the posts to a XML file, I can use a text editor to make the changes. But what will happen once I import this file back into Wordpress? Will it overwrite the previous posts? Will it create new ones? What will happen to the screenshots with each of those posts? I am using a theme that doesn't actually attach the image to post, meaning if I export it, the pictures wont be there. Will they be lost? Please let me know if you can help me with this. Thank you so much for your time. I hope everything made sense. The fix seems simple, but I am not sure of the outcome. Ayman


title: Hide admin login without plugin

text: I'd like to hide my admin login, since it was disabled some time ago because of attacks. (I do not remember what they were exactly, my site was down for another reasons long time) I know there are several plugins to do this, but I would like to use my own code. Has anyone done this before, and is it possible to add this to theme functions.php? I have already searched but found no tutorial on the internet, but could this example be a starting point? Changing wp login url without .htaccess I have written my own template with functions already, but this is far more complex, so hope to get some hints from fellow more experienced wordpress coders. Sorry if this is a dumb question


title: Prevent comments from being rendered as HTML

text: I would like users to be able to enter XML structured text in the comments, but wordpress consumes the tags and they are not rendered. How can I disable this functionality? HTML is not important to me.


title: Why doesn't 'continue' work in page?

text:
OK, so I'm working with a template (I have contacted the developer and they were of no help, so I'm modifying the template page as needed). The template displays portfolio items, using the following code:

                     <?php                              $type = 'portfolio';                             $args=array( 'post_type' => $type, 'posts_per_page' => -1 );                             query_posts( $args );                                     if (have_posts()) : while (have_posts()) : the_post();                                               $terms = get_the_terms( $post->ID, 'portfolio_categories' ); ?>                                  if (has_post_thumbnail()) {                                                  $thumb = get_post_thumbnail_id();                                 $thumb_w = '460';                                 $thumb_h = '272';                                 $image_src = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'full');                                 $image_url = $image_src [0];                                 $attachment_url = wp_get_attachment_url($thumb, 'full');                                 $image = aq_resize($attachment_url, $thumb_w, $thumb_h, true);                                                       }                                                  $thumbnail = wp_get_attachment_image_src(get_post_thumbnail_id(), 'grid-thumb');                                      foreach ( $terms as $term ) {                                         $cats[0] = $term->name;                                         $catname = join($cats);                                              $catname = preg_replace('/\s/', '', $catname);                                                                   }                             $title= get_the_title();                             $title= explode(' ',$title);                             $title[0]= ''.$title[0].'';                             $title= implode(' ',$title);                         ?>                                             <li data-id="id-<?php echo $post->ID; ?>" data-type="<?php                                  $terms = get_the_term_list( $post->ID, 'portfolio_categories','',' , ','' );                                  $terms = preg_replace('/\s/','', $terms);                                 $terms = strip_tags( $terms );                                 $terms = preg_replace('/[\s,\-!]/',' ', $terms);                                 echo $terms;                                 ?>" class="four columns m-bot-25">

                                         <img src="<?php echo $image; ?>" alt="<?php the_title(); ?>" />

<?php echo $title; ?>
                                             <a href="<?php echo $attachment_url; ?>" class="lightbox zoom info">                                             <a href="<?php the_permalink(); ?>" class="link info">

                                         <a class="a-invert" href="<?php the_permalink(); ?>" ><?php echo $title; ?>

                <?php endwhile; ?>

      Basically, I need to only display posts that match a certain slug, which can be retrieved off $terms. However, when I try the following code modification:               if( $terms->slug != 'product-gallery' ) continue;      placed after the $terms = get_the_terms(...) line, it would seem that The Loop is broken, and no posts are displayed at all on the page. It's important that I can filter the posts, and by slug, as I can't modify the theme very much, and the client needs to be able to add/remove posts by categories for which there are slugs. Disclaimer: I am new to the WP environment, php, and mysql. However, I am a quick learned and I have plenty of coding experience in C++, Java, Perl, etc. I'm just new to web development. What am I missing or doing wrong for my goal? Thanks


title: Rewrite Rule for Post "Subpage", with pagination

text: I would like to know if is possible to add a "subpage" to a post and in this "subpage" have paginated content, for example: I Have a Post **Lorem Ipsum**   This post has **Videos** , **Photos** and **Audios** as attachments   When you access the post **www.website.com/lorem-ipsum/** you access basically just the text, and some other infos and you could access:   * www.website.com/lorem-ipsum/videos/    * www.website.com/lorem-ipsum/videos/page/2   * www.website.com/lorem-ipsum/audios/   * www.website.com/lorem-ipsum/audios/page/2   * www.website.com/lorem-ipsum/photos/   * www.website.com/lorem-ipsum/photos/page/2 I have this on my functions.php               <?php           add_action( 'after_setup_theme', 'rm_setup_theme' );          function rm_setup_theme() {              add_filter( 'rewrite_rules_array', 'rm_custom_rules' );         add_filter( 'query_vars',          'rm_custom_vars' );         add_filter( 'template_redirect',   'rm_custom_redirect' );     }          function rm_custom_rules( $rules ) {              $r = array(              '([^/]+)(/[0-9]+)?/photos/page/?([0-9]{1,})/?$' => 'index.php?name=$matches[1]&paged=$matches[2]&photos=1',             '([^/]+)(/[0-9]+)?/photos/?$'                   => 'index.php?name=$matches[1]&photos=1'         );              return array_merge( $r, $rules );     }          function rm_custom_vars( $qv ) {         array_push( $qv, 'photos' );         return $qv;     }          function rm_custom_redirect( ) {         global $wp_query;         $f = $wp_query->get( 'photos' );              if ( $f ) {             require TEMPLATEPATH . '/content-photos.php';             exit;         }     }          ?>      With this I have the following urls "working":   * www.website.com/lorem-ipsum/photos/   * www.website.com/lorem-ipsum/photos/page/2 But the pagination it's not working, it looks like the paged var it's not passed, it always show the content of the first page, no matter what page do you type in the address bar **/photos Request**   The request on photos page (www.website.com/lorem-ipsum/photos/): **Request:**   lorem-ipsum-dolor-sit-amet/photos **Query String:**   name=lorem-ipsum-dolor-sit-amet&photos=1 **Matched Rewrite Rule:**   ([^/]+)(/[0-9]+)?/photos/?$ **Matched Rewrite Query:**   name=lorem-ipsum-dolor-sit-amet&photos=1 **/photos/page/2 Request**   The request on photos page (www.website.com/lorem-ipsum/photos/page/2): **Request:**   lorem-ipsum-dolor-sit-amet/photos/page/2 **Query String:**   name=lorem-ipsum-dolor-sit-amet&photos=1 **Matched Rewrite Rule:**   ([^/]+)(/[0-9]+)?/photos/page/?([0-9]{1,})/?$ **Matched Rewrite Query:**   name=lorem-ipsum-dolor-sit-amet&paged=&photos=1 Thanks


title: Publishing Remotely To Wordpress?

text: Hey i know that there are options to post to a wordpress blog remotely by email or by another source. My blog is self hosted. What other ways is there to publish besides via email.


title: Display posts in random post types

text: I am currently working in a project in wordpress. Here i have to get all posts from two custom post types namely pt1, pt2. But here i want to display posts with random post type(pt1, pt2). Example) I want to display first post from pt1, next from pt2 and again pt1 and next pt2 and so on... How can i do this. Any help? This is the code:                $args = array(          'posts_per_page'   => 5,              'orderby'          => 'post_date',          'order'            => 'DESC',             'post_type'        => array('pt1', 'pt2'),            'post_status'      => 'publish'           );           $posts = get_posts( $args );          $num=1;          foreach($posts as $post) {              if( $num % 2 == 0 )                               echo $post->post_title.$post->post_type;              else                      echo $post->post_title.$post->post_type;              $num++;          }


title: deleting terms programmatically

text: I already checked out this page; http://codex.wordpress.org/Function_Reference/wp_delete_term It does not say what happens to the posts that may have been associated with this action. Hence my question; So, what happens to them?


title: How to use the bbPress import tool

text: I have used example.php to create a custom importer for Social Engine 3 to bbPress Forums but I don't seem to be having any success using it. What am I doing wrong? I enter server ip, name, port, username, and password but the import never gets past "Starting Conversion". When I select another platform's importer, I get errors saying there is no forum to import (which would be right because the table names/fields don't exist). What should I try? My attempt at the custom importer is here: http://pastebin.com/Z0Zj7n0q Edit: Firebug shows that starting conversion caused 500 Error.


title: Convenient way to use wp_filesystem

text: I'd like to use **$wp_filesystem** which seems to be the recommended way to manipulate file system objects in WordPress but compare this: **plain PHP code** :               mkdir('abc');      **WP Filesystem API code**:               $url = wp_nonce_url('plugins.php');     if (false === ($creds = request_filesystem_credentials($url, '', false, false, null) ) ) {         echo "Could not create filesystem credentials";         return;     }          if ( ! WP_Filesystem($creds) ) {         request_filesystem_credentials($url, '', true, false, null);         echo "Filesystem credentials were not available";         return;     }          $wp_filesystem->mkdir('abc', true);      This is a bit unwieldy and maybe I'm getting something wrong but isn't there a more convenient way to execute methods on `$wp_filesystem`? I tried to leave the credentials code out but in that case, the filesystem command didn't work.


title: Change Wordpress Gallery Markup in functions.php

text:
I'm looking to change the markup of the Wordpress Gallery, so that it outputs a new set of code. Ideally, this is what I want (a Bootstrap-based markup).

      Is there a way to do that in the functions.php file of my theme. The standard column, dt, etc.. markup is kind of annoying.


title: Create input select image URL?

text: My code in functions is:               <input type="text" name="Cat_meta[img]" id="Cat_meta[img]" size="3" style="width:60%;" value=" <?php echo $cat_meta['img'] ? $cat_meta['img'] : ''; ?>">      How to get select url as post add media ![enter image description here](http://i.stack.imgur.com/eUQZB.jpg)


title: Blank page beyond dashboard

text: ![enter image description here](http://i.stack.imgur.com/GjH7X.png) Our page is not showing anything past the dashboard. All that is showing is on the Jetpack section and the Portfolio section. Has anyone got any ideas why this is happening? Is it because we haven't been updating the site? We're a bunch of computer illiterate people here.. so any non-technical or low-technical advice would be appreciated! Thanks so much in advance for your help!


title: WP Create User - Preventing repeated information

text: I am using the               <?php wp_create_user( $username, $password, $email ); ?>      function in a contact form to create a subscriber when the user enters infomation on the contact form, thus in the background adding their email address to the database and giving them an account for site access. Does this way of doing it though not mean that if a user sends 3 messages from the contact form they end up with 3 accounts with the same email address, or will it check to see if the email address or user name already exists. Any ideas?


title: Why doesn't my page know it's a page (won't return true for is_page())?

text: I have a page with the slug `blog`. Mysite.com/blog correctly renders from the template file page-blog.php. However, it does not execute footer code from my theme that's conditioned on `is_page('blog')`, nor does it have an "Edit Page" link in the Admin bar. I also have a custom post type called `blog`, but this page doesn't execute code for `is_post_type_archive('blog')` either. In the admin bar, there is no "Edit Category" link or "Edit [Anything else]". This is the info the WP Debug plugin gives me when I load the page:               Request:     blog          Query String:     pagename=blog          Matched Rewrite Rule:     (blog)(/[0-9]+)?/?$          Matched Rewrite Query:     pagename=blog&page=      What could be the problem?


title: Isn't the way posts are displayed very unefficient?

text: I'm pretty much a WP newbie, and I've noticed that in a lot of themes, there is the exact same code for displaying posts in three different places (single.php, archive.php, index.php etc) This just bugs me. It doesn't seem right to me, a programmer always trying to code as efficiently as possible. What is the best way to generalize the layout for posts, preferably as a WordPress integrated/native function?


title: Help with adding conditional title tags to header.php

text: From an SEO perspective, i'm trying to add conditional title tags to my WP theme such that it echos a piece of text based on various categories. Assuming that my category id's are 1, 2, 3, 4 Then i'd like to add Title 1 if category id = 1, title 2 if category id = 2 and so on. Could someone assist in the correct php syntax to implement this. Thanks.


title: How To Determine If A Filter Is Called In A Sidebar/Widget Context?

text: So I have a plugin that appends or prepends an enhanced author biography to the content of a page/post/custom post type. It does this by hooking to either `the_content` or `the_excerpt` and appending/prepending content according to the plugin's configuration. I've started getting support queries where the author biography is appearing in the sidebar of a site via a widget, for example via the Category Posts widget. The widget is using `the_excerpt()` within a custom query Loop, to pull posts according to a configured category and show the post excerpt within the context of the sidebar. As a direct effect of this, my plugin's `the_excerpt` filter hook is being called. What I'd like to do is be able to detect whether my filter hook is being invoked within the context of the sidebar or a widget and conditionally decide whether to append my plugin's content to the post content passed to the filter hook. The pseudo-code would look something like this ...               add_filter ('the_excerpt', array ($this, 'insert_biography_box'));     function insert_biography_box ($content) {         if (in_sidebar ()) {             return $content;         }              // do code stuff to append/prepend biography content         return $content;     }      ... but after a lot of searching through the WordPress core source, forums and here it doesn't look like a function along the lines of `is_sidebar` or `is_widget` (or some other variation on the name) exists. Is it even possible to determine whether a filter hook function is being called within the context of the sidebar or within a widget? **EDIT** : Based on @toscho's suggestion to use `is_main_query`, I modified my filter hook for `the_content` and `the_excerpt` to look like this ...               add_filter ('the_excerpt', array ($this, 'insert_biography_box'));     add_filter ('the_content', array ($this, 'insert_biography_box'));          function insert_biography_box ($content) {         error_log ('insert_biography_box: current filter=' . current_filter ());         if (!is_main_query ()) {             error_log ('Not main query, baling');             return $content;         }              // do code stuff to append/prepend biography content         $biography = 'some-magic-function-return-value';         return $content . $biography;     }      Based on this, I was expecting to see the message `Not main query, baling` in my PHP error log when the Category Posts widget is calling `the_excerpt()` in the context of the sidebar. But I don't. For context, the Category Posts widget is querying for posts within the widget's `widget` method like this (severely paraphrased for clarity) ...               $cat_posts = new WP_Query (...);     while ($cat_posts->have_posts ()) {         $cat_posts->the_post ();         the_excerpt ();     }      ... am I missing something (very likely) or am I just not getting the context within which I'm using `is_main_query()` (just as very likely) ... ?


title: Can I define multiple paginations on a single page?

text: I have a category page, which shows this category's subcategories. I want in each subcategory to show its first five articles. And then provide pagination for each subcategory in order to allow user to see next/previous articles of this subcategory. How can I do this?


title: Use theme constants in plugin?

text: I'm creating a plugin version of the Roots Theme function additions - to make it a bit more portable, but have run into a snag. Part of what Roots does is add `htaccess` rules based on the current theme information -- like so:               // only use clean urls if the theme isn't a child or an MU (Network) install     if (!is_multisite() && !is_child_theme() && get_option('permalink_structure')) {       add_action('generate_rewrite_rules', 'roots_add_rewrites');       add_action('generate_rewrite_rules', 'roots_add_h5bp_htaccess');       if (!is_admin()) {         $tags = array(           'plugins_url',           'bloginfo',           'stylesheet_directory_uri',           'template_directory_uri',           'script_loader_src',           'style_loader_src'         );              add_filters($tags, 'roots_clean_urls');       }     }      So, it's basically checking to make sure that the current setup is not a multisite environment, not a child theme and that the permalink structure has been updated from the defaults. It seems like the `is_child_theme()` is not being called correctly, mainly because I get the following error on the frontend:               Notice: Use of undefined constant TEMPLATEPATH - assumed 'TEMPLATEPATH' in /Users/studio/Sites/base_wp/wp-includes/theme.php on line 17          Notice: Use of undefined constant STYLESHEETPATH - assumed 'STYLESHEETPATH' in /Users/studio/Sites/base_wp/wp-includes/theme.php on line 17      So, from what I can gather, it's the `wp-includes/theme.php` file that is not included in plugin files (which makes senses). I've been banging my head against the wall with this one, but am trying to figure out the cleanest way possible to add in those constants to the plugin itself -> should I just include that `theme.php` file? Thanks. **UPDATE:** Looks like I can use functions that are in `wp-includes/theme.php` (like `get_themes()`) so I know that's not the issue. hm...


title: the_post_thumbnail() Custom sizes not display correctly

text: I'm trying to display wide image icons from the_post_thumbnail() function. I'm using 'true' value for cropping, but they are not cropped well... I get some strange results with different sizes (I'm trying to use 200width x 150height). If image cannot be display with good proportions (I don't know why whem I'm cropping it? ) then I want it to have exact 150px height always! How can I achieve it? I've been trying with set_post_thumbnail_size() but its even worst...


title: Conditional Tag Custom Querys?

text: I think thats what its called... Basically a conditional statement if there are any posts in a specific custom post type/custom taxonomy, show posts, it not show an img or include whatever…? But cycle through a few custom post types? Checking in each if there is a post in the featured custom tax and if not skip on to the next one, ending up if a temp image or something... So a conditional tag with query i suppose…               if     <?php $loop = new WP_Query( array( 'post_type' => 'profile','profile-type' => 'featured','posts_per_page' => '-1' ) ); ?>     show post details          else if     <?php $loop = new WP_Query( array( 'post_type' => 'films','film-type' => 'featured','posts_per_page' => '-1' ) ); ?>     show post details          etc etc          else     show include or temp image      Can it be done, or asking a bit too much of the technology? Many thanks for any help :)


title: Putting a space between the buttons

text: <?php echo do_shortcode('[su_button url="http://google.com/checkout/" target="self" background="#2D89EF" color="#FFFFFF" size="3" wide="no" center="no" radius="auto" icon="icon: shopping-cart" icon_color="#FFFFFF" text_shadow="none" desc="" onclick="" class=""]Buy now            $149[/su_button]'); ?>      so right now the button says Buy Now $149 but I want to put 2 more spaces between the text. Manually inserting spaces doesn't seem to work.


title: How to handle a hierarchy with custom post types

text: I have moved into WordPress for a few days and was quite impressed by all the available features, plugins and polished themes. I have spent quite some times reading documentation about themes and custom types. So far so good... Now that I'm trying to do real things, it seems (but I maybe missing something) that WP has some sever limitations. I want to come up with a classical ISV site. A typical hierarchy would be:   * Products   * -- Product A   * ---- Overview   * ---- Release History   * ------- Release 1.5    * ------- Release 1.4   * ------- Release 1.3   * ------- etc.   * ---- Features   * ---- etc.   * -- Product B   * ---- Overview   * List item    * etc... Focusing on Release History, I came up with:   * a custom content type: "releases".   * a custom taxonomy to specify the product associated with a specific "release".   * I created a template to display the list of "releases".   * Created a single-release.php to display the detail of a release.   * Created a page based on my template. The page URL that display the list of "releases" will basically fit into the hierarchy (/products/product-a/release-history/). However the URL of the custom post type will be something like: /%post_type%/%post_slug%/ (ie: /releases/version 1.2/ I'm struggling for 2 days trying to find a solution for coming with a coherent URL scheme. I have tried to use to use Custom post permalinks plugin to come up with an URL that would include my custom taxonomy representing the product (better than nothing even if it's not perfect) but for some reason the plugin doesn't work on my side. Overall, unless I'm missing something, Custom Post Types sound great but are quite a nightmare if you don't have a flat structure. I would certainly have preferred a concept of custom content type that is not URL dependant or an easy way to plug a custom post type at any level in the page hierarchy. That said, I may be completely missing the point. Does anybody have any idea, experience when setting up a site with this kind of hierarchy? Any help appreciated... ## [Update] Not completely sure what are the conventions when updating here but I will leave the initial text for clarity purposes. The purpose of this update is to clarify and add further details. _Products_   Created a WP page 'Products' - no parent - URL: http:///products/ _Product A (specific product)_   Created a WP page 'Product A' - parent: 'Products' - URL: http:///products/product-a/ _Overview_   Created a WP page 'Overview' - parent: 'Product A' - URL: http:///products/product-a/overview/ _Releases (list of release for the specific product )_   Created a WP page 'What's New' - applied a template that displays a list of all available releases (each release has a link to display the detail of that specific release) - parent: 'Product A' - URL: http:///products/product-a/product-releases/.   Releases are implemented using a custom type (see below). It was therefore quite easy to implement the template and link to release permalink. Though I haven't implemented it yet, my idea was that the template would display the release list for any product based on a taxonomy (product-id) defined at the page level. I could therefore have another page using the same template that would display the releases for another product by having the proper 'product- id' taxonomy attached to this other page. _Release (detail of a release)_   Releases are implemented using a Custom Post Type (let's call it 'product- release'). In addition, I'm using a custom Taxonomy (product-id) to attach each release to a specific product (obviously, I don't want to create another Custom Post Type for the releases related to another product).   Created a 'single-product-release.php' file to display a specific release. The problem with this approach is that a specific release will be displayed with the following URL: `http://<root>/product-releases/release-xx`   * It's not really descriptive, the least we can say (I should at least get some product identifier in the url)   * it somewhat breaks the hierarchy (though one could certainly argue regarding if it's wrong or not) ### My Options (as far as I can see as a WordPress newbie) _Get rid of the permalink stuff_   Maybe I could display the detail of a release using some template and passing some argument in the URL. I could use this template with a page that would go exactly where I want in the hierarchy.   Obviously not an approach I would follow ... for many reasons I won't detail here (that's already a long post/question). _Find a way to append (or rather prefix) my 'product-id' value to the Custom Post Type permalink_   We could have something like http:///product-a/product-releases/release-x. I would have to accept that releases live somewhat outside of the 'natural' hierarchy which would be http:///products/product-a/product- releases/release-x.   I could go even further by prefixing with 'products' - something like /products/%product-id%/%product-release%/. However, I'm wondering if this Rewrite Rule would not clash with the 'pages' created under the 'products' page... Any input appreciated. ## [Update] I implemented the approach proposed by bobdiaes. This works fine for my content type however this will clash with the WP pages that are mixed in the hierarchy. Using bobdiaes piece of code, I came up with the following Permaling for my product-release custom post type:   `/products/%product-id%/product-releases/%product-release%`   I will therefore have the proper product URL for displaying the detail of a release for a specific product. ie: `/products/my-great-product/product- releases/release-1-5/` However, I want to have some WP pages in the mix:   * `/products/my-great-product/`should provide an overview of the product.   * `/products/my-great-product/product-releases/`should display the list of releases + the details of the latest release. At first, it sounds quite natural to create WP pages to do what I need. I will organize my page hierarchy so that the pages fit in the exact URL scheme. However, this approach will clash with the URL rewriting used for the "product-release" Custom Content Type and I won't be able to browse the pages (404). Well, well, well... ### So what are my options now _Give up the idea of using WP_   Well, I think I'm going to insist some more. Beside this problem, there are many things to like with WP. _Use Pod CMS_   Though I haven't tested it yet. It sounds like a nice framework/tool. However, I would loose the ability to easily translate my content using WPML.   The fact that they will be able to use custom post types rather than their own table in version 2.0 will certainly let them rely on current plugins for translation purposes. What they are preparing for version 2.0 sounds interesting. They will be able to use Custom Post Type instead of their own tables.   Pod CMS 2.0 could be **THE SOLUTION**. _Using WP pages instead of a 'product-release" Custom Post Type_   The idea here would be to create a page for each product release (with product-releases page as the parent). I suppose it must be easy to loop through child pages for displaying the list of releases.   Obviously, it has quite some drawbacks:   * The current admin page interface may not be very practical to handle hundreds of pages...   * Because the page is already a specialized Custom Post Type (as far as I understand), I would have to remember the specific custom fields I need each time I use a page like a pseudo-content type unless I want to create all fields that may be needed all over the web site. Quite an horrible solution if you ask me. _Replace WP pages by some Custom Post Type_   Not sure about the possible rewrite rules clash but here is the idea. Instead of having an overview page, I could come up with a 'product-overview' Custom Post Type and use a permalink rewriting rule the same way I did for 'product- release' Custom Post Type. Will update with my findings. I'm sure I'm not the only facing this WordPress URL hell. Though I have to admit that the Generalisation of a "post" into a custom post type is quite clever, the permalink stuff comes with its own constraints. > A word of caution - being new with WP, I may have overlooked something > completely obvious ## [Update] Well, as frustrating as it may be, it seems that this is just impossible. Well there is certainly a solution that involves some tricky URL rewriting but certainly nothing trivial for an approach that is however quite common.   Basically, I believe at this stage, that one should tie to a rather simple URL scheme. Will try the wordpress forum, but I don't have much hope.


title: How to fix strange 500 Error after Editing Menu?

text: I have strange situation which just started which I seem to be unable to resolved. I am not sure what this might be related to but I think I remember reading somewhere that this has happened to someone else. Upon logging into WordPress then going into the menu management area, then clicking on "screen options" and enabling the view of a menu metabox for a custom post type that was created and then adding a page from that post type to the menu the menu management area started showing a Internal Server Error 500 message. Every other area of the website and admin area works perfectly except for the menu management link. I have attempted everything I can think of in an effort to resolve the problem including removing every plugin and customization made to my `functions.php` file however I can't get the issue resolved. I was hoping someone here might able to help me resolve this issue or suggest anything to diagnose this issue. Any help is greatly appreciated!


title: Survey plugin recommendations

text: What is a good plugin to do surveys for wordpress. I can think of creating a custom contact form 7 - but i was having problem in the formatting and separating it from the body of the post visually. and it doesn't store survey result in some document or spreadsheet, so eventually i'll have to track everything manually. so - i am on the hunt for a survey specific plugin. the questions are simple, i need option buttons, check boxes, text boxes - and like 10 questions max - nothing fancy. Thanks in advance for the help Suggestions other than poll-daddy are welcomed :)


title: HTML link within my plugin settings page

text: My plugin has a settings page. It's working fine. Now, i want to put a html link within this page. This link will go to another settings page. How could I do that? Thanks.


title: Post Thumbnail help

text: I'm using the post thumbnail feature to show portfolio work, so for example `<?php the_post_thumnail(); ?>` the problem is I want to show a particular width of image only, which is 640 but because my pieces are website they have varying heights. I'm using this code to create the images: `add_image_size( '640', 480 ,true ); // 640x480 image size` but it's specifying the height how can I ONLY specify the width?? Thanks Ps. I know I could use CSS, but I want to actually create images at 640 wide and not use any timthumb stuff etc. Thanks


title: Use Facebook PHP SDK from WPBook

text: I'm using the plugin WPBook, I'm wanting to use the Facebook PHP SDK. How can i get access to the facebook Object that WPBook is ising. Do anyone of you know how to access it from WPBook, I know it is a global variable somewhere, how do i load it??


title: What are the things that will be affected in case there is some wordpress updates or theme updates?

text: I amm getting into my head what this child theme is. I have just read it on the internet, and wondering if I do really need to study it or no need. I don't know any coding and stuffs. I don't have this child theme, its new to me. Can someone specify what are the things that will be affected in case there are some wordpress updates or theme updates in future? On my websites, I only change certain things like:   * font color   * font sizes   * font faces   * resizing images    * changing texts   * chaging fonts using theme options that comes with the theme   * wordings, images, contents   * sizes of certain stuff 1) Will my sites be affected when time comes that I need to update? 2) What are the things that will be affected in case there is some wordpress update or theme update? 3) Does that mean, if I make changes to the above listed things, the contents inside style.css will also change?


title: How to change language?

text: Sorry for this complete newbie question, but I googled it and cannot find this simple information. I just installed Wordpress today. Right now all text on my Wordpress Blog is in English: "Home", "About", "Comments", etc. How can I change the language? * * * Update: I am actually not out of the woods yet with this one. I have:   1. located the fr_FR.mo file and copied it into a new directory '/wp-content/languages/'   2. Modified the wp-config.php file to have the following line into it: > define ('WPLANG', 'fr_FR'); Unfortunately I still get the interface in English. Any help would be much appreciated. * * * Ok, I found the problem: I was adding the line: > define ('WPLANG', 'fr_FR'); when in fact there was _already_ another line of code: > define ('WPLANG', ); which was probably overriding my bit of code. Thank you for your help.


title: Category names on CPT archive pages

text: I purchased a theme and I'm trying to customize the "blog archive" pages for the Portfolio CPT that's included with the theme. The theme is: http://www.templatemonster.com/wordpress-themes/38602.html I've created some Portfolio categories and linked to them in the menu. Here's an example: http://billy.slushman.com/portfolio_category/kitchens I want it to say "Kitchens" instead of "Blog Archives". How would I do that?


title: How to control SSL in Wordpress for automatically changing http to https?

text: I have a domain and one subdomain. The domain has a installed SSL with valid certificate but the subdoamin doesn't have it. I have a link from domain's wordpress header.php file that pointing main page in subdomain. The link supposed to be as HTTP but it was changed to HTTPS. I edit header.php file but after update the file it changed to HTTPS again. I installed Wordpress HTTPS plugin in domain wordpress. What I have done: The domain wordpress is located in Domain/app which I copy the files and folders to root directory (Public_Html) a by Godaddy technician's suggestion (my domain is from Godaddy). The subdomain wordpress is a clone from the main wordpress. Please let me know how to change this link to HTTP. I appreciate it in advance for your help.


title: Sticky navigation and the wpadminbar

text:
I have got a site with a sticky header navigation. The problem is that when I am logged in, the `wpadminbar` falls over the navigation. The code of my navigation is:

     ....      As you can see I use Bootstrap. Is there a way to get the `wpadminbar` not to lay over my navigaion?


title: Programmatically choose a background-color to go with an image?

text: Is there a function, either in PHP or Wordpress itself, or in a plugin, that will choose a good css background-color to go with a given background-image? For example, if someone chose a very large dark-brown design for a background, it should have background-color of brown so before the image loaded, or if the image failed to load, it would still look ok.


title: Get next post in category with AJAX?

text: I need a simple solution to load the next post in the category of the current post (in a custom single.php) with AJAX once the reader scrolls to the bottom of the page. I'm using a custom theme. What's the easiest solution for this (I'm not experienced with wordpress)?


title: Remove rows in the manage post/page view

text: I'm looking for a way to remove the rows with the title, date and other stuff that's shown on the manage posts/pages screen (highlighted with red in the image below). I know that I could easily hide it with css, but I'm wondering if it's possible to do it without css and hacking core files. ![Visual description on what I want to remove](http://i.imgur.com/EA18A.jpg)


title: WordPress & W3C CSS Validation

text: I've played around with WordPress here and there for a few years and am wondering about problems with CSS validation with WordPress themes. This may seems like a stupid question, but: Is there a reason, relating to WordPress, why it appears no themes I've run across come up error-free in WC3 CSS Validation? I thought of a number of reason this may be happening:   * Those designing many themes not caring whether or not it pass validation   * I'm getting my themes from not so great sources   * There are quirks with WordPress that force designers to "hack" at their CSS Just wondering.


title: Can't upload images due to permissions error

text: For some reason when I try to upload an image to my blog I get an error message saying that WP can't create a folder under the relevant directory (wp- content/uploads/2010/09) and it's asking if the folder above it has write permissions. The parent folder indeed has write permissions. I tried creating the folder manually and it still shows the same error message.