Why is my plugin version 0.1?

If you look at the changelog, it says my version number is 1.0.0. If you look at the button to download, it says 0.1. Also, if you hover over it (or click it), the url says 1.0.0, and the svn repository also only has the tag 1.0.0. I'm just wondering how to change the version number on the button, and in the `compatibility` section, and in the developers tab under current version. Here's the link to the plugin: http://wordpress.org/plugins/leaflet- map/changelog/ Here's the svn tags directory: http://plugins.svn.wordpress.org/leaflet- map/tags/


New Page Position

I am building a wordpress theme for personal use. I am facing a challenge for the first time and I really don't know how to achieve what I want. The website's header structure is: FIRST LINE: logo / SECOND LINE: custom jquery slider / THIRD LINE: navigation menu. What I want to do: When someone clicks the link to go to a page EXCEPT the homepage then I want the FIRST & SECOND LINE appear to the very top of the page out of the screen and the THIRD LINE will be displayed on the highest area of the screen. Anyone knows anything about how to achieve that? Sorry for my bad english. Thanks in advance.


Is it proper to create a page just to generate a listing page (eg. for a custom post type)

I find myself creating pages just as a "placeholder" to a listing page. eg. I create a page "Blog" and "Portfolio". Both has the editor emtpy. And I just use it so that I can use `page-blog.php` and `page-portfolio.php` for the respective listing pages. It doesnt seem proper? Is there a better way?


wp_ajax_$action works always, wp_ajax_nopriv_$action never works

I used to know that when we use Ajax API we use 2 action hooks to handle the ajax, `wp_ajax_$action` (Logged in users) and `wp_ajax_nopriv_$action` (Non- logged in users), But in my case, the latter one never works, If you're logged in or not, It will not work for you, But the former one works always, Wheather the user logged in or not, It works! Part of the code :               add_action( 'wp_ajax_my_plugin_ajax', 'my_plugin_ajax_handler' );     function my_plugin_ajax_handler() {         echo 'test';         die();     }      This one should work for logged in users only right? Well for me it works for everybody, Whats the matter. did anyone faced this problem before ?


How can I minimize the content of my RSS feed to fit more items in Feedburner's 512k limit?

Feedburner won't read your feed if it's over 512k. Our podcast (http://herdingcode.com) has been around for 3 years now, and returning all items puts us way over that limit. We've had new listeners request that we include them all, though, and I'm wondering if that's easily possible. I'm thinking I could hack around with feed-rss2.php and add some conditional logic that puts full details for the most recent 75 shows and truncated descriptions for all the older shows. Has someone already done this, or got some tips on how to set it up?


Enqueue different stylesheets using IE conditionals

I want to load a different css for IE 9 below so I have two files : - style.css - ie.css I used this code :               <!--[if !IE]> --> style.css <!-- <![endif]-->      and used this for IE               <!--[if IE]>  ie.css <![endif]-->      but I dont know how to use this condition to use **style.css** for both non-IE and IE9


Trimming breaks up markup

Lets say that I have this text in a field:
The first expedition to the red planet has ended in disaster!

Your ship has crashed in the surface and all your equipment is lost. You managed to descent to safety with a single spacesuit and a limited amount of oxygen. Your only hope… to reach the rescue module before your air supply runs out!

With every step you are either closer to salvation or to your grave, be careful! Try finding the scattered remnants of your shipwreck across the dry landscape to help you in your journey; you will need the very precious o2 capsules and spare parts to upgrade your suit.

Hurry up, every second counts!
      If I do this, the text shows without problem:               $text = types_render_field('game-description', array());     echo $text;      But if I try to build automatically an excerpt, like this:               $text = types_render_field('game-description', array());     echo wp_trim_words($text, 65);      I realize that the `<p>`'s are all gone, leaving the text looking like this: > The first expedition to the red planet has ended in disaster! Your ship has > crashed in the surface and all your equipment is lost. You managed to > descent to safety with a single spacesuit and a limited amount of oxygen. > Your only hope… to reach the rescue module before your air supply runs out! > With every step you are either closer to salvation or to… When I much would rather have it like this: > The first expedition to the red planet has ended in disaster! > > Your ship has crashed in the surface and all your equipment is lost. You > managed to descent to safety with a single spacesuit and a limited amount of > oxygen. Your only hope… to reach the rescue module before your air supply > runs out! > > With every step you are either closer to salvation or to… I know that you can write customs excerpts in each post, but the idea was to make it automatically and unload this task on the maintainer of the web. Is there something I can do to fix this? **UPDATE:** I forgot to say that I am using the extension Types, that is where the function `types_render_field` comes from. Basically to get the fields of the custom posts


How to detect if is_404() or is_page() or etc...?

is there any way, to output, like this:               echo $current_type;      and it gave me: `is_404()` or `is_page()` or whatever it `is_blabla()`


Does the 'nav_menu_css_class' filter accept 2 or 3 arguments?

I've been using the `nav_menu_css_class` filter in one of my plugins, implemented as:               add_filter( 'nav_menu_css_class', 'wbwcrf_nav_menu_css_class', 10, 3 );     function wbwcrf_nav_menu_css_class( $classes, $item, $args )     {         /* snip */         return $classes;     }      The filter clearly has 3 arguments in the code (source) yet someone using my plugin has told me they get the error `Warning: Missing argument 3 for wbwcrf_nav_menu_css_class()`. So I looked at the codex documentation on `nav_menu_css_class` which has an example using 2 arguments, I changed my code to 2 arguments since I'm not actually using the $args argument and everything seems to be working fine. But I'm still really stumped as to why the source has 3 arguments yet the codex has 2 and why I don't receive any error when using 3 arguments, yet someone using my plugin does. Anyone able to clear up my confusion here please?


Admin Hook at the Login Page

I need to write code before user can enter username and password. So, I have code written just after the following line in wp-login.php page:               $action = isset($_REQUEST['action']) ? $_REQUEST['action'] : 'login';      The above line is somewhere # 372. My line:               if ($action == 'login') {        // My code     }      When done like this, script run before even username and pwd box comes. I am thinking of adding hook etc so that I do not need to modify wp-login.php page. Any idea?


How to created a hosted Woocommerce solution?

I would like to offer my clients a hosted solution of Woocommerce similar to Shopp and Shopify. I want to make as simple as possible for my clients to get thier stores up and running in no time without any technical expertise. Is it possible? What's the best approach? Deploy to Amazon AWS or use a VPS? Is there any customization required to Woocommerce or Wordpress? What is the best way to achieve this?


Instantiate class to be available to all plugin functions

I'm developing a plugin for a site that has to communicate with several non-wp tables in a database. For that I made a class that contains all of the MySQL- related functions. When you declare a function within a plugin, you can easily call it within a theme. But how to do that with a class? Is there a way to instantiate it with wordpress init and make it available to plugin(s) and theme(s)? Thank you for your time! :)


Media library not loading in custom post type

I have a WordPress multisite, and I created a plugin to share WooCommerce's product with a child website by changing the global variables ($wpdb) values when the URL has the **post_type=product** argument. Everything is working fine except the media library. I can set product image from the main site. But is not displaying in the child and no images are listing in the media library pop up, and I am getting errors when I try to upload a new image. My code is below.               $wpdb->links='wp_links';     $wpdb->postmeta='wp_postmeta';     $wpdb->posts='wp_posts';     $wpdb->terms='wp_terms';     $wpdb->term_taxonomy='wp_term_taxonomy';     $wpdb->term_relationships='wp_term_relationships';     $wpdb->categories='wp_categories';`


Blank upload.php page

I am wanting to optimize the images that I have previously installed on my Wordpress site. I haven't uploaded any images for a while but now when I try to access the Media Library (Media > Library) but now I am been returned a blank page. Why is this? I desperately need to access this page to speed up my website. I can still add images through the Media > Add New menu option. I haven't installed any plugins since the last time I uploaded an image through the Media Library so I can't see it been a conflict from a plugin. When I view the source code for the page, this is also blank. Could it be something in the .htaccess file or the header.php? I'm pretty new to using Wordpress to this scale and any advice would be greatly appreciated.


Can I use bcompiler for developing WP plugins?

Can I develop WordPress plugins complied by bcompiler bytecode compiler? I want to make my WP plugins in binary code for protecting my code.


advanced custom field Show field in special categry page

I am a big fan of Advanced Custom Fields plugin   http://www.advancedcustomfields.com/ I developed a site where there are 2 types of categories: normal and “custom” most of the categories display normally like any other site showing the posts in the archive.php page and some posts archive are displaying in a special “category” template which I created which is styled differently called: “ **category-projects.php** ” this is a special “archive” or “category” page which display different archive template for special posts. this template works fine and using a function I created and everything looks good. Now, I am trying to create ACF slider using the great repeater that I have in this special category template. so I created this new group called “ **post_slider_projects** ” and a simple repeater field for images called: “ **post_slide_projects** ” Now, I assigned the rules to appear in category and I see it when I am browsing my admin categories section. until this point everything is working. the only problem is that it is not displaying when I look at the site in this special category page.. here is the code I was using to display it:               <?php if(get_field('post_slider_projects')){ ?>

               <?php while( has_sub_field('post_slider_projects') ){                  $post_slide_projects = get_sub_field('post_slide_projects');                 ?>
 <img alt="" src="<?php echo $post_slide_projects;?>"/>
                              <?php } ?>               <?php } else{ ?>                <img alt="" src="<?php bloginfo('template_directory'); ?>/assets/images/slider-img1.jpg"/>                <?php } ?>

     <?php } ?>      Any help will be appreciated   Thanks a lot


Detect plugin/theme installation (via upload)

I am currently trying to detect when an administrator uploads (and installs) a theme or plugin. The code I wrote is very fragile because it depends on the chance that the plugin/theme's name is the same as the uploaded zip file (which is rarely the case).               function EventFileUploaded($attachmentID){         if(isset($_REQUEST['action'])){             $file = get_attached_file($attachmentID);             switch($_REQUEST['action']){                 case 'upload-theme':                     HandleThemeUpload($file);                     break;                 case 'upload-plugin':                     HandlePluginUpload($file);                     break;             }         }     }     add_action('delete_attachment', 'EventFileUploaded');          function HandleThemeUpload($fileName){         $themes = wp_get_themes();         // TODO somehow find which theme in $themes was installed from $fileName     }          function HandlePluginUpload($fileName){         $plugins = get_plugins();         // TODO somehow find which plugin in $plugins was installed from $fileName     }      I basically need to fill up the two TODOs marked above. This is a sample of the code I was using:               $fileName = explode('.', basename($fileName));     foreach(get_plugins() as $pluginFile => $plugin){         if(strtolower(str_replace(' ', '-', $plugin['Name'])) == $fileName){             $newPlugin = $plugin;             break;         }     }     // use $newPlugin if set      Of course the code above fails in some situations. _PS: I wasn't sure what tags to use, feel free to suggest better ones._


Show message if statement is false - foreach

I got this PHP script from http://tutorialzine.com/2010/02/php-mysql-download- counter/ and integrate it to my wordpress successfully. It works but the "No Download File" message appears even the value is true. Here is the code:               <?php         $value = get_post_custom_values("kpm_UploadFile");         $url = ($value[0]);         $tokens = explode('/', $url);         $dlvalue = $tokens[sizeof($tokens)-1];              if (current_user_can('read')) {                  foreach($files_array as $key => $val) {             if ($dlvalue == $val){                 echo 'Download File
'.$val.' has been downloaded '.(int)$file_downloads[$val].' times';                 }else {                     echo 'No Download File';                 }             }         } else { echo 'Register to download';}     ?>      What im trying to achieve here is to show the download file. If there is no file in "kpm_UploadFile" custom field or if its not present, a else statement saying "No Download File". I can remove the > echo 'No Download File'; but I want to show a message if there is no value.


Displaying Remote Data inside of Theme admin

I would like to add a button under my theme manager which shows a thumbnail listing of available skins (that did not ship with the theme when it was installed). I'd like to feed this listing from a file on a central server that I maintain. Looking for some advice on how to best implement this within WordPress. I will periodically add new skins to the available listing and would like for users of my theme to be able to view them and perhaps even see a "new" icon when a new skin is first launched. _I'm also interested in the merits of hosting and serving the file from Amazon s3 vs my own server_


Shared user database trick not working

I am trying to implement the shared user db trick as outlined here. http://xentek.net/articles/528/implementing-the-wordpress-shared-users-table- trick/ On step 3, I get the following screen. It tells that the "User already exists" but when I submit it get the error "please provide a valid username" and it won't let me set up the site. Any suggestion on why this is happening or a better way to debug what is going on behind the scenes? ![screenshot](http://i.stack.imgur.com/kfcvl.png)


wp.getUsersBlogs XMLRPC Brute Force Attack/Vulnerability

After the holiday weekend, one of the larger sites I manage had a brute force attack on it. The attacker was attempting to use the `wp.getUsersBlogs` function and a list of popular usernames and passwords. A quick bit of research shows me that after a successful attempt this function will return whether or not the user is an admin. I use the IP Blacklist Cloud Plugin as part of my security so it logged the attack, but because this attack method doesn't use the normal login method no actual blacklisting happens. Which isn't likely to help anyway, because after every single attempt the attacker used a new IP (totaling over 15000 IPs so far)(20,000+ for a second attack). I did find a plugin that completely disables the XML-RPC (API), but I'm not sure that won't cause other problems. This is a live website for a local municipality, so I cannot afford to experiment very much. here is an example of what got logged in IP Blacklist Cloud: > "1.0" encoding="iso-8859-1"?>wp.getUsersBlogsusernamepassword Where **usernamepassword** will be replaced by something from a giant list of popular usernames and passwords. The attack seems to be gaining popularity, so I hope that spawns some more solutions. Update 20140728: One more site of mine played victim to this attack over the weekend. So far strong passwords have kept me safe, but others may not be so lucky. I am trying the above mentioned solution as it seems to be the best one I have found yet. Links to more research: API for WordPress XML RPC http://codex.wordpress.org/XML-RPC_WordPress_API Least intrusive solution so far http://www.cryptobells.com/more-wordpress- xmlrpc-brute-force-attacks/ WordPress Support forum http://wordpress.org/support/topic/recent-new- xmlrpcphp-brute-force-password-guessing-attack-details


How to hide a specific category posts in my monthly archive?

I am using the twenty eleven theme in my wordpress site. In posts, I have two categories. One is blogs and other is News. The monthly archive displays the posts of all categories while I want that the monthly archive should only display the posts of blogs category. How will I do this? I have also installed the wp_pagenavi plugin for the pagination.


Starting point for custom Themes

What are good themes to start from when creating a custom WordPress theme? So far I have found:   * HTML5 Reset Theme   * Constellation Theme


How to create different menu's for not logged in visitors and for logged in members?

I'm creating a website which will provide services to members and I want to make it so that when a not logged in person comes to the website the menu is specifically designed for sales pages to make him register, but when a logged in person comes in he sees a different menu that is for the sole purpose of delivering the services. I want to make this because I don't want my already members always going to the website to read the sales pages. I would so appreciate your help, just can't figure this out on my own. And I think this would be pretty neat also :) hoping for an answer


Display custom post type

I am using this code to display custom post type.               $gabquery = new WP_Query();     $gabquery->query('showposts='.$showpostbotleft.'&post_type=courses' );      How to edit it to limit number of posts and specific taxonomy name of this custom post type.


rewrite_rules() not applying rules on plugin activation only after permalinks menu is clicked

thanks to Roman for pointing me in the right direction my plugin is almost ready. The only problem i am now facing is that i cannot get the rewrite_rules applying on activation they only work after i goto the Wordpress admin menu, goto the Permalinks settings page and click Save Changes, then it all works. I am using rewrite_rules_array to put my plugin rewrite rules at the top, but this is not called on plugin activation as addRewriteRules expects an existing array from the Wordpress engine. Would appreciate pointers on how to activate this, a cut down version of the plugin code is below. Thanks in advance, Chris.               class JFormerForWP     {     static $errors = false; /* for debugging */          const DB_VERSION = 1; // This number represents the current version of the plugins table structure. Increment this every time you modify the scheme of the database tables that you create for your plugin.          static $pluginPath;       static $pluginUrl;       static $registry;          /* called each request */     public static function init()     {         self::$pluginPath = dirname(__FILE__);  // Set Plugin Path           self::$pluginUrl = WP_PLUGIN_URL . '/jformer-for-wp/'; // Set Plugin URL           add_filter( 'rewrite_rules_array', array(__CLASS__,'addRewriteRules'));         add_filter( 'query_vars', array(__CLASS__, 'addQueryVars'));         add_action( 'template_redirect', array(__CLASS__, 'formDisplay'));              add_action('wp_print_styles', array(__CLASS__, 'styles'));         add_action('wp_print_scripts', array(__CLASS__, 'scripts') );         add_shortcode('jformer', array(__CLASS__, 'shortcodeHandler'));              /* for ajax functionality */         add_action('wp_ajax_nopriv_jFormerForWp', array(__CLASS__, 'ajaxHandler'));         add_action('wp_ajax_jFormerForWp', array(__CLASS__, 'ajaxHandler'));              self::$errors = new WP_Error();     }          public static function addRewriteRules($rules)     {          $newRules = array(              'forms/?([^/]*)' => 'index.php?formid=$matches[1]',              );          return $newRules + $rules; // add the rules on top of the array      }          public static function addQueryVars($vars)     {         $vars[] = 'formid';         return $vars;          }          public static function formDisplay()     {         if( $formid = get_query_var( 'formid' ) )         {             $formCode = self::getForm($formid);             if($formCode != -1)             {                 include ( self::$pluginPath . '/html/redirect-page-header.php' );                 echo $formCode;                 include ( self::$pluginPath . '/html/redirect-page-footer.php' );                 exit;             }         }     }          public static function activate()      {         flush_rewrite_rules();     }          /* This function will run when the user deactivates the plugin from the WordPress Plugin screen. You might want to put some code in here to remove the tables and options that your plugin created, but, if you do that here, and the user reenables your plugin, they will lose all the data and settings they had previously set. Your alternative, is to create an uninstall.php file and place your cleanup code in there. This code is run when the user deletes your plugin. Open uninstall.php to see how this file works.  */        public static function deactivate()     {         flush_rewrite_rules();     }     }          register_activation_hook(__FILE__, array('JFormerForWP','activate'));     register_deactivation_hook(__FILE__, array('JFormerForWP','deactivate'));     add_action('init', 'JFormerForWP::init');


Zigconnect Plugin: Allowing editors to remove connections

I'm using the ZigConnect plugin to set relationships between different types of posts. It appears that editors do not have the ability to remove connections, although this works fine for admins. How can I enable editors to remove connections? Also, I have the User Role Editor plugin installed, but I’m not sure which capability would allow an editor to remove a connection. I'm using WordPress 3.1.4 Multisite and Zigconnect plugin version 0.8.6


Get menu object from theme_location

I'd like to get a menu object from its theme location argument. My goal is to output separately the menu name and its items name, url and description. Example of what I'm looking for :               $menu = get_menu('nav-menu'); //get menu from its theme location     echo $menu->name; //displays the menu name     foreach($menu->items as $item){         echo 'link'">'.$item->name.''; //displays a link to the item destination         echo $item->description; //displays the item description     }


Remove before_widget / after_widget content from Wp_Widget_Text

I want to take the text widget and remove the preceding / trailing markup from the text output currently showing as
Test
      The before_widget / after_widget that is assigned with each widget area is under my control but the widget content itself is beyond me.               // Area 4, located in the footer. Empty by default.         register_sidebar( array(             'name' => __( 'First Footer Widget Area', 'lakeshoreautoclinic' ),             'id' => 'first-footer-widget-area',             'description' => __( 'The first footer widget area', 'lakeshoreautoclinic' ),             'before_widget' => '
',             'after_widget' => '
',             'before_title' => '',             'after_title' => '',         ) );      which outputs this for the surrounding / widget
Test
Test


Submit form to db

I am unable to get this insert to db function to work using ajax and a form. When I execute this, I receive a blank alert box on success. HTML
            <form id="Attendevent" action="">          <input id="attend" name="attend" type="checkbox" value="yes" />Yes, I plan to attend.          <input type="hidden" value="<?php echo get_the_ID(); ?>" name="event_id"/>          <input type="hidden" value="<?php echo $current_user->ID; ?>" name="user_id"/>          </form>
      PHP                add_action('wp_ajax_Attending', 'eventAttend');      add_action('wp_ajax_nopriv_Attending', 'eventAttend');           function eventAttend() {       global $wpdb;            $fields = array();       parse_str($_POST['data'], $fields);          if($fields['attend'] == 'yes') {             $wpdb->insert('wp_event_attendants', array( 'event_id' => $fields['event_id'], 'user_id' => $fields['user_id']));               echo $wpdb->print_error();         }         echo 'Not working.';        die();     }      JS (In header.php)                   $("#attend").click(function(){         var form = $("#Attendevent").serialize();              $.ajax({           url: "<?php echo admin_url('admin-ajax.php'); ?>",           beforeSend: function() {               alert(form);           },           type:'POST',           data:{               action: "Attending",               "data": form                },           dataType:  'html',           success: function(data) {                 alert(data);           }         });      });      DEBUGGING INFO [07-Mar-2013 17:47:09] PHP Notice: Undefined index: attend in /wp- content/plugins/event-calendar-reg/functions.php on line 198


How to add plugin custom field to custom post type?

I have used a plugin called Amazon product in a post. It works okay with posts type. It adds custom fields in the posts page. But, I have made another custom post type called products. It does not work with that. I want the custom field appear in Products post type. I have used few suggestions. Adding plugin in custom posts type but it did not work for me. I have googled, tried several plugins but none of these seems to work. Can anyone suggest me another plugin or any other way to solve my purpose. What I want to do is, add amazon selected books to my website, in my custom post type pages. I have tried adding               if(function_exists('amazonProductInAPostBox1')){         global $appipBulidBox;         $custom_post_type = 'put-post-type-here';         add_action('admin_menu', create_function("$appipBulidBox",     "if( function_exists( 'add_meta_box' ))add_meta_box( 'amazonProductInAPostBox1',     __( 'Amazon Product In a Post Settings', 'appplugin' ), 'amazonProductInAPostBox1', $custom_post_type, 'normal', 'high' );"));     }      But It did not seem to work. Thanks in advance


Create pretty permalink for a post knowing the permalink structure

How can I generate a pretty permalink correctly for a post knowing the permalink structure? My posts where processed with the FeedWordPress plugin with the "Link" setting set to "Permalinks point to: The copy on the original website". So for all the posts in the admin area when editing a post the "Permalink" field under the post title shows an original, external site's URL, which is stored in the "syndication_permalink" meta data. What I would like to do is to generate a pretty permalink for all such posts that would point to a local host (i.e. the post will have a permalink of type "http://mysite.com/" rather than have an external link to a source), so that I can update the permalinks in DB. I can get the permalink structure using `get_option('permalink_structure')`. Is there a WP function that I can use to get a pretty permalink generated correctly for a post by its ID? Hope that makes sense. Thanks, Dasha


Initialize class inside plugin

How can I initialize inside wordpress a class. I would like to send requests via ajax to plugins class. First I have the entry point.               class EntryClass{              public function __construct()         {                 add_action( 'wp_enqueue_scripts', array($this , 'wptuts_scripts_basic' ) );             add_shortcode( 'podukt_konfigurator', array ($this, 'getProd_Config') );         }              function getProd_Config() {              ob_start();             include( 'html/templ_config.php');             $content = ob_get_contents();             ob_end_clean();             return $content;                 }              function wptuts_scripts_basic()     {         // Register the script like this for a plugin:         wp_register_script( 'konf-js', plugins_url( 'config.js', __FILE__ ) );     }          }          $init= new EntryClass();      The `templ_config.php` contains the Javascript which on event would load a php file inside of my plugin folder like               jQuery('#id').load(                 '/wordpress/wp-content/plugins/konfigurator/html/class.konfigurator.php',                 {                     prod_detail: jQuery(this).attr('rel')},                     function(msg){                              show_driver(msg);                     }                     );      then in `class.konfigurator.php` I would like to use wordpress globals.


using shortcodes in theme content

I am using plugin like to read http://wordpress.org/extend/plugins/like-to- keep-reading/ problem is its using opening and closing shortcodes,when I embed them to my site http://vijaykudal.info only opening short codes displayed,can you please help me? PS:-tried with different themes as well


breadcrumb need to show all pages and subpages

am using Breadcrumb NavXT plugin. i want to show all the pages and subpages in breadcrumb.i know this is tough to understand, so am explain briefly here. * * * i have the pages: ->mainpage --->subpage1 --->subpage2 --->subpage3 if i select **main page** it need to show **you are here>subpage1>subpage2>subpage3** if i select **subpage3** it need to show **mainpage>subpage1>subpage2>you are here** if i select **subpage1** it need to show **subpage2>subpage3>mainpage>you are here** i guess,now you got my question.breadcrumb need to show circularly with all pages. please help me to achieve this. any plugin do this? or any code?:)


How to Resize the Custom Post Images?

am Having Custom Field named as thumb.i want to show the images using these custom fields.i want to be fix the image size. My code is                <img class="thumb" src="<?php echo get_post_meta($post->ID, 'thumb', true) ?>" alt="<?php the_title(); ?>" />      i tried timthumb also like this                <img class="thumb" timthumb.php?src="<?php echo get_post_meta($post->ID, 'thumb', true) ?>"&q=100 alt="<?php the_title(); ?>" />      any one help me. thanks in advance.


How to make a secure blog that is completely private?

I have a login safe application and it has hundreds of users. WordPress is a separate module of it and only used for blogging purpose [no other usage]. Both using the common database. The blogs are not for public but only for our users. Recently I am getting spam comments to our blogs and I am worried about the blogs. How I can make the WordPress totally private for our application users. All our users do not have WordPress login but are allowed to check the blogs and post their comments.


Add Unique Classes to Next and Previous in WP_LINK_PAGES

I'm using the below function for wp_link_pages. It can be viewed in use here. I would like to add a class to the previous link and a class to the next link so they can be styled individually. I'm not a pro at WP functions and I'm curious what the proper way to do this is. I can always simply echo divs around each, but it seems there may be some better way to do this.               // WP_LINK_PAGES: Add prev and next links to a numbered link list     add_filter('wp_link_pages_args', 'wp_link_pages_args_prevnext_add');           function wp_link_pages_args_prevnext_add($args) {          global $page, $numpages, $more, $pagenow;          $args['before'] = '
';          $args['after'] = '
';          $args['link_before'] = '';          $args['link_after'] = '';          if($page-1) // there is a previous page              $args['before'] .= ' '. _wp_link_page($page-1) . $args['link_before'] . $args['previouspagelink'] . $args['link_after'] . '' . ' ' ;          if ($page<$numpages) // there is a next page              $args['after'] = ' '. _wp_link_page($page+1) . $args['link_before'] . $args['nextpagelink'] . $args['link_after'] . '
' ;          return $args;      }


Create a custom WP install with plugins, theme etc already installed?

Is it possible to create a Wordpress install that will automatically install with multiple pliugins, a particular theme and custom settings so when I setup multiple blogs I don't have install so much extras each time? It's because I will be installing lots of Wordpress blogs of different kinds that require different plugins and different themes and I want to be able to just install with everything already there.. Thanks


Is it possible to make shortcodes NOT case sensitive?

I was wondering if it is possible to make shortcode not case sensitive, should be pretty straight forward but I want:               [test=1]       to work while written as               [TeST=1], [TEST=1]       And if so, how do I do it?


Editing the emails that come to admin

I have a WordPress site with two registration forms on it, and they are located on two different pages via "Theme My Login" short code. I would like to be able to track which of the forms the user submitted. I'm thinking via the admin email that notifies me there is a new user, or even as a field, as I'm using "Cimy User Extra Fields" plugin. My questions are:   1. Are either of these options possible?   2. Which is quicker, or easier, to achieve? This has to be done ASAP.   3. Can you point me in the right direction for guides, or even the codex, if it's that simple? I'm guessing I would need to find the hook in WordPress that is responsible for the admin email, and add either `$_SERVER['REQUEST_URI']`, or a WordPress equivalent?


Number of unpublished comments for each post

How can I show the number of unpublished comments for each post in a theme? I have searched, but I found nothing. I also need to show published comments number for each post.


Display a custom post type list by taxonomy term

I need to show a list of custom post type classified by terms. The idea is something like this: Service list:

        Webdesign (taxonomy term)

Business Website A (custom post type from this taxonomy term)

Business Website B (custom post type from this taxonomy term)

Business Website C (custom post type from this taxonomy term)

        Illustration (taxonomy term)

Business Illustration A (custom post type from this taxonomy term)

Business Illustration B (custom post type from this taxonomy term)

Business Illustration C (custom post type from this taxonomy term)

Other service without taxonomy (if has no taxonomy, show in first level)

      I've tried the wp_list_pages and wp_list_categories, but without success. Could someone give me a hint how to proceed?


I have 2 plugins using the same wp_login action hook and one is not working

so this is after a few hours investigating, I have s2member plugin and a custom plugin what happens is they are both using wp_login hook in this manner, s2member:               add_action("wp_login", "c_ws_plugin__s2member_login_redirects::login_redirect", 10, 2);      and the custom plugin is using the same add action :               add_action( 'wp_login', array(&$this, 'login_success') , 100);      it didnt have any priority which is by default 10. so I changed it to 100 to see if it will resolve the issue but it did not. If I comment out that line in s2member my custom plugin works and logs the attempts to login.but then s2member plugin breaks. They are both separate files since they are different plugins. any ideas on how to resolve this? any suggestions would be greatly appreciated its my second night going crazy over this


add_cap for editor but no admin role

I want my editors to have the possibility, to add other users. I added:                   $edit_editor->add_cap('create_users');     $edit_editor->add_cap('delete_users');     $edit_editor->add_cap('edit_users');      to the functions.php - but now, the editors are also able to create, change an Admin Role. Is there any way, to exclude admin from the roles? Thank you! AD


WP_Query returns more results than expected

I've written a query that is supposed to return all attachments called "no- image" (is part of a function that handle images fallback when there isn't a featured image), the if I get some result, the function returns the first item. Here's the code:               function misamee_get_image_placeholder($size, $icon = false, $attr = '')     {         $transient_key = 'image_placeholder_id';         $result = get_transient($transient_key);              if (!$result || empty($result)) {             $image_name = "no-image";                  $query_args = array(                 'post_type' => 'attachment',                 'post_status' => 'inherit',                 'post_title' => $image_name             );                  $query = new WP_Query($query_args);             //echo '<pre>' . print_r($query, true) . '</pre>';                  if ($query->have_posts()) {                 $post = $query->posts[0];                 $result = $post->ID;             }                  if ($result) {                 set_transient($transient_key, $result, CONTENT_CACHE_LIFETIME);                 return wp_get_attachment_image($result, $size, $icon, $attr);             }         }         return false;     }      The problem is that this query is clearly ignoring the "post_title" argument, returning all attachments, and therefore returning the last uploaded image (see the commented `echo '<pre>' . print_r($query, true) . '</pre>';`). What it's wrong in my query?


settings API: how to create a multi checkbox with blog categories?

i need to create a callback function with a multi checkbox with all the web/blog categories as multi options. my add_settings_fields are:                  add_settings_field(               'select_page',                                   'Select Blog Page',                         /             'journal_combo_select_page_callback',                'journal_theme_blog_2_col',             'blog_page_blog_2_col_section'                );              add_settings_field(              'limit_posts',                                   'Limit Posts',                                       'journal_limit_posts_callback',              'journal_theme_blog_2_col',             'blog_page_blog_2_col_section'           );              add_settings_field(      // $id, $title, $callback, $page, $section, $args         'check_categories',     // $id           'Choose Categories',    // $title          'journal_check_cats_callback', // $callback -         'journal_theme_blog_2_col', // $page         'blog_page_blog_2_col_section' // $section      );      do i need to declare some kind of array in settings_field 'check_categories' to comunicate with the callback function?                   function journal_check_cats_callback() {     $options = get_option('journal_theme_blog_2_col');              $pag = journal_theme_blog_2_col;         $_cats = get_terms( 'category' );                  $html = '';             foreach ($_cats as $term) {                 $checked = isset( $term->term_id ) ? $term->term_id : '0' ;                 $html .= sprintf( '<input type="checkbox" id="%1$s[%2$s]" name="journal_theme_blog_2_col[]" value="%2$s"%3$s />', $pag, $term->term_id, checked( $checked, $options['check_categories'], false ) );                 $html .= sprintf( ' %2$s
', $pag, $term->name, $term->term_id );             }             $html .= sprintf( ' %s', '' );                  echo $html;     }      EDIT: well i'm trying to put this code working, but it's not quiet right yet... at the moment when i click in the Save button (submit) the values are saved in the wp_options table. For example: in settings_section i have three settings_fields. One combo box (select_page), one input text fiel (limit_posts) and one multicheck box with blog categorys (check_categories) and bellow is the data saved in wp-options table: > > a:4:{s:11:"select_page";s:1:"4";s:11:"limit_posts";s:3:"100";i:0;s:2:"13";i:1;s:1:"7";} and this is the correspondent array: > Array ( [select_page] => 4 [limit_posts] => 100 [0] => 13 [1] => 7 ) Problems to solve: 1 - the checkboxes don't stay checked! And of course if i click on save again without checking new ones, the values in the options table are erase. 2 - i also realized that the "check_categories" isn't save into the serialized value... So i think this is a problem, because i don't know how to fecth only the array values from "check_categories" Someone can give me some help? Thanks, nelson


add notification options for commentor before a comment is added

i want notification options when a user comments on wordpress posts or pages before the user clicks a reply/post/comment... button like the image below and also like to have a function according to the selected option. ![enter image description here](http://i.stack.imgur.com/cd8nE.png) selected options are   * Do Not Send Email Notifications   * Send Email Notification ONLY If Someone Replies To My Comment(s)   * Send Email Notification Whenever A New Comment Is Posted About Plugins I tried to find the plugins like jetpack but the comment section of jetpack plugin is disabled, maybe it does not come in free version or any plugin suggestion?


mysql Join wp_users,wp_usermeta and a custom table

I am doing a search functionality based on three fields: `servicename`, `state`, `zipcode`. I have to filter the users. The servicename is in a custom table named `wp_doc_services`, while the other two fields are in `wp_usermeta`. Here is my code:               if ($service_name) {         // $table_name_speciality  = $wpdb->prefix.'doc_services';         $query = "SELECT u.ID, u.display_name,u.user_registered,u.user_login         FROM wp_users u         LEFT JOIN wp_doc_services  um1 ON u.ID = um1.doc_id         LEFT JOIN wp_usermeta  um2 ON u.ID = um2.user_id         WHERE um1.description= '$service_name'";         if ($zipcode){             $query .= "AND  um2.meta_key= 'zipcode' AND um2.meta_value = '$zipcode'";         }         if ($sate) {             $query .= "AND  um2.meta_key= 'state' AND um2.meta_value = '$state'";         }         $query .="GROUP BY u.ID";         $all_doctors = $wpdb->get_results($query);     }      When I search with `servicename`, I am getting the exact output. When I input `state` or `zipcode` I am not getting the desired output. What's wrong in my query? Thanks in advance.


TwentyEleven horizontal submenu

I am trying to get the 2nd level menu items be listed horizontally (for Twenty Eleven theme on Wordpress 3.3 beta 4). I've tried modifying               #access ul li:hover > ul {              display: block; }      to `display: inline-block;` but this doesn't seem to work. Any ideas on how I could accomplish this? Thank you.


Masking wp-content/themes/name/images to just images directory using htaccess

I'm trying what I thought would be something really simple of masking my url but cannot seem to get it to work. I want to be able to link to images in my img tag without having to type in the full url. i.e.               Current url:  http://server.com/wp-content/themes/standard/images/img.jpg     or           However on my pages I want to just do                     However nothing seems to be working on my localhost. I am running the Apache server on a windows 7 machine. I am trying to use a .htaccess to do what I've mentioned above. Here is my .htaccess file in the root of my website. UPDATE: I tried ZweiBlumen suggestion below but that did not seem to work. I then tried Geerts suggestion and added the re-write method to my misc.php of my admin folder. I then went to my permalinks page and hit save. The result of doing this meant my .htaccess folder was rewritten and the output it produced is below.               # BEGIN WordPress     <IfModule mod_rewrite.c>     RewriteEngine On     RewriteBase /     RewriteRule ^index\.php$ - [L]     RewriteRule ^css/(.*) /wp-content/themes/standard/css/$1 [QSA,L]     RewriteRule ^js/(.*) /wp-content/themes/standard/js/$1 [QSA,L]     RewriteRule ^images/(.*) /wp-content/themes/standard/images/$1 [QSA,L]     RewriteCond %{REQUEST_FILENAME} !-f     RewriteCond %{REQUEST_FILENAME} !-d     RewriteRule . /index.php [L]     </IfModule>          # END WordPress      However, I still cannot navigate to my images folder such as: http://localhost/images/myimage.jpg. All I get is a page not found. Joshua's suggestion worked perfectly however I'm hoping to use this in conjunction with masking the images URL. Is there anything else I might be doing wrong, or should check? UPDATE: For anyone reading this, I just tried again and it has worked using a combination of Geerts and Joshuas methods. My Firefox browser appears to have been caching the page which was causing me to think it wasn't. The reason I went with this over putting it in the .htaccess file is that this file is overwritten every time I go to the permalinks Admin page and so I don't won't to overwrite this by accident. I guess I could turn this off somehow but not sure how to do that. All three answers helped to some degree.


List custom posts

I want list all the upcoming and past events(custom posts) in chronological order. I have saved data by meta key start_time,duration , I try to use sql ,but can not get there! Thanks for any help in advance!


Filter post before *editing*

I know there are a lot of hooks in WP for altering a posts content (and other fields) before the post is written to the DB upon saving; but what I am interested in doing is running my custom filter before the post is _loaded_ for _editing_. So basically when my custom post type is loaded by /wp- admin/post.php?post=##&action=edit, I would like to run my filter on it before the content is displayed in the WYSIWYG editor. Is that possible or no?


Getting rid of the #038; when string replacing content

I'm trying to add some string replacements to the_title() -               function format_title($content) {         $content = str_replace('&','&
', $content);         $content = str_replace('!','!
', $content);         return $content;     }     add_filter('the_title','format_title',11);      When I try and replace ampersands I get an additional "#038;" after the replacement (ASCII for ampersand), I'm not sure as to why this occurs (security reason?) or how to create a workaround. I've tried replacing "&" with "& amp ;" but with no effect. The goal is to add line breaks at certain points of a title to create a better flow in the typography. Both the database and the site has UTF8 encoding.


str_replace css meta tag?

I'm trying to modify the css meta tag and make use of a CDN url - and other things. What I have tried (as a quick test) is :               function change_stylesheet_loc($uri)     {         $uri = str_replace('example.com', 'cdn.example.com', $uri);         return $uri;     }     add_filter('stylesheet_uri', 'change_stylesheet_loc', 20000);       I've also tried :               add_filter('the_content', 'change_stylesheet_loc', 20000);      Nothing I'm doing is working. How can I modify the css meta tag data?


single category widget with conditional terms

iam working on my first wp theme and iam new to php and wordpress. i need to create a single category widget that displays at least five posts from specific category. inside this post loop i need a conditional function to make the first post different from the rest. to be clear iam using a plugin that gives me all the needed option except conditional function that makes the first post different from the others. is there any one could help me By editing the plugin file to add this conditional function . or showing me the entire code from scratch.thanks


Where can I get Wordpress Version in Dashboard?

On the botton of the dashboard WP proposes to upgrade to next version but it doesn't even show current version: does it show it somewhere else ?


Taxonomy archive with same slug as custom post type?

My head hurts... Here is what I have: Custom post type: Our People, slug => **our-people**   Taxonomy: Job Title, slug => **job-title** I have an archive page for the Our People CPT at **domain.com/our-people**. I can easily have archive pages for the Job Title taxonomy terms at **domain.com/job-title/{term}** But I would like to have archive pages for the Job Title taxonomy terms under the our-people slug. Example:   **domain.com/our-people/managers   domain.com/our-people/crew** Where managers and crew are terms of the taxonomy Job Title, which is attached the the CPT Our People. Is there a way to do this? Setting the taxonomy and the CPT to the same slug obviously didn't work. Thank you.


How do I format my custom html so wpautop won't try to reformat it?

I've got a desktop app that generates html for my customers to paste into their WP pages/posts. Nothing fancy just some image tags, hyperlinks and simple inline css. How do I preformat that code so wpautop won't try to re-format? What triggers that function to add br and p tags? Are there any other tags it will insert?


Disable all https in WordPress

Recently I moved my WordPress to another server (MediaTemple), but now my admin is redirecting for HTTPS all the time, but I don't have SSL enabled on my domain, so it just keep warning that is not the same server and bla bla bla... Well, I want to disable all those https request on WordPress. How can I do that?


What CSS selectors to know for WordPress?

Could anyone tell me what types of CSS selectors available in the main theme of WordPress? because I want to learn CSS and I just want to learn the necessary types for WordPress.


Custom query for custom post_type

I need to display a list of current tasks. Each task has a custom post_type and a start date and end date. Can someone tell me how to modify my query so it will pick up any tasks that have a start date in the past and an end date in the future? (There's another meta_key named 'end_date') Here's my query:               $todays_date = time();          $args = array ('post_type'      => 'tasks',                    'meta_key'       => 'start_date',                    'meta_compare'   => '>',                    'meta_value'     => $todays_date,                    'orderby'        => 'meta_value'                   );          $tasks = get_posts($args);      The problem with the query above is that it's showing tasks that in the future, but haven't started yet.


Given a page ID, how to display entire page (header/content/footer/sidebars) from a plugin hook

Given a page ID it it possible to display the page content from within a plugin hook. I would like to know if it is possible to display the **_entire_** page given a page ID (Header/Footer/Sidebar/Content/etc..) For example, if the Page ID "123" is the "Home" page then the output from `render_entire_wordpress_page(123);` would be identical to visiting the normal "Home" page. If the Page ID "321" is the "Blog" page then the output from `render_entire_wordpress_page(321)` would be identical to visiting the normal "Blog" page. Is this possible? I can somewhat achieve this by filtering `rewrite_rules_array` and then flushing, however I'm trying to output this content after all rewrite rules have finished processing.


Non-Closing PHP Query in WordPress Loop

I have the following query in WordPress to call custom post meta, everything is working fine, with one exception, whichever query is second is echoing nothing. Sorry for the WordPress post, but for those unfamiliar the '`get_post_meta($post->ID`' is retrieving the post ID for the first one and then echoing the same for the second, I need to close the first query but don't know how.
                 <?php $soon_events = get_post_meta($post->ID, 'coming_soon_events', true); if ($soon_events) : echo $soon_events; endif; ?>

                 <?php $feat_events = get_post_meta($post->ID, 'featured_events', true); if ($feat_events) : echo $feat_events; endif; ?>


query_posts and pagination, still stuck after much research

I need to paginate some custom posts...I can’t see why but I’m getting 404’s when going to the next page. Here’s my code:               $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;          query_posts( array( 'post_type' => 's_stories', 'posts_per_page' => 4 , 'paged'=>$paged) );          if (have_posts()){           while (have_posts()) { the_post(); ?>

<a href="<?php echo get_permalink($post->ID); ?>"><?php the_title(); ?>
     <?php the_excerpt(); ?>

          <?php } }  ?>

<?php next_posts_link('« Previous Story') ?>

<?php previous_posts_link('Next Story »') ?>

      I’ve got the ‘paged’ value and the post navigation, any idea what’s up now....? Thanks :)


Using static pages on Wordpress site

I built a few static pages in HTML while I was practicing some techniques. I would like to include those pages (and that hard work) in a word press site. I have already created the WP page that hold the 6 items that I want to use as links to my work. I would like to link to another spot on my server or site that will then display the already-created sites and or pages. (some of my work is a complete site some of it is single-page).   * Can I even do this?   * Do I have to change all my already-created HTML files to PHP?   * Can I link to static HTML sites? (that would be ideal)   * I have tried copying and pasting the straight HTML from the pages into the text editor on the WP page, nothing happened.  Thanks for your help, Josh


Handle regular expression based redirects without .htaccess

Is there a way to add a pattern of redirects to wordpress from a plugin? I'm using a host that sets up wordpress for me and doesn't give me access to the file system, so I can't edit the .htaccess file. I've found lots of plugins that allow you to list URLs that you want to redirect, but I haven't found any that let you insert patterns based on regular expressions. Specifically, I have an "events calendar" plugin installed that had a page of events for each day (whether or not that day actually had any events). A later release of that plugin, took those pages away. Now they are all 404, when I would like to redirect them to the main events page. They are all of the format:   * /events/2017-08-29/   * /events/2017-08-23/   * /events/2017-08-19/   * ... (thousands more) How do I put in a single redirect rule for all of them?


Show posts image attachments

I'm creating an archive page for my photoblog. My posts have 1 or more images. I'd like to show all the attachment thumbnails in a page. Using the featured image (the_post_thumbnail) only shows 1 thumbnail, I'd like to show all the attached images thumbnails.               <?php if (have_posts()) : while (have_posts()) : the_post(); ?>          <?php        $thumbnails = get_posts('numberposts=30');       foreach ($thumbnails as $thumbnail) {         if ( has_post_thumbnail($thumbnail->ID)) {           echo 'ID ) . '" title="' . esc_attr( $thumbnail->post_title ) . '">';           echo get_the_post_thumbnail($thumbnail->ID, 'thumbnail');           echo '';         }       }     ?>          <?php endwhile; else: ?>
Sorry, no posts matched your criteria.
     <?php include (TEMPLATEPATH . "/searchform.php"); ?>     <?php endif; ?>      The code above only shows the featured image, if a post doesn't have a featured image, it's not shown.               <?php     $args = array(         'post_type' => 'attachment',          'posts_per_page' => -1,          'order'=> 'DESC',          'orderby' => 'date',         );      $attachments = get_posts( $args );     if ( $attachments ) {         foreach ( $attachments as $post ) {             setup_postdata( $post );             the_attachment_link( $post->ID, false );         }         wp_reset_postdata();     }     ?>      The above code shows all attachment thumbnails. How do I:-   1. Have it sorted by post date (it's currently being sorted by attachment upload date),   2. Thumbnail linked to post it is attached to? Or is there another way to do what I want? Any help is appreciated.


How can I export Grunion Contact Form messages in an easily parsable format, e.g. CSV?

I've made the mistake of using the Grunion Contact Form plugin (it shipped with the Promotion theme that our webdevs installed in our Wordpress instance) instead of a real tool like SurveyGizmo, and now I'm stuck with a few hundred messages that I want to export in a sane format. Tools -> Export -> Messages produced an XML that's horrible, and I'll have to write some script to pluck certain XML values and turn this mess into something sane. Is there a script like that already written? Also, I couldn't find any tables in the database mirroring this data. Here's what one `<item>` of the XML looks like:               <item>         <title>Dan testing - 2012-10-01 02:46:43</title>         <link>http://site.com/?post_type=feedback&p=1617</link>         <pubDate>Mon, 01 Oct 2012 09:46:43 +0000</pubDate>         <dc:creator></dc:creator>         <guid isPermaLink="false">http://site.com/?post_type=feedback&p=1617</guid>         <description></description>         <content:encoded><![CDATA[Testing to see where the form feedback ends up.     <!--more-->     AUTHOR: Dan testing     AUTHOR EMAIL: dan+wp@site.com     AUTHOR URL: http://something.com     SUBJECT: [Site] Jobs     IP: 127.0.0.1     Array     (         [Name] => Dan testing         [Email] => dan+wp@site.com         [I want to work for] => Site.com         [LinkedIn profile] => http://something.com         [Tell us about yourself] => Testing to see where the form feedback ends up.     )     ]]></content:encoded>         <excerpt:encoded><![CDATA[]]></excerpt:encoded>         <wp:post_id>1617</wp:post_id>         <wp:post_date>2012-10-01 02:46:43</wp:post_date>         <wp:post_date_gmt>2012-10-01 09:46:43</wp:post_date_gmt>         <wp:comment_status>closed</wp:comment_status>         <wp:ping_status>closed</wp:ping_status>         <wp:post_name>f55ef310f22fa18568d2002ae8660c6f</wp:post_name>         <wp:status>publish</wp:status>         <wp:post_parent>1359</wp:post_parent>         <wp:menu_order>0</wp:menu_order>         <wp:post_type>feedback</wp:post_type>         <wp:post_password></wp:post_password>         <wp:is_sticky>0</wp:is_sticky>         <wp:postmeta>             <wp:meta_key>_feedback_author</wp:meta_key>             <wp:meta_value><![CDATA[Dan testing]]></wp:meta_value>         </wp:postmeta>         <wp:postmeta>             <wp:meta_key>_feedback_author_email</wp:meta_key>             <wp:meta_value><![CDATA[dan+wp@site.com]]></wp:meta_value>         </wp:postmeta>         <wp:postmeta>             <wp:meta_key>_feedback_author_url</wp:meta_key>             <wp:meta_value><![CDATA[http://something.com]]></wp:meta_value>         </wp:postmeta>         <wp:postmeta>             <wp:meta_key>_feedback_subject</wp:meta_key>             <wp:meta_value><![CDATA[[Site.com] Jobs]]></wp:meta_value>         </wp:postmeta>         <wp:postmeta>             <wp:meta_key>_feedback_ip</wp:meta_key>             <wp:meta_value><![CDATA[127.0.0.1]]></wp:meta_value>         </wp:postmeta>         <wp:postmeta>             <wp:meta_key>_feedback_contact_form_url</wp:meta_key>             <wp:meta_value><![CDATA[http://site.com/jobs/]]></wp:meta_value>         </wp:postmeta>         <wp:postmeta>             <wp:meta_key>_feedback_all_fields</wp:meta_key>             <wp:meta_value><![CDATA[a:5:{s:4:"Name";s:11:"Dan testing";s:5:"Email";s:18:"dan+wp@site.com";s:18:"I want to work for";s:8:"Site.com";s:16:"LinkedIn profile";s:20:"http://something.com";s:22:"Tell us about yourself";s:47:"Testing to see where the form feedback ends up.";}]]></wp:meta_value>         </wp:postmeta>         <wp:postmeta>             <wp:meta_key>_feedback_extra_fields</wp:meta_key>             <wp:meta_value><![CDATA[a:1:{s:18:"I want to work for";s:8:"Site.com";}]]></wp:meta_value>         </wp:postmeta>         <wp:postmeta>             <wp:meta_key>_feedback_akismet_values</wp:meta_key>             <wp:meta_value><![CDATA[a:47:{s:14:"comment_author";s:11:"Dan testing";s:20:"comment_author_email";s:18:"dan+wp@site.com";s:18:"comment_author_url";s:20:"http://something.com";s:20:"contact_form_subject";s:15:"[Site.com] Jobs";s:17:"comment_author_IP";s:12:"127.0.0.1";s:15:"comment_content";s:47:"Testing to see where the form feedback ends up.";s:12:"comment_type";s:12:"contact_form";s:7:"user_ip";s:12:"127.0.0.1";s:10:"user_agent";s:106:"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.79 Safari/537.4";s:8:"referrer";s:24:"http://site.com/jobs/";s:4:"blog";s:18:"http://site.com";s:15:"SERVER_SOFTWARE";s:11:"nginx/1.2.3";s:11:"REQUEST_URI";s:6:"/jobs/";s:4:"USER";s:8:"www-data";s:4:"HOME";s:8:"/var/www";s:9:"FCGI_ROLE";s:9:"RESPONDER";s:12:"QUERY_STRING";s:0:"";s:14:"REQUEST_METHOD";s:4:"POST";s:12:"CONTENT_TYPE";s:33:"application/x-www-form-urlencoded";s:14:"CONTENT_LENGTH";s:3:"282";s:15:"SCRIPT_FILENAME";s:30:"/var/www/sitecom-wp/index.php";s:11:"SCRIPT_NAME";s:10:"/index.php";s:12:"DOCUMENT_URI";s:10:"/index.php";s:13:"DOCUMENT_ROOT";s:20:"/var/www/sitecom-wp";s:15:"SERVER_PROTOCOL";s:8:"HTTP/1.1";s:17:"GATEWAY_INTERFACE";s:7:"CGI/1.1";s:11:"REMOTE_ADDR";s:12:"127.0.0.1";s:11:"REMOTE_PORT";s:5:"64553";s:11:"SERVER_ADDR";s:14:"66.175.220.232";s:11:"SERVER_PORT";s:2:"80";s:11:"SERVER_NAME";s:11:"site.com";s:5:"HTTPS";s:0:"";s:15:"REDIRECT_STATUS";s:3:"200";s:9:"HTTP_HOST";s:11:"site.com";s:15:"HTTP_CONNECTION";s:10:"keep-alive";s:19:"HTTP_CONTENT_LENGTH";s:3:"282";s:18:"HTTP_CACHE_CONTROL";s:9:"max-age=0";s:11:"HTTP_ORIGIN";s:18:"http://site.com";s:15:"HTTP_USER_AGENT";s:106:"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.79 Safari/537.4";s:17:"HTTP_CONTENT_TYPE";s:33:"application/x-www-form-urlencoded";s:11:"HTTP_ACCEPT";s:63:"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8";s:12:"HTTP_REFERER";s:24:"http://site.com/jobs/";s:20:"HTTP_ACCEPT_ENCODING";s:17:"gzip,deflate,sdch";s:20:"HTTP_ACCEPT_LANGUAGE";s:14:"en-US,en;q=0.8";s:19:"HTTP_ACCEPT_CHARSET";s:30:"ISO-8859-1,utf-8;q=0.7,*;q=0.3";s:8:"PHP_SELF";s:10:"/index.php";s:12:"REQUEST_TIME";s:10:"1349084803";}]]></wp:meta_value>         </wp:postmeta>         <wp:postmeta>             <wp:meta_key>_feedback_email</wp:meta_key>             <wp:meta_value><![CDATA[a:4:{s:2:"to";a:1:{i:0;s:18:"dan+wp@site.com";}s:7:"subject";s:15:"[Site.com] Jobs";s:7:"message";s:331:"Name: Dan testing     Email: dan+wp@site.com     LinkedIn profile: http://something.com     Tell us about yourself: Testing to see where the form feedback ends up.     I want to work for: Site.com               Time: Monday October 1, 2012 at 2:46 am     IP Address: 127.0.0.1     Contact Form URL: http://site.com/jobs/               Sent by a verified "Site.com" user.";s:7:"headers";s:111:"From: Dan testing <dan+wp@site.com>          Reply-To: dan+wp@site.com          Content-Type: text/plain; charset="UTF-8"";}]]></wp:meta_value>         </wp:postmeta>     </item>


Uploaded attachment not set as featured image

The following code uploads an image which I want to associate with a custom post type.               $upload_overrides = array( 'test_form' => FALSE );     if($file_errors['error'] == 0) {            if($new_reseller_id = wp_insert_post( $new_reseller_profile_data )){              //$this->wps_process_image($file, $new_reseller_id);exit;              $uploaded_file = wp_handle_upload( $file, $upload_overrides );              $wp_filetype = wp_check_filetype(basename($uploaded_file['file']), null );         $wp_upload_dir = wp_upload_dir();         $attachment = array(           'guid' => $wp_upload_dir['url'] . '/' . basename( $uploaded_file['file'] ),           'post_mime_type' => $wp_filetype['type'],           'post_title' => preg_replace('/\.[^.]+$/', '', basename($file['name'])),           'post_content' => '',           'post_status' => 'inherit'         );         $attach_id = wp_insert_attachment( $attachment, $uploaded_file['file'], $new_reseller_id );         // you must first include the image.php file         // for the function wp_generate_attachment_metadata() to work         $attach_data = wp_generate_attachment_metadata( $attach_id, $uploaded_file['file'] );         wp_update_attachment_metadata( $attach_id, $attach_data );            }     }      The image is uploaded and viewable in the image library but does not appear as the featured image in the custom post type editor. Why is this?


comments in Admin

I'm confused about what the Comments section on the posts in the Admin actually does. I have Comments turned on in Screen Options for a post. When I display a post, I see a Comments box. If I enter something in the Comments box, what happens to it? I never see it when I click Show Comments in the Admin. On some themes, it shows up in the post though.


Having a Function Inside of the Loop

I am trying to make a frontend product editor for WooCommerce, and have a loop that returns all of the products for the current user. I am trying to use gravity forms as the editor, so a single gravity form is displayed and populated for each product. However, I am not sure how to handle naming the function so it is not being re-declared for every product.               global $current_user;     new WP_Query( array( 'author' => $current_user->ID, 'post_type' => 'product' ) );     while ( have_posts() ) {         the_post();         add_filter('gfrom_pre_render_7', 'populate_each_product');         function populate_each_product ($form){             foreach($form["fields"] as &$field){                 if($field["id"] == 1){                     $field["defaultValue"] = get_post_meta($post->ID, '_virtual', true);                 }             }             return $form;         }     }     wp_reset_query();     ?>      Is there someway to add a counter or another variable to the function name? So along the lines of populate_each_product . `$post->ID ()` or something of that nature? I have looked around for this quite a bit, but found no reference of using functions inside loops so I am worried what I am trying to do is not possible


require.js to load javascript

whilst wp_enqueue_script seems to work it's not really elegant. I'm currently making a WP front end which uses MVC (backbone.js) and has literally 30+ seperate Model/View/Collection/Controller scripts and I keep adding to the number. I've used require.js a lot before and really like it, however it seems to completely break wordpresses logic. Can anyone point me to a clean method of using a js scriptloader with wordpress? or is this a hopeless task? Thanks


Insert File URL Links to Existing Images that Were Not Originally Linked to Themselves

I hope the title was descriptive of what I'm looking for. I have a client who has been inserting images into hundreds of posts, but choosing "Link URL: None" when inserting images instead of choosing "Link URL: File URL". Now they want to use our Responsive Lightbox plugin, but of course, since these images aren't linked to their file URLs, our plugin can't pick it up. Does anyone here know of any plugins, or perhaps a SQL command that we can run that will run through all the images inserted into posts/pages and link them to their file URLs? Any advice would be greatly appreciated.


Identify a Woocommerce page by Wordpress conditional tags

we have a website running on WPMU, and the main site is using Woo-commerce and the sub sites doesn't use that. I use conditional statement in my meta title with following code:               <title>     <?php if( is_product_category( 'cds' ) ) { ?>     CD     <?php } elseif ( is_product_category( 'dvds' ) ) {?>     DVD     <?php } else {?>     <?php wp_title( '|', true, 'right' ); ?>     <?php } ?>      but the thing is the sub sites, can not read this code, because the Woocommerce functions are undefined in those. I almost sure that there is no way to identify a Woocommerce product page by WP core conditional tags, Do you guys have any idea how can i identify them?


External json physician database to display results in WordPress

We're working on a physician network site in WordPress using the Divi template and we have most work completed. However, we've also been tasked to have a physician search that will bring up results based on first name, last name, zip code, city, state, or specialty. Our IT department passed over a json file with sample data to get going. The problem is that I'm not really sure where to start. I've googled on and off for about a month and have found things regarding writing things to the Wordpress db but the json file will be hosted externally from Wordpress. I'm not entirely sure where, or how, to start. Thanks!


How to order results by date and meta key?

I'm using wp-postratings to rate posts which stores the rating as a custom meta value `ratings_score`. It gives you the option to use `r_sortby` to order the loop by highest rated but I want to give it a trending feel by dividing the $ratings_score" by how old the post is in days. So something like this..               $ratings_score = get_post_meta($post->ID,'ratings_score',true);     orderby = $ratings_score / days ago      How can I accomplish this?


I use this function from Answer on this Question but its not work for me .. How we display Archives for specific categories here is function code               add_filter( 'getarchives_where', 'wse95776_archives_by_cat', 10, 2 );     /**      * Filter the posts by category slug      * @param $where      * @param $r      *      * @return string      */     function wse95776_archives_by_cat( $where, $r ){         return "WHERE wp_posts.post_type = 'post' AND wp_posts.post_status = 'publish' AND wp_terms.slug = 'Uncategorized' AND wp_term_taxonomy.taxonomy = 'category'";     }          add_filter( 'getarchives_join', 'wse95776_archives_join', 10, 2 );          /**      * Defines the necessary joins to query the terms      * @param $join      * @param $r      *      * @return string      */     function wse95776_archives_join( $join, $r ){         return 'inner join wp_term_relationships on wp_posts.ID = wp_term_relationships.object_id inner join wp_term_taxonomy on wp_term_relationships.term_taxonomy_id = wp_term_taxonomy.term_taxonomy_id inner join wp_terms on wp_term_taxonomy.term_id = wp_terms.term_id';     }      I add this code in function.php .. in my page.php I add wp_get_archives but nothing is happen? I'm missing something


Infinite scroll not working with Masonry

I've got masonry working, like so:                   $('.content').imagesLoaded( function() {                 $('.wrapper, .content').fadeIn(600);              $('.index-page .content').masonry({       itemSelector: '.post',       "isFitWidth": true,       isAnimated: true,       "columnWidth": ".post",       "gutter": 25     });               });      And I am using the infinite scroll plugin seen here. My problem is when the posts get loaded, they don't adhere to the masonry plugin — they overlap are not formatted in any way. The plugin has a textbox where we can paste a callback. I've seen the masonry documentation, but unsure how to incorporate it in my code. Any help would be greatly appreciated.


Where is escaped the shortcode?

I'm working with a function that returns a list of posts which has the same type as the actual post. Actually, it returns a list of links with title on anchor link and let to use it with a shortcode:               function list_this_type_posts( $atts ) {              extract(shortcode_atts(array(             'container' => 'div',             'ulist' => 'ul',             'list' => 'li',             'link' => 'a',             'number' => '5',         ), $atts));                   $type = get_post_type();              $args_posts = array(             'posts_per_page'   => 5,             'orderby'          => 'post_date',             'order'            => 'DESC',             'post_type'        => $type,             'post_status'      => 'publish',             'suppress_filters' => true );              $posts_array = get_posts( $args_posts );         $sThisTitle = '<'.$ulist.'>';         foreach($posts_array as $single_post) {                  $sThisTitle .= '<'.$list.'><'.$link.' class="title_list" href="'.get_permalink($single_post->ID).'" >'.(get_the_title($single_post)).'</'.$link.'></'.$list.'>';                  }         $sThisTitle .= '</'.$ulist.'>';          return $sThisTitle;     }               add_shortcode('list_posts', 'list_this_type_posts');     add_filter('widget_text', 'do_shortcode');      This is working right using this shortcode: `[list_posts]`, but I wonder why it doesn't work in this way:               $sThisTitle = '
';         foreach($posts_array as $single_post) {                  $sThisTitle .= '
ID).'" >'.(get_the_title($single_post)).'
';                  }         $sThisTitle .= '
';          return $sThisTitle;      It seems like it is escaping the html entities, but WHERE? Is it the correct way to proceed?


How to get pictures of the Wordpress post

During the post creation of a post in Wordpress, I add 2 pictures in the post Gallery. How can I retrieve uploaded pictures URLs to display them on the other template?


How to include a picture in a blog post such that it will show in Facebook?

* Worpress Blog: 3.9   * Theme: Twenty Eleven ( as a child theme )   * Blog: http://beforewisdom.com I am using a wordpress.org blog. It used to be that if I put an image or video at the top of my blog posts that image would appear on Facebook if I posted a URL of that blog post. No more. Any idea of what I can change in how I create my blog posts to make this happen?


How to fix Wordpress dashboard screen option & help button, it's not working

In my Wordpress dashboard "Screen Option" and "Help" button are not pulldown. ![Screen Option not working](http://i.stack.imgur.com/QcO5W.png) Could anybody help me to solve the problem. Thanks.


Delist entries in the_loop

I am trying to add a delisting feature to my WordPress network. Posts which are delisted would not appear in post lists, but would still be visible if accessed directly. I've written a plugin that helps editors delist entries with custom meta values on authors and posts. So there are two meta values that I need to check before displaying each post in public listings: the `delist-post` **post** meta value and the `delist-author` **user** meta value. I was hoping to register a `pre_get_posts` filter that limits the return of `get_posts()` by setting the query's `meta_query` property. Is it possible to check a user meta value with a posts `meta_query`? If not, can you think of a better way to do this without adding conditional statements in theme files (i.e. not `if (!get_post_meta(...) && !get_user_meta(...))` in the_loop)?


meta_key & meta_value not working with get_pages and custom taxonomy

I'm trying to use custom taxonomy with pages. Basically a page has a "relevance" taxonomy, depicting who the page is relevant for. The pages are created in a hierarchy based on the departmental structure of the school district which the site is for. So say I'm on the alumni page, and I want to list all the child pages of educational services that are relevant, like how to get your transcripts. I've tried the following two methods               <?php        $pages = get_pages( array( 'child_of' => '65','hierarchical' => 0, 'meta_key' => 'relevance', 'meta_value' => 'alumni' ) );       foreach ( $pages as $page ) {         echo $page->post_title;       }      ?>      and               <?php wp_list_pages( array( 'child_of' => '65', 'meta_key' => 'relevance', 'meta_value' => 'alumni') ); ?>      both display the child pages of 65 without the meta_key & meta_value properties, but once I had them I get nothing. I'm super positive the values are correct. I've also tried..               'relevance' => 'alumni',      like you would in a query, but that doesn't work with these functions. Any idea why this wouldn't work? The get_pages function lists meta_key & meta_value under usage and denotes that you have to set hierarchical to 0 which I did.


How to prevent pages from automatically adding line breaks?

I'm trying to style a form on a website, but I'm hitting a snag. Wordpress is automatically generating `<br>` tags when I directly edit the HTML for pages. What I've got is this:               <fieldset>     <legend>* Your name:</legend>

                      <input id="FName" type="text" name="FName" size="20" maxlength="20" />             First                               <input id="LName" type="text" name="LName" size="30" maxlength="40" />             Last

     </fieldset>      ...all mashed together into a single line because WP wants to generate `<br>` tags all over the place if I don't. I can deal with that, but I'm actually still getting `<br>` tags generated directly after each`<span>` tag in the resulting page even with all of the HTML smooshed together on one line. How do I get rid of those? Thanks! Edit: Here's the portion of the layout that generates the page content.
         <?php while( have_posts() ) : the_post() ?>
<?php the_title(); ?>

                 <?php get_the_content() ?>
         <?php endwhile ?>
      replacing `get_the_content()` with `the_content()` renders properly.


Are there any hosting companies that are already setup and configured for TLD domain mapping?

Are there any hosting companies out there that cater to users who want to utilize TLD domain mapping and WordPress Multisite? Or will you have to go the route of building, configuring, and maintaing your own server configuration with a service provider, like SliceHost?


Remove Permanent URL for custom post types

I have created a dynamic slider and using custom post type and featured images to upload slider's images. What I want to do is to remove Permanant URL for my custom post type i.e. post is not accessible with its permanent URL nor it will appear under title while adding custom post. Is it possible?


Do_Shortcode not working for Embed

I'm trying to use Custom Field types to embed Youtube videos in a more organized fashion and using the Do_Shortcode() would seem to work perfectly, however this:               <?php echo do_shortcode('[embed]http://www.youtube.com/watch?v=K0M09Ws8vpc&feature=player_embedded[/embed]'); ?>      Does not seem to work, however in the same single.php file this does work perfectly:               <?php echo do_shortcode('[gallery link="file" size="thumbnail" icontag="div"]'); ?>      I put them one after another to test them out, any ideas why the [embed] shortcode doesn't get parsed (it just shows nothing) If I do the embed shortcode directly into the post it works perfectly. Thanks, Jordan


How do I add a body class to specific pages?

Here is what I have so far in my functions.php.               add_filter('body_class','cp_new_body_classes');     function cp_new_body_classes($classes) {         if( !is_page_template() ) {             $classes[] = 'reg-page';         return $classes;         }     }      I'm trying to append the class of `reg-page` to pages that are not page templates. For the pages that _are_ page templates, I just want to leave the classes as they are. When trying the code above, the class of `reg-page` gets added like I want to pages which are not page templates but the other pages (which _are_ page templates) get left with no classes at all. How can I fix this code?


Add custom row to welcoming in dashboard

I have one plugin which conflicts with new design of dashboard. I see, that author doesn't bother with support, so I thought I do it myself or at least try. So I would like to add custom row to this menu in dashboard if it is possible.   ![Welcoming menu in dashboard](http://i.stack.imgur.com/V7FvG.png) If anyone could help I would be really appreciated.


UPME Known Issues - Unable to Save Custom Fields

When you have large number of custom fields, there are issues with saving and updating process. This is due to the maximum input variables constraints set by PHP. Currently you have to increase php max_input_vars variable using the php.ini file or .htaccess file. Only some servers support this change using .htaccess file. Default value for this variable is 1000. You can increase it based on your needs. Did you experience such issues, how do you solve those issues?


Upgrading from 3.5.2 to 3.9.1

I am not too familiar with WP upgrades. How reliable is one-click auto update for upgrading from 3.5.2 to 3.9.1 or should I do a manual upgrade? I also need to upgrade all the plugins. I am planning make a copy of the site in my localhost and do the upgrade there first before doing it on the production site. Is this a better approach or should I just go and upgrade the production site directly?


how do I delete (not exclude) a menu item from navigation bar

I'm building a site's navigation bar programmatically, using the following code:               wp_update_nav_menu_item($menu->term_id, 0, array(         'menu-item-title' =>  $page_data->post_title,         'menu-item-classes' => 'main',         'menu-item-url' => '/',          'menu-item-status' => 'publish'));      this adds menu items to my navigation bar and works well. I use this to pre- populate a number of menu items when site is created. The question is **how do I delete a menu item from the nav menu**? (for example if user wants different menu items in the nav bar). I know that I can use exclude, but that doesn't seem like the right solution since I don't want to constantly manage the exclude list based on user changes. another question: how do I change menu order via code? thanks!


Shortcode in a page to display custom posts which also have a shortcode in them

I have created a shortcode `[get_custom_posts]` to be inserted in a page (the default `page` post type from WordPress) to get posts which are from a custom post type. In each post from that custom post type the user can insert a shortcode `[get_attached_images]` to get attachments (images) assigned to that specific post. The way this shortcode to get images works is by using the global `$post` variable. It then basically gets all the images attached to that post, nothing too extraordiary. The problem is with the shortcode to get these posts ( `[get_custom_posts]` ). It does not return the expected content which is to display those custom posts along with their image attachments (attachments which are fetched by using the `[get_attached_images]`). Instead it displays the custom posts with the attachments that belong to the page (!) not to the respective posts. What happens is that the global `$post` variable used in the `[get_attached_images]` shortcode is somehow the `$post` variable of the page that outputs all those posts. The way the `[get_custom_posts]` shortcode works is by getting all the posts that belong to the custom post type that I want to get posts from. It then uses the `the_content` filter to "execute" the `[get_attached_images]` shortcodes from those custom posts. This way the posts can be displayed (in theory at least) along with their attachments. But in practice it doesn't work. Does anybody has any idea what is going on? Why is the `$post` variable of the page passed to the `[get_attached_images]` shortcode instead of the $post variable of each custom post? And how can this be prevented?


no content after shortcode

I hope you guys can help me with this little bug I've encountered. I am using a shortcode to display an audio player in the entries. This is the code i've put in my functions.php:               function html5_audio($atts, $content = null) {     extract(shortcode_atts(array(         "src" => '',         "preload"=> 'none',         "loop" => ''     ), $atts));     return '<audio src="'.$src.'" preload="'.$preload.'" loop="'.$loop.'" />';     }     add_shortcode('audio', 'html5_audio');      And this is the shortcode:               [audio src=""]      The shortcode itself is working and displaying the audio player. But any other content that is posted after the shortcode within that post won't appear on the blog. I tried embedding the audio file directly with `<audio>` and it worked. So HTML5 is working alright. Only the shortcode seems to be causing trouble. Any help is appreciated! Thanks in advance.


Next Prev Post link rendering current post thumbnail

i am using below code which should render next and previous post thumbnail but it is showing the current post thumbnail in Custom Post Type single page               <?php           $prevpost = get_previous_post(true);     $prevThumbnail = get_the_post_thumbnail($prevpost->ID, array(80,80) );          next_post_link('%link', '' . $prevThumbnail . '%title');           $nextpost = get_next_post(true);     $nextThumbnail = get_the_post_thumbnail($nextpost->ID, array(80,80) );          previous_post_link('%link', '' . $nextThumbnail . '%title');                     ?>      How to solve this?


Why is 'is_multisite' returning true when it's a single install?

I've installed a single site WP. In one of my plugins, I have the following code:               if(is_multisite) {       $upload_dir = get_upload_dir();       $_SESSION['root_image_dir'] =  str_replace('\\','/',$upload_dir['basedir']);       echo 'IS MULTI.'; //<-- this is outputted every time     } else {       $_SESSION['root_image_dir'] = '';       echo 'IS NOT MULTI'.$_SESSION['root_image_dir'];     }       For some reason, the `echo` statement is triggered every time. Why is `is_multisite` not working?.


How to use WordPress authentication on non-WordPress page?

I have a site based on WordPress. This site has some functions for member only. One of the functions is a external script and I believe anyone can access this without authentication. I can add .htaccess to this script to prevent unauthorized access. But then my users have to login again and it's kind of inconvenient. Is there any solution to add some check to my script that use the same WordPress authentication mechanism, that is, if user already login, he have full access to the script. If not, he will be redirected to WordPress login page. **EDIT** : My script is written in PHP


Nicer URL for viewing category of posts?

At the moment to view a category of posts I have a url like               http://server/category/tag      Is there a way in wordpress I can do this as:               http://server/tag


How to load post content on index page using ajax when post title in sidebar is clicked

I'm working on a new blog which display in a list, on sidebar, some categories and the posts of them. In the index page, in main content, I list some post titles from other category "New". What I need is: when i click on one post link on sidebar to display in main content the post content via ajax or JQuery.


Google Adwords Conversion plugin

Is there an available Google Adwords Conversion plugin for wordpress? I search high and low but can't find any.


Is There Something Wrong With the Iframe Video Embed Feature in WordPress 3.9.1?

**Issue** : When selecting & embedding the video embed code into a WordPress site, the video is not showing up or playing. From my understanding, WordPress now automatically configures for Iframe Ebmed codes. I performed this on a totally fresh install of WordPress **Site** : http://topcontactlenses.net/video-embed-test/ **Video Embed Site** : http://www.cbs12.com/community/features/health- watch/features/lumiere-detox-center/stories/1-what-is-addiction.shtml **Video Embed Code** :                 <iframe id="sbg_video_frame" marginheight="0" scrolling="no" marginwidth="0" frameborder="no" allowfullscreen="yes" src="http://www.cbs12.com/template/flashplayers/jwplayer/dev/files/embed.html?video=2014/04/clips/ZWRkYjY1NTE0MjE3&cdn=wpec&adzone=/4756/WPEC/Web/Health_Watch/Luimere_Detox_Center&autoP=true&poster=http://www.cbs12.com/community/features/health-watch/features/lumiere-detox-center/stories/images/1-stopimg.jpg&event=iframe player&googleID=UA-29043834-10&parent=http://www.cbs12.com"></iframe><script src="http://www.cbs12.com/template/flashplayers/jwplayer/dev/files/embed.js"></script>      **Question** : 1. Is a separate plugin required now for any type of streaming video embeds?


Pagination not working on homepage

I tried multiple solutions but its not working. When I go to /page/2, it doesn't work. I'm executing custom query in index.php of my theme.               if ( get_query_var('paged') ) {     $paged = get_query_var('paged');     } elseif ( get_query_var('page') ) {     $paged = get_query_var('page');     } else {     $paged = 1;     }          $args = array(     'post_type' => array('post', 'music', 'videos'),     'post_status' => 'publish',     //'meta_key' => 'featured',     //'meta_value' => '1',     'posts_per_page' => 10,     'orderby'=>'date',     'order'=>'DESC',     'paged' => $paged     );          query_posts($args);      Here is the link of my website: http://fattrel.developmentdemo.net/ This page is not working (throwing 404) - http://fattrel.developmentdemo.net/page/2/ (of the format - mywebsite/page/2/) Just realized this page 2 works - of the format - mywebsite.com/?page=2


how to list subpages in sidebar without widget

I am trying to create a list of subpages of a parent page, which will appear in the sidebar of my wordpress site. This sidebar will appear on every page. So for example, I have a page with an ID of 54. This page has 7 subpages. I would like to display these 7 pages in the sidebar (just the titles), as well as any more subpages that get added. There is a currently a widget called 'Pages' that will do this, but I would like to do this via code directly in the sidebar.php rather than using a widget as there are a few constraints with using the widget.


trouble with my loop

I am trying to exclude categories from my blog page. I have the code all set up and according to the codex, this should work                $string = '-' . implode( ',-', explode( ' ', $data['exclude_categories'] ) );      The above line will print this to the screen upon testing -homepage,-recent-news Those are the two test categories that I am trying to remove from the blog page. Then I start my query like so                <?php query_posts($query_string .  '&cat=' . $string);?>         <?php if (have_posts()) : ?>             <?php while (have_posts()) : the_post(); ?>       my other code stuff here      when I test the blog page, all the posts show up. I can't figure out what is wrong.


hide block of code from showing on certain pages

Just to warn you, I am a complete PHP novice! I have one sidebar for all pages, however I would like to display certain elements on this sidebar for certain pages. I know there are a few widget plugins, however I am not using widgets, I am just coding in the sidebar.php file. I am aware I can do this...               <?php if( is_page('37') ):?>     SHOW STUFF     <?php endif;?>      ... for showing the content if on that page, but what is the opposite of this? So that 'SHOW STUFF' does not show if we are on page 37? Thanks in advance


Append a custom string in custom post type URL

Is there any way in WordPress how to achieve following situation? I have a custom post type with permalinks. And I need to append a string to this URL, which will produce a different view. E.g. - having a domain.com/project/my- first-project and I need to also have a working situation where domain.com/project/my-first-project/secret-url or domain.com/project/my- second-project/another-secret-url . So the appended string has to be different for each project. Is there a way how to achieve this? Or just have hierachical custom posts and have different templates? Thank you.


Sharing a database amongst multiple local installs/connect to multiple databases?

My team is looking to improve our Wordpress Theme development workflow, and one of the main concerns is battle-testing our themes with all forms of data in all possible environments. For the most part we've loved using WP Test, however since we're ramping up our development efforts we need to be able to consistently test amongst the same set of data, while still being able to manipulate our individual setups. For example, it would be great if we could share the following data amongst all WP installs:   * Posts/Pages   * Comments/Pings   * Media   * Set of chosen plugins But still be able to have the following separately controllable for each install:   * Appearance settings (theme, widgets)   * Plugins (including Jetpack)   * Users   * Administrative settings In doing so, our quality assessment team can set up central data for all developers to test on, ensuring a sound product. I understand this will require one database to be pulled from online, and one to be pulled locally. The problem Im having is that I'm not sure how to set up the multiple database configuration. To quote a co-worker: > Basically, each of us gets our own island with the same set of supplies. > > Only thing is, we're trying to get it so if QA decides on one island that > beans are not allowed, we all lose our beans. > > Or if they add coconuts, we all get coconuts. > > Basically, QA is our god Does anyone have any suggestions for getting a start on this?


Difficulties setting a maximum image width

Currently I have this written in my `functions.php`:               if ( ! isset( $content_width ) )       $content_width = 560;      If I understand correct, this should re-size a relatively large image (1024x1024px) to an image with a maximum width of 560px. My images however _are_ getting re-sized (to a width of 800px), but not to the specified value of 560px. Does someone know what I might be overlooking here, could someone explain to me the use of `$content_width`, and where the value of 800px currently is being specified? For what it's worth all of my values listed at `options-media.php` are set as when installed. Best regards, Jen


Pull next article on last page of gallery pagination

I am using ByREV Gallery Pagination Plugin found here: https://wordpress.org/plugins/byrev-gallery-pagination-for-wordpress/ I am attempting to redirect the user once they reach the last page of pagination within the post. When the user clicks the 'next page' button I would like it to go to the next post, by using `<?php echo get_permalink($next_post->ID); ?>`. Can someone help me out? Use the code below for reference.               #======== byrev insert 2 { ========     $_COUNT_IMAGES = count($attachments);          if ( $pagination == 0 ) {         if (!_FORCE_PAGINATION) {             $pagination = -1;             $_PAGINATE = false;         } else {             $_PAGINATE = true;             $pagination = _IMAGE_IN_PAGE;         }     }     if ($_COUNT_IMAGES > $pagination ) {         $_PAGINATE = true;           } else {         $_PAGINATE = false;          }             if ($_PAGINATE) {              #~~~ extract real permalink gallery              $_THIS_LINK = remove_query_arg( 'page-album', wp_url_link() );                            if (_AJAX_PAGINATION) {             //$_THIS_LINK = add_query_arg( 'ajaxgal', $instance, $_THIS_LINK );  //~~ used gor GET version istead POST (only for debug)         }                     $_NAVI_LINK  = $_THIS_LINK;              if (_QUICK_CACHE_SUPPORT) {             $_NAVI_LINK = add_query_arg( 'qcAC', '1', $_NAVI_LINK );         }                 $_NAVI_LINK = add_query_arg( 'pid', $id, $_NAVI_LINK );              if (!isset($_REQUEST['ajaxgal'])):             $_NAVI_LINK = add_query_arg( 'pin', $instance, $_NAVI_LINK );                    $_NAVI_LINK = add_query_arg( 'gin', $__GALLERY_INSTANCE, $_NAVI_LINK );         else:             $_NAVI_LINK = add_query_arg( 'pin', _REQ_PAGE_INSTANCE, $_NAVI_LINK );                   $_NAVI_LINK = add_query_arg( 'gin', _REQ_GALLERY_INSTANCE, $_NAVI_LINK );         endif;                   #~~~ resolve issue with blog without permalink;          $pos1 = stripos($_NAVI_LINK, '?');         if ($pos1 === false) {             $_ALBUM_LINK = $_NAVI_LINK.'?page-album=';         } else {             $_ALBUM_LINK = $_NAVI_LINK.'&page-album=';               }              #~~~ get/set current page         if ( ((_REQ_POST_ID == $id) && (_REQ_GALLERY_INSTANCE == $__GALLERY_INSTANCE)) || (defined('_AJAX_GALLERY_INSTANCE')) ):                     $_PAGE_ALBUM = __PAGE_ALBUM;         else :             $_PAGE_ALBUM = 1;         endif;                    #~~~ set preview page         if ($_PAGE_ALBUM > 1) {             $_PREV_PAGE = $_PAGE_ALBUM - 1;         } else {             $_PREV_PAGE = 1;         }                 #~~~ set preview URL page         $_PREV_LINK = $_ALBUM_LINK.$_PREV_PAGE;              #~~~ set next page                 $_MAX_PAGE = ceil($_COUNT_IMAGES / $pagination);         if ($_PAGE_ALBUM < $_MAX_PAGE) {             $_NEXT_PAGE = $_PAGE_ALBUM + 1;         } else {             $_NEXT_PAGE = $_MAX_PAGE;         }              #~~~ set next URL page         $_NEXT_LINK = $_ALBUM_LINK.$_NEXT_PAGE;               #~~~ set link class         $pagination_link_class = get_gallery_link_class($instance);              #~~~ set rel tag;         //$rel = &$GLOBALS['byrev_gallery_rel'];         $_MARK_INSTANCE = 'gpin'.$instance;         $_HASH_MARK = '#'.$_MARK_INSTANCE;              #~~~ navigation page                  if (!_EXTEDED_PAGINATION) {             $paginate_html = '
 ◀ '.$_PAGE_ALBUM.'/'.$_MAX_PAGE.' ▶
';         } else {                      $paginate_html = '
 ◀';             for ($i=1; $i<=$_MAX_PAGE; $i++) {                 if ($i > 1) {                     $_LINK = $_ALBUM_LINK . $i;                 } else {                     $_LINK = $_THIS_LINK;                 }                 if ($_PAGE_ALBUM == $i) {                      // $paginate_html .= ''.$i.'';                                         $paginate_html .= ''.$i.'';                 } else {                     $paginate_html .= ''.$i.''; }             }                     $paginate_html .= '▶
';          }               $_START_ITEM = ($_PAGE_ALBUM - 1)*$pagination;          $_END_ITEM = $_START_ITEM + $pagination;          } else {         $paginate_html = "";         $_START_ITEM = 0;         $_END_ITEM = 1000;     }