Use custom walker to add taxonomy terms to main nav menu

I created a _Custom Post Type_ : **Product** and a _Taxonomy_ assigned to it: **Products** So under that Taxonomy I can add different types of products ( _terms_ if i'm not mistaken). When adding new products I get to choose the different terms where it belongs or add new ones. I want to add this terms to the main navigation menu under 'Products'. As a dropdown in a hierarchical way. I've tried with custom walker following this example but that displays posts, i need terms in a hierarchical way. Also tried modifying the code but can't make it work, tried _add_filter_ with _wp_nav_menu_items_ to add items to the menu, ~~but it just doesn't work, I don't know the properties of the items objects~~. ## Edit I had a breakthrough using `add_filter` and a custom category walker, but it only shows first level. When I need to display in tree mode:   * Products       * A      * B        * B-1      * C         * C-1       * C-2       * C-3 # Custon nav walker               class top_bar_walker extends Walker_Nav_Menu {          function display_element( $element, &$children_elements, $max_depth, $depth=0, $args, &$output ) {         $element->has_children = !empty( $children_elements[$element->ID] );         $element->classes[] = ( $element->current || $element->current_item_ancestor ) ? 'active' : '';         $element->classes[] = ( $element->has_children && $max_depth !== 1 ) ? 'has-dropdown' : '';              parent::display_element( $element, $children_elements, $max_depth, $depth, $args, $output );     }          function start_el( &$output, $object, $depth = 0, $args = array(), $current_object_id = 0 ) {         $item_html = '';         parent::start_el( $item_html, $object, $depth, $args );               $output .= ( $depth == 0 ) ? '

' : '';              $classes = empty( $object->classes ) ? array() : (array) $object->classes;              if( in_array('label', $classes) ) {             $output .= '

';             $item_html = preg_replace( '/]*>(.*)<\/a>/iU', '$1', $item_html );         }          if ( in_array('divider', $classes) ) {         $item_html = preg_replace( '/]*>( .* )<\/a>/iU', '', $item_html );     }              $output .= $item_html;     }          function start_lvl( &$output, $depth = 0, $args = array() ) {         $output .= "\n
\n";     }          }      # Filter               add_filter('wp_nav_menu_items','add_menu_products');          function add_menu_products($items) {                      $args = array(                     'show_option_all'    => null,                     'orderby'            => 'name',                     'order'              => 'ASC',                     'style'              => 'list',                     'show_count'         => 0,                     'hide_empty'         => 0,                     'use_desc_for_title' => 0,                     'child_of'           => 0,                     'feed'               => '',                     'feed_type'          => '',                     'feed_image'         => '',                     'exclude'            => '',                     'exclude_tree'       => '',                     'include'            => '',                     'hierarchical'       => 1,                     'title_li'           => null,                     'show_option_none'   => __( 'No categories' ),                     'number'             => null,                     'echo'               => 0,                     'depth'              => 0,                     'current_category'   => 0,                     'pad_counts'         => 0,                     'taxonomy'           => 'products',                     'walker'             => new Categorias_Menu_Walker()                 );                       $cat_menu = wp_list_categories( $args );          $items = '
     Productos
'.$cat_menu.'

' . $items;     return $items;     }      As you can see I had to hard code the menu item 'Productos' and add the sub- items to it. # And the custom category walker assigned to it               class Categorias_Menu_Walker extends Walker_Category {     function display_element( $element, &$children_elements, $max_depth, $depth=0, $args, &$output ) {         $id_field = $this->db_fields['id'];         $id = $element->$id_field;         $this->has_children = !empty( $children_elements[ $id ] );         //$element->classes[] = ( $element->current || $element->current_item_ancestor ) ? 'active' : '';         $element->classes[] = ( ($max_depth == 0 || $max_depth > $depth+1 ) && isset( $children_elements[$id]) ) ? 'has-dropdown' : '';              parent::display_element( $element, $children_elements, $max_depth, $depth, $args, $output );     }     function start_el( &$output, $category, $depth = 0, $args = array(), $id = 0 ) {              $item_html = '';         parent::start_el( $item_html, $category, $depth, $args );               $classes = empty( $category->classes ) ? array() : (array) $category->classes;              if( in_array('label', $classes) ) {             $output .= '

';             $item_html = preg_replace( '/]*>(.*)<\/a>/iU', '$1', $item_html );         }          if ( in_array('divider', $classes) ) {         $item_html = preg_replace( '/]*>( .* )<\/a>/iU', '', $item_html );     }              $output .= $item_html;          }     function start_lvl(&$output, $depth=0, $args=array()) {           $output .= "\n
\n";       }       function end_lvl(&$output, $depth=0, $args=array()) {           $output .= "
\n";       }       }      In case this helps, i'm using FoundationPress's theme. Hope someone can help me out, thanks!


Is there a way I can write a series in WordPress?

What I mean by series is like writing a book. A reader should be able to click on the book and then proceed to read the chapters. I can probably mimic it by creating a page and then linking it to a series of posts. I am looking for a more natural way to present and navigate.


wp_update_comment not working

I've created a custom comment editor and for some reason, wp_update_comment is not working. It returns 1, which means it should have been successful but it's not actually updating anything. Listed below is my update code. It's important to note that I've double checked that the proper data is being added to $commentarr from the form POST.               $commentarr = array();     $commentarr['comment_ID'] = $comment_ID;     $commentarr['comment_content'] = $commentContent;     $update_success = wp_update_comment($commentarr);              if ($update_success == 1) {             $comment = get_comment($comment_ID);             $article_link = get_permalink($comment->comment_post_ID);             wp_redirect( $article_link );         }              else {             $commentError = 'Something went wrong while updating your comment.';             $hasError = true;         }      ****UPDATE**** So after hacking away at the core, it turns out the error happens when....               do_action('edit_comment', $comment_ID);      ...is called. Not sure if there's a plugin that's hooked into the edit_comment action or what but that's my guess at this point. **_**UPDATE #2 **_** So the problem is DEFINITELY a BuddyPress issue. Tracked the problem to the file bp-blogs/bp-blogs-functions.php Going through the code now to see what the issue is but if I disable their add_action hook, I don't have any problems editing comments.


Is it possible to save an entire piece of rendered HTML in a transient?

I have some query that brings around 50+ posts (I know it's not ideal but had to do that to build something the client asked..) and a set of loops to order them in a certain way and it looks like that this sequence is delaying parts of the rendering of the page. I'd like to cache in a transient this entire block of rendered HTML, is that possible?


Are there any Worpdress plugins to change the theme editor?

I've been browsing around a bit, but haven't been able to find any plugins for changing the default theme editor. Currently it's a text area with no syntax highlighting. I'd like something that at least gives syntax highlighting. There are all sorts of plugins for the post editor, but I've yet to find one for the theme editor. If all else fails, I'll make one myself, but I thought I would ask here before I did that. Thanks!


Custom port problem with local MU installation

### Situation I've just setup a new installation of WordPress (running on XAMPP/Win7). As I had a port conflict on `:80/:443`, I switched to `:187/4430`. ### Error When I'm now trying to access `http://vanilla-mu.dev:187/index.php` (or any other request), then I run into the following WordPress Error inside a `wp_die()` page: > _`Multisite only works without the port number in the URL.`_ ### Question As I know that the error is non resolvable according to ticket #21077, I need to somehow change my setup. How could I work around this? What would be a setup that accounts the fact that there's a port conflict, but doesn't run into the core bug? ### The setup               // ~\xampp\apache\conf\httpd.conf     Listen 187     ServerName 127.0.0.1:187          // ~\System32\drivers\etc\hosts     127.0.0.1 localhost     127.0.0.1 vanilla-mu.dev          // ~\xampp\apache\conf\extra\httpd-vhosts.conf     ## vanilla-mu.dev     <VirtualHost *:187>         ServerName www.vanilla-mu.dev         ServerAlias vanilla-mu.dev         DocumentRoot "C:\xampp\htdocs\vanilla-mu.dev"         <Directory "C:\xampp\htdocs\vanilla-mu.dev">             Options +Indexes +FollowSymLinks +Includes             AllowOverride FileInfo             AllowOverride All             Order allow,deny             Allow from all             DirectoryIndex index.php index.shtml index.html index.htm         </Directory>         ErrorLog "logs/error_vanilla-mu.log"         CustomLog "logs/access_vanilla-mu.log" combined     </VirtualHost>      **EDIT:** _Additional info for later readers to identify possible conflicts._ ## Port conflict available? First hit your `Win` Start Button and open the command line interface typing `cmd`. Then type the following line, followed by the port number to check (`80` and `443`).               netstat -o -n -a | findstr 0.0:80     netstat -o -n -a | findstr 0.0:443      You will then see the process(es) ID(s) that are currently using the questioned port. > ![enter image description here](http://i.stack.imgur.com/hB6Gv.png) ### Identify a port conflict and what is causing it The next thing to do is to right click on your menu bar and open the `Taskmanager`. The `Taskmanager` by default doesn't show the PID. I added a screenshot that shows you how you can add it. > ![enter image description here](http://i.stack.imgur.com/mFUW6.png) _The question still remains._


Wordpress query vars are not added

I'm currently trying to figure out how to get my custom url rewrites working (WP Rewrite the last two parts of the URL), while doing this I came across the following problem: I have made a custom plugin (OOP) and I'm trying to add query variables to the public wordpress query variables list. The code I use is the following:               /**          * Adding the trainingid var so that WP recognizes it, this is being called on the query_vars filter in the constructor.          * @param $vars the variables coming from the filter          * @return the same variables with the plugins query vars appended.          */         function my_insert_query_vars($vars)         {             // Push the query var id in the $vars array             array_push($vars, 'trainingid');             return $vars;         }      But when I execute the following code via a shortcode on a page the array printed does not contain trainingid.               global $wp_query;     var_dump($wp_query->query_vars);      Could anybody tell me what I am doing wrong?


Problem excluding category from get_next_post

I have a custom post type called "exhibitions" that uses the native "category" taxonomy. I have three categories: Current, Past, and Featured. Posts get marked either Current or Past and some are also marked as Featured. I want my next/prev links on single pages to exclude the 'featured' category (tag_ID=21) so that my current and past posts don't cross over when users are using post navigation, but I can't seem to get this to happen. I have tried: `get_next_post(true,'21')`, `get_next_post(false,'21')` and pretty much every other permutation of arguments, but my Past/Featured posts continue to show up adjacent to my Current/Featured posts in the post navigation.


Can you limit the memory usage of a particular plugin?

I know that it is possible to restrict (or extend) the memory usage of the entire WP site using:               define('WP_MEMORY_LIMIT', '64M')      Is it possible to do the same for only one plugin that the website uses ?


How to query posts by month based on date custom field?

I currently created a custom field for a custom post type that stores a date in the format dd/mm/yyyy is there a way to query the posts by the month? I "kind of" got the functionality I need using the following query: `query_posts('post_type=attraction&meta_key=attraction_date&meta_value=10&meta_compare=LIKE');` The `meta_value` parameter would be the month but since I'm using `LIKE` to compare if I have a date like 10/04/2011 it'd be returned even though it's not from october. I know there's a `RLIKE` expression in MySQL that lets you use regex for the `LIKE` condition but I'm not sure if wordpress lets you use it in any way. Thanks in advance!


Set user ID at time of wp_create_user

I'd like to add a new user to the WordPress user table. The code for wp_create_user works fine but it is adding the user incrementally to the next available ID in the user table. Instead, **I want to create the user and assign it to a particular user ID**. The user ID is already available (externally) and I want the ID entered into the WordPress database to match the external one.               $user_login = $username ;     $pas1 = $email_address;     $user_email = $email_address;          wp_create_user( $user_login, $pas1, $user_email );     $user = new WP_User($user_id);     $user->set_role('editor');       For example, I want to know how to set the known $user_id at the time of wp_create_user.


Is there way to rename user role name without plugin?

Is there anyway to rename a user role name via hook, instead of using plugin?


One metabox for multiple post types

I have this code               function add_custom_meta_box() {     add_meta_box(         'custom_meta_box', // $id         'Custom Meta Box', // $title          'show_custom_meta_box', // $callback          'page', // $page             'normal', // $context         'high'); // $priority     }     add_action('add_meta_boxes', 'add_custom_meta_box');      I want to add more post type like page,post,custom_post_type in this code                 'page', // $page       How should I rewrite my code?


How to split the categories of subcategories with thumbnails

This is the code I use to display all product categories with thumbnails:               <?php     $cats = get_terms('product_cat', array(         'hide_empty' => 0,         'orderby' => 'name'     ));     ?>
          <?php foreach($cats as $cat) : ?>                        <?php   global $wp_query;                 if($cat->category_parent == 0) {                     $category_id = $cat->term_id;                     $thumbnail_id   = get_woocommerce_term_meta( $cat->term_id, 'thumbnail_id', true );                     $image = wp_get_attachment_url( $thumbnail_id );                     echo '
slug, 'product_cat') .'">'. $cat->name .'';                     echo '';                 }             ?>               <?php endforeach; ?>
      Could anyone help me how to split the categories of subcategories, while having only thumbnails subcategories eg. like this:   * category (text)     * subcategory (thumbnails)     * subcategory (thumbnails)   * category (text)     * subcategory (thumbnails)     * subcategory (thumbnails)


WP_Query post at custom position

Lets say I have a custom query which based on two custom post types:               $wp_query = new WP_Query(array(                'post_type' => array('post-type-1', 'post-type-2'),                 'post_status' => 'publish',                 'posts_per_page' => '3');      what I want is to put posts from post-type-2 post on the third position in results on each page. Is it possible in ONE query with filters or any other way ? thank you!


Choose template depending on URL

I have the following basic page setup:   * xxx.net/ -> static homepage   * xxx.net/blog/ -> blog page with loop showing all posts   * xxx.net/gallery/ -> gallery page with loop only showing posts that are categorized as "gallery"   * xxx.net/extra/ -> another page with loop only showing posts that are categorized as "extra" The two special categories "gallery" and "extra" are used to filter certain posts and display them in a different way: On `/gallery`, only posts of category "gallery" are shown (actually there custom excerpts rather than their standard content); the equivalent holds true for "extra". So far that's all clear to me, however depending on whether a post is shown as part of the blog loop or the other loops, different post templates are used: if a post is called via `xxx.net/gallery/post-name`, the gallery template is used, if called via `xxx.net/blog/post-name`, the standard template is used. How can I do this? I somehow think the answer is simple but I just don't see it right now! Would it make sense to use a new, custom taxonomy rather than categories to distinguish the "special" posts? The main question regarding permalinks remains the same however. Addition: I guess I could create a `single.php` with the following switcher:               if ( URL INCLUDES /GALLERY/ ) {include (TEMPLATEPATH . '/single-gallery.php');}     else if ( URL INCLUDES /EXTRA/ ) { include (TEMPLATEPATH . '/single-extra.php');}     else { include (TEMPLATEPATH . '/single-blog.php'); }      However I think a rewrite rule or similar would be the better approach. What is your take on the topic? Second Addition: To further explain why I would like this functionality: Think of a trip report. It contains some text (the actual trip report) plus a collection of photos (the trip gallery). Instead of seperating the two things by creating two different posts, I would like to create only one post with the text as content and the photos as attachments. Then I would also like to allow the visitor to a) read the post as a standard blog entry with standard output without the photos by calling `.../blog/post-name` b) view the post as a photo album (e.g. thumbnail page) by calling `.../gallery/post-name`


Standard Way To Do Custom Work Within A Page?

First post here, looking forward to using this community more. I'm trying to figure out the "standard" way or "proper" way of doing custom HTML work within a particular page. For example, I'm creating a page that has images floated to the left and right of text going down a page. However, I'm finding it difficult to create spacing in the page itself. Here's a page I'm working on for example: http://www.simonsayswebsites.com/how-we-get-you-more-customers/ If you look after the "like" button, I have tried multiple things to create spacing underneath the text above the `<hr />`, but no go. I have tried multiple times to create spacing within this page trying all different tags, but I've gotten to the point where now I'm not sure if there is another proper way I should be doing this? I disabled the visual editor thinking this would fix it, but no go. Perhaps I should use TinyMCE for stuff like this? Or anyone have any recommendations for the right way to do things in editing page content spacing which should be easy with html, but is becoming more complicated here with something not sure.


Transform php code into a widget?

how can I create a widget out of a php code? It's just a disqus code that I would like to place in the sidebar. I could just paste the code in the widget section (my tag), but then I would not be able to change it's order with the other wigets. This is why I want to convert this code into a widget.


Counting pageviews on high-traffic cached sites

Our site is quite high traffic and we use both nginx and w3 total cache to handle the load. We've previously been using wp-postviews to count the page views, but it seems to be locking the postmeta table now, and often doesnt count views at all. It's unreliable at best. Can anyone suggest a way for us to count page views and put them into the DB, or any specific workable solutions? My initial thoughts are to have the view count done via javascript to update a separate database, then a cron job at the end of each day to merge the results, but I'm not sure where to start. Thanks in advance


page is not redirecting

I want to redirect to a page to my home page if there would be found only one post.I have tried below code but it is not working, i have also tried header("location:url"), but it is also not working.                <?php            $args = array(            'post_type' => 'post',            'posts_per_page'=> 10,            'post_status' => 'publish',             );        $my_query = new WP_Query($args);        $count=$my_query->found_posts;          if($count<2){           wp_redirect( home_url() ); exit;      }     ?>


Set page to draft on plugin deactivation

Im working on a little plugin that when activated creates a theme page and then a function sets this page to published this is the code i have for published:               // function that creates the new ads page on plugin install //      function mjj_create_page ()     {     // Create new page object     $ads_page = get_option('mjj_smart_ads_page');          $ads_new_page = array(         'post_title' => 'Smart Ads',         'post_content' => '',         'post_status' => 'publish',         'post_type' => 'page'        );        // Insert the page into the database     $ads_page = wp_insert_post( $ads_new_page );     update_option('mjj_smart_ads_page', $ads_page);          // now lets give this new page a groovy template     $ads_page_data = get_page_by_title('Smart Ads');     $ads_page_id = $ads_page_data->ID;     update_post_meta($ads_page_id, '_wp_page_template','tpl-smart-ads.php');          }      dont know if its semanticaly wp perfect but it seems to work ok and does what i need, however now im trying to set a function that will on plugin deactivate set this created page to draft status so it doesnt show in the menu, but it just doesbt seem to want to play, heres what im working with:               // function that drafts smart ads page on plugin deactivate //      function mjj_unpublish_page ()     {     $old_ads_page = get_option('mjj_old_smart_ads_page');           $ads_old_page = array(         'post_title' => 'Smart Ads',         'post_content' => '',         'post_status' => 'draft',         'post_type' => 'page'         );          // Insert the page into the database     $old_ads_page = wp_update_post( $ads_old_page );     update_option('mjj_old_smart_ads_page', $old_ads_page);      }      and below are my hooks                   // create the page to get the info for selling ads and posting ads         register_activation_hook($file, array(&$this, 'mjj_create_page'));         //while in this block i will also add the deactivate function to unpublish the created page     register_deactivation_hook($file, array(&$this, 'mjj_unpublish_page'));      as you can see im thinking that setting to draft will include the use of wp_update_post, but it dont seem to be working right when deactivating, im ending up with one Smart Ads page published and one in draft


Payment on Registration?

Case Study: I need people pay me when they come to register on my site. Most of the page should be only available for logged in user. Paypal will be my payment options. Question? I need to know how can i communicate with paypal after making the payment that a user did the payment or not?


How can I delay the publishing of a page or post?

Sometimes it would be nice to be able to set a draft to be published when I'm not in front of the keyboard. Is this possible? If so, how?


How to hide wordpress default description box?

I'm using custom fields in my wordpress default post area. So i don't want wordpress default description box. I mean i dont want this field. ![enter image description here](http://i.stack.imgur.com/PaSIG.png) Instead of description box i want excerpt box there. Please help me. Thanks


How Can I Pass the Shortcode's $atts Variable to the Plugin's Javascript Function

I need to pass a plugin's $atts variable to a javascript function, but I'm not sure how to do it. The javascript function needs the shortcode's php latitude variable in order to build the map. My plugin looks like this:               <?php     /*     Plugin Name: Lax Google Map Plugin     Plugin URI: http://www.mysite.com     Description: Makes Map     Version: 1.0     Author URI: http://www.mysite.com     */          function lax_google_map_init() {         wp_enqueue_script('google-maps', 'http://maps.googleapis.com/maps/api/js?sensor=false');         wp_enqueue_script('lax_google_map_script', plugins_url('js/lax_google_map_script.js', __FILE__), array('google-maps','jquery'));     }          add_action('init', 'lax_google_map_init');               function lax_google_map_maker($atts,$content=null) {              $atts = shortcode_atts( array(             'width' => '600',              'height'=>'600',             'latitude'=>'38.9205'             ),             $atts);                   $output .= '

';              return $output;     }           add_shortcode('lax-google-map', 'lax_google_map_maker');          ?>      The javascript file looks like:               jQuery.noConflict();          jQuery(document).ready(function($) {            var latlng = new google.maps.LatLng(39.73, -76.02);       var myOptions = {           zoom: 8,           center: latlng,           mapTypeId: google.maps.MapTypeId.ROADMAP         };                var map = new google.maps.Map(document.getElementById("map_canvas"),             myOptions);          });      So I need to replace '39.73' with something like: pseudo-code: > var latlng = new google.maps.LatLng( + $atts['latitude'] + , -76.02); Also, the javascript gets loaded before the shortcode $atts are available. What's the best way to change it? Sorry, for the basic questions. I'm learning how to write a plugin. Any suggestions? Thank you. -Laxmidi * * * UPDATE: If I add this:               $params = array (             'latitude'=>  '39.01',             'longitude'=> '-76.02'             );              wp_localize_script('lax_google_map_script', 'lax_map_params', $params);      to `lax_google_map_init()` And I add:               var latlng = new google.maps.LatLng( lax_map_params.latitude, csf_crime_map_params.longitude);      to my javascript function, the map works. How would I replace '39.01' with the `$atts[latitude]` and -76.02 with `$atts[longitude]` ? I'm still learning about scope in php. Thank you.


Show a different number of posts per page depending on context (e.g., homepage, search, archive)

In the Reading Settings, there is place to set the number of posts shown that affects the number of posts shown in all contexts. I'd like to show instead a certain number of posts on the homepage, and a different number of posts on pages like archive, search results, etc. ![reading-settings-blog-pages-show-at-most-per- page](http://i.stack.imgur.com/csv2y.png) I realize I could do this by editing the theme files and changing the query parameters there, but I'd prefer to have easier access to a simple settings page. A long time ago, I came across a plugin that did this, but I can't locate it now. Does anyone know of a plugin to do this, or even a function I could put in functions.php to accomplish the same thing?


Why do Custom Nav Menus generate so many classes on list items? Can I manage this somehow?

Below is an example. 3 classes attached to each item, except current item, which has 6. Can I pare this down somehow?

Home

Services

Case Studies

Story Discovery

Company

Why Case Studies?

Case Study Showcase

Resources

Online Store

Contact Us


Where can I download WordPress themes from?

What sites offer WordPress themes to download? (Can be paid-for or free) It's community wiki so if we had one site per answer, and with a little additional detail on each site, what sort of themes they generally offer, whether their themes are paid-for or free etc.


Get the the top-level parent of a custom taxonomy term

How would I get the top-level parent of a given term? I am using `wp_get_object_terms` to get taxonomy terms on posts, but instead of showing all tagged terms, I only want to show tagged terms' top-level parents. So if these are my selected terms, I only want to show Breakfast, Lunch and Dinner.               x BREAKFAST        x Cereal        x Eggs       LUNCH          Hamburger        x Pizza       DINNER          Fish             Bass           x Salmon             Trout          Lasagna      How can I do this?


Gallery preview on Post Format posts

I am trying to put a 2 picture preview of a gallery on each post that is the post format of 'gallery'. I managed to get all the thumbnails to show up in a post with:                <?php echo do_shortcode('[gallery option1="value1"]'); ?>      in the content-video.php page. Am I on the right track or should I be going another direction in order to accomplish this. Any help is appreciated!


Wordpress page/blog incorporated into static website

Currently, I have a static website. I wanted to know how I could go about replacing one of the static pages with a WordPress page that will function as the websites blog? I know how to create a WordPress template, but I'm a little confused about what the URL would be? The website in question is www.3elementsreview.com and the blog would be at www.3elementsreview.com/3eblog. So, how can I replace that current page (3eblog), with a WordPress version? Thanks, Marlon


Database create or redirect

I am working on a site ABC.com, I have only access to the root folder. I am planning to install wordpress. I need to somehow create a database without any cPanel. or the second option that comes in my mind is if I can install wordpress in server A where I have only access to the rootfolder only and use the database from another server B which I can fully control through cPanel. I have created a database on server B. but how to set it(probably through wp-config.php) so it can be accessed through domain. third option is if I can create a site(DEF.com) on server B and the domain of site(ABC.com) at server A redirects here and masks the URL with ABC.com. I dont want to show DEF.com at all.


Remove read more

I'm using 3.5.1 and WP UI plugin. When i create a post, add automatically Read More button. Like this:
Read More...
      But i cannot use Read More options anyway on my site. Whats best way remove this option?


wordpress get gallery images title

I am retrieving some images post with:               $img = wp_get_attachment_image_src( $attachment_id, 'full' );      How can I retrieve the image title? Thanks.


Alter the image used for a user who has not uploaded a custom image yet

I was wondering if the default image generated for a user in the comment section is "set" somewhere in the WordPress backend. If so, I'm not sure where this setting is. Please see this image to see what i'm referring to: ![screenshot of images in comment section](http://i.stack.imgur.com/3hShI.png) The user Jimmy Jacob doesn't have an image yet the commentor Catherine does. Without installing plugins, is there a native WordPress setting which would let me upload a default image to use for this?


Search Custom Post Type Pages and Custom Fields in 2 Dropdowns?

On my custom post type pages I have custom fields that the user can edit.   What I want is to have a search form with 2 select dropdowns: one dropdown that is populated with all the top-level custom post type pages, and the other dropdown to narrow the results down to show pages that have a certain custom field value. So far I have not been able to get the results to filter via the custom field. Here is my form code so far:                 <form method="get" action="<?php echo get_permalink($properties_search_id); ?>">                 <input type="hidden" name="post_type" value="floor_plan" />

                                 Bedrooms:
                                     <select name="bedrooms" class="bedrooms">                                         <?php                                             $metakey = 'number_of_bedrooms';                                             $bedrooms = $wpdb->get_col($wpdb->prepare("SELECT DISTINCT meta_value FROM $wpdb->postmeta WHERE meta_key = %s ORDER BY meta_value ASC", $metakey) );                                             if ($bedrooms) {                                             foreach ($bedrooms as $bedroom) {                                               echo "<option value=\"" . $bedroom . "\">" . $bedroom . "</option>";                                             }                                             }                                         ?>                                     </select>

                                 Property Type:
                                           <?php                                          $args = array(                                             'child_of'     => 0,                                             'sort_order'   => 'ASC',                                             'sort_column'  => 'post_title',                                             'hierarchical' => 2,                                             'depth'         => 1,                                             'post_type' => 'floor_plan'                                             );                                         wp_dropdown_pages( $args );                                     ?>

                         <input type="submit" value="Search" class="wpp_search_button submit">

             </form>      I'm really having trouble figuring this out, if someone could help it would be greatly appreciated.


Using wp_get_nav_menu_items() to list children of children pages

I'm working with a Genesis Based Theme and I'd like build a Page/ Child Page menu structure. That part I can do with the help of some code produced by Bill Erickson. Essentially what I'm trying to do is create a menu above content on pages with child pages. Then, in the left sidebar, have navigation for children pages with children. I've got something setup here: sandbox.digisavvy.com Here's the code I'm working from.               <?php          /**      * Section Menu      * Displays the subpages of the current section      *      * @author Bill Erickson      * @link http://www.billerickson.net/custom-secondary-menu      */     function be_section_menu() {              // Only run on pages         if( !is_page() )             return;              // If top level page, use current ID; else use highest ancestor         global $post;         $section_id = empty( $post->ancestors ) ? $post->ID : end( $post->ancestors );              // Get all the menu locations         $locations = get_nav_menu_locations();         // Find out which menu is in the 'primary' location         $menu = wp_get_nav_menu_object( $locations[ 'primary' ] );         // Grab all menu items in this menu that have a parent of the current section.         // This grabs the subpages, assuming the current section is a top level page         $menu_items = wp_get_nav_menu_items( $menu->term_id, array( 'post_parent' => $section_id ) );         // If there are menu items, build the menu         if( !empty( $menu_items ) ) {             echo '
';             $first = true;             foreach( $menu_items as $menu_item ) {                 $classes = 'page-item';                 // This adds a class to the first item so I can style it differently                 if( $first )                     $classes .= ' first-menu-item';                 $first = false;                 // This marks the current menu item                 if( get_the_ID() == $menu_item->object_id )                     $classes .= ' current_page_item';                 echo '
url . '">' . $menu_item->title . '
';             }             echo '
';         }          }     add_action( 'genesis_before_loop', 'be_section_menu' );      The next part that I'd like to accomplish is to create a menu system with Child Page/ Child of Child Page. That's the part where I'm stuck. This code below is suggested as a change, but doesn't quite do the trick. It just adds the children of children to the navigation.               global $post;     $level = count( $post->ancestors );     // Only build tertiary menu if current page is at least third level     if( 1 > $level )         return;     $section_id = $post->ancestors[$level - 2];


How Can I Duplicate a Widget?

By duplicate, I don't me copy the code from a (core) widget and change it a bit. That's pretty easy. I want the push button ability to grab all the settings from a given widget, copy them, stick them into a new widget of the same type, and send that new widget to the same or a new widget area. Or, better yet: have a widget in another widget area share settings with an already existing widget -- when the parent changes, the other changes. Are either of those possible? How?


Disable domain redirect

Desired behavior: `http://www.situationware.com` should stay at `www.situationware.com`, no registration required. Currently wordpress is automatically redirecting to the Amazon hostname `ec2-107-22-241-162.compute-1.amazonaws.com`, requesting users register, if I update wp-config.php by uncommenting `DOMAIN_CURRENT_SITE` I end up with a redirect loop to http://situationware.com/wp-signup.php?new=situationware.com As you'll see below I do have multisite installed as was working a few months ago before any upgrades to 3.6.1. I installed the WordPress MU Domain Mapping plugin, but didn't help and didn't hurt. I wasn't able to add a main site, but domain mapping screen was set.               define( 'MULTISITE', true );     define( 'SUBDOMAIN_INSTALL', true );     $base = '/';     define( 'DOMAIN_CURRENT_SITE', 'ec2-107-22-241-162.compute-1.amazonaws.com' );     //define( 'DOMAIN_CURRENT_SITE', 'situationware.com' );     define( 'PATH_CURRENT_SITE', '/' );     define( 'SITE_ID_CURRENT_SITE', 1 );     define( 'BLOG_ID_CURRENT_SITE', 1 );


How do I embed an image at actual size?

I'd like to give the user the option to insert images into posts, and have the image display at its actual size. How do I do this? Currently, if an image is selected from the media library, a dropdown menu displays, giving sizing options. None of the options allow for a default size. Neither are there any options that allow for inline style to be turned off for the image.


Is it possible to remove the main rich Text box editor?

I am using the simple fields plugin to provide additional rich text editors and have no need for this 'main' text editor box on any of my 'page's I have tried the following code in my functions.php:               function my_remove_meta_boxes() {     remove_meta_box('postdivrich','page','normal');     }     add_action( 'admin_menu', 'my_remove_meta_boxes' );      Apparently this will not work since it is not actually a meta box... I suppose I could sneak some jQuery in somewhere: `('#postdivrich').hide()` but I am not really sure where to put it, and suspect that there is a better way. Any help would be greatly appreciated **Edit:** this question describes how to do what I want, but for a custom post type. Can I apply this same technique to 'pages' somehow? **Edit 2:** Using noob power I made _something_ work, but for all post-types and with it flashing on screen before being hidden. I skipped JQuery and went straight for plain ole JS:               //REMOVE MAIN TEXT CONTENT BOX FOR PAGES     function removeMainTxtContent(){         echo '<script>window.onload=function(){document.getElementById("postdivrich").style.display="none";}</script>';     }add_action('admin_head', 'removeMainTxtContent');


How to set/force the size of the image/attachment uploaded by frontend form?

I have a front end form to let users upload images to my website and i set the post attachment image like this:               // find the most recent attachment for the given post             $attachments = get_posts(                 array(                     'post_type' => 'attachment',                     'numberposts' => 1,                     'order' => 'ASC',                     'post_parent' => $new_post                 )             );             $attachment = $attachments[0];                  // and set it as the post thumbnail             set_post_thumbnail( $new_post, $attachment->ID );      It's working... but i want to set/force the size of the image to be ('my- size') so i created this custom size:               add_image_size( 'my-size', 615, 9999 );      But i don't know how to set it up... How can i accomplish this?


Wordpress Cache not working with some ajax calls

I need to install a plugin for caching my wordpress/buddypress pages or at least add `define('WP_CACHE', true);` to `wp-config.php` but when I do this, the button "join this group" that uses Ajax calls don't work. I don't know what to do in this case, do you have suggestions ?


how can i send this to wp_head - escape problem

how can escape this char ----> ; **i ask becuse i want to use this to send some javascript to the head using wp_head** this is want i want to attach to wp_head:               add_action('wp_head', 'load_lighbox_portfolio');          function load_lighbox_portfolio() {         echo '<!--===STR=========== LIGHTBOX =================-->'. "\n";         echo '<script type="text/javascript" src="'. get_bloginfo('template_url') .'/jquery-lightbox/js/jquery.js"></script>' . "\n";         echo '<script type="text/javascript" src="'. get_bloginfo('template_url') .'/jquery-lightbox/js/jquery.lightbox-0.5.js"></script>' . "\n";         echo '<link rel="stylesheet" type="text/css" href="'. get_bloginfo('template_url') .'/jquery-lightbox/css/jquery.lightbox-0.5.css" media="screen" />' . "\n";         echo '<script type="text/javascript">' . "\n";         echo '$(function() {' . "\n";         echo '$('a.lightbox').lightBox(); // Select all links with lightbox class' . "\n";         echo '});' . "\n";         echo '</script>' . "\n";         echo '<!--===END=========== LIGHTBOX =================-->'. "\n";        }      Everything works great.. only trouble is that ---> ; symbole...   i looked for a replacement HTML char but couldnt find one.. Help would be apreaciated :)


How to create a structure in wordpress for parent and child relationships contents

Could any one tell me how to do the following structure in wordpress whether using taxonomy, term , post or page Example :               Parent           A -- Title -- Description     B -- Title -- Description     C -- Title -- Description     ...     ..     Z      Every Parent Have Child:               Example :          Parent " A " having Child A00 - A10 ...          Example :          A00 - A10 -- Title -- Description     A11 - A15 -- Title -- Description     ....          A30 - A35 -- Title -- Description          and Every child have another child           Ex:           For A00 - A10  have          A00.0 -- Title -- Description     A00.1 -- Title -- Description     ..     A00.9


How to show avatar of current logged in user in a widget

I have a php widget, and I need to show the avatar of the current logged in user, and I'm calling this code: `<?php echo get_avatar(); ?>` But its only outputting the default avatar. Is there a global I need to add above it?


wp_dropdown_roles() to replace option value = code

I'm trying to replace a hardcoded dropdown list of roles in a plugin. Currently this is the code:               echo '<select name="xf_user_role_' . $id . '" id="xf_user_role_' . $id . '">';     ?>          <option value='subscriber'     <?php echo ($xf_options['xf_user_role'][$id] == 'subscriber') ? "selected='yes'" : ''; ?> >Subscriber</option>          <option value='contributor'     <?php echo ($xf_options['xf_user_role'][$id] == 'contributor') ? "selected='yes'" : ''; ?> >Contributor</option>          <option value='author'     <?php echo ($xf_options['xf_user_role'][$id] == 'author') ? "selected='yes'" : ''; ?> >Author</option>          <option value='editor'     <?php echo ($xf_options['xf_user_role'][$id] == 'editor') ? "selected='yes'" : ''; ?> >Editor</option>          <option value='administrator'     <?php echo ($xf_options['xf_user_role'][$id] == 'administrator') ? "selected='yes'" : ''; ?> >Administrator</option>          </select>       This code is changed to :               echo '<select name="xf_user_role_' . $id . '" id="xf_user_role_' . $id . '">';     wp_dropdown_roles( );     ?>     </select>       The dropdown list shows but selecting doesn't give the $xf_options ... The wp_dropdown_roles isn't well documented in the Codex page. I've tried a few different ways to add information into the () but am not getting it right. What is the proper information for within the ()?


linked php file not executing php

I have a menu that has the following link in it to my homepage:

<a href="<?php bloginfo('template_url'); ?>/homepage.php" target="_top" title="Home" style="height:20px;line-height:20px;">Home
      When I click on the menu link it takes to the homepage file (this url:http://elliottequineconnections.com/wp- content/themes/elliottequineconnections/homepage.php) the top of the file displays(where I have an image) but none of the php code inside the file is executed. Code that is not executed:               <?php if (have_posts() ) : while (have_posts()) : the_post(); ?>     <div class="post" id="post-<?php the_ID(); ?>">
<?php the_title(); ?>

     <?php the_content('
Read the rest of this page »
'); ?>     <?php wp_link_pages(array('before' => '
Pages','after' => '
', 'next_cr_number' => 'number'));    ?>

     <?php endwhile; endif; ?>     <?php edit_post_link('Edit this entry.','
','
'); ?>

     <?php endwhile; endif; ?>     <?php edit_post_link('Edit this entry.','
','
'); ?>      Am I linking to homepage.php in the wrong way?


how to remove description from menu buttons?

I just installed Wordpress into my server and I am currently using the "graphene" theme to test my wordpress blog. I have two pages in addition to the front page, which is "about us" and "sample page". I noticed that if I'm using a custom menu order that is created from the "menu" section under the "Appearance" options in the dashboard, the text "this is the 'about us' page." appears under the "about us" button in the navigation menu. Removing all page text from the "about us" page didn't remove the description from the menu button. Without custom menu, the navigation button looks like this : |About Us| With custom menu, the navigation button has description : |About Us   |this is the "about us" page.|


Remove post_tag from default post type, add custom taxonomy

I've been searching for a while for an answer to this, but the results I find always deal with custom post types as opposed to the built-in 'post' post type. I want to remove the default 'Post Tags' taxonomy from the built-in 'post' post type and then add my own custom taxonomy to replace it. Essentially, I have other custom post types using my custom taxonomy and I'd like to align the 'post' post type with them. I can't for the life of me figure out how to edit the default post type though, any ideas how I would do this? Thanks in advance.


how to remotely check a username / password from within a plugin

people need a user account on my site to be able to download a plugin. I want to add an activation function in the plugin so a user must supply their username and password the first time they use the plugin to make sure that they have a valid user account on my site before they can use it what is the simplest way to remotely check a username and password to see if it valid or not from within a php file? I don't want to enable xml rpc on the site.


Add a new checkbox in theme options

**I'm trying to add a new option to a theme options panel** to hide/show the comments links in the theme template files. I've got the option to show up in the panel, but there's something wrong in that it doesn't work and there are no php errors. I've noted below in **Main options code** where I've added the option as an array and where it is sanitized and validated. And **at the bottom** is the php that shows/hides the comments links according to the options setting. Is this a php logic problem? And ideas? **Main options code:**               /**     * Describe the available options     **/     $vertigo_options_template = array(     array(         'name' => __( 'Accent Color', 'vertigo' ),         'desc' => __( 'Change the accent color by entering a HEX color number. (ie: EE3322)', 'vertigo' ),         'id' => 'accent_color',         'std' => 'ee3322',         'type' => 'colorpicker'     ),          array(         'name' => __( 'Font', 'vertigo' ),         'desc' => __( 'Enable Hitchcock custom font (Note: this font only supports basic Latin uppercase letters, numerals, and some punctuation.)', 'vertigo' ),         'id' => 'vertigo_font',         'std' => ( '1' == get_option( 'lang_id' ) ) ? 'true' : 'false',         'type' => 'checkbox'     ),                 /** My new Option  **/          array(         'name' => __( 'Comments', 'vertigo' ),         'desc' => __( 'Disable comment links)', 'vertigo' ),         'id' => 'disable_comments_link',         'std' => ( '1' == get_option( 'lang_id' ) ) ? 'true' : 'false',         'type' => 'checkbox'     ),       );               /**     * Calculate default option values     *     * @return array     **/     function vertigo_get_default_options() {     global $vertigo_options_template;     $default_options = array();          foreach ( $vertigo_options_template as $option )         $default_options[$option['id']] = $option['std'];          return $default_options;     }          /**     * Create the options form     **/     function vertigo_theme_options_do_page() {     global $vertigo_options_template;          if ( ! isset( $_REQUEST['settings-updated'] ) )         $_REQUEST['settings-updated'] = false;     ?>
              <?php screen_icon(); echo "
" . get_current_theme() . ' ' . __( 'Theme Options', 'vertigo' ) . "
"; ?>              <?php if ( false !== $_REQUEST['settings-updated'] ) : ?>

<?php _e( 'Options saved.', 'vertigo' ); ?>

         <?php endif; ?>              <form method="post" action="options.php">             <?php settings_fields( 'vertigo_options' ); ?>             <?php $vertigo_options = vertigo_get_theme_options(); ?>
                  <?php foreach ( $vertigo_options_template as $option ) {                 // Use default value if no option exists                 $value = ( isset ( $vertigo_options[$option['id']] ) && !empty( $vertigo_options[$option['id']] ) ? $vertigo_options[$option['id']] : $option['std'] );             ?>
                                              <?php echo $option['name']; ?>                     	                                          <?php switch ( $option['type'] ) {                         case 'colorpicker':                     ?>                         <input type="text" name="vertigo_theme_options[<?php echo esc_attr( $option['id'] ); ?>]" id="<?php echo esc_attr( $option['id'] ); ?>" value="<?php echo esc_attr( $value ); ?>" class="color { pickerPosition:'right' }" />                     <?php break;                          case 'checkbox':                     ?>                         <input type="checkbox" name="vertigo_theme_options[<?php echo esc_attr( $option['id'] ); ?>]" id="<?php echo esc_attr( $option['id'] ); ?>" value="true" <?php echo ( 'true' == $value ) ? 'checked="checked"' : ''; ?> />                     <?php break;                              default:                             break;                     } // END switch ?>                              <label class="description" for="<?php echo esc_attr( $option['id'] ); ?>">                             <?php echo $option['desc']; ?>                             <?php if ( 'vertigo_font' == $option['id'] ) { ?>                                 <img src="<?php echo get_template_directory_uri(); ?>/inc/images/hitchcock.gif" alt="Hitchcock" id="hitchcock-sample"/>                             <?php } ?>
                  <?php } // END foreach ?>

                 <?php submit_button( __( 'Save Options', 'vertigo' ), 'primary', 'submit', false ); ?>                 <?php submit_button( __( 'Reset Options', 'vertigo' ), 'secondary', 'vertigo_theme_options[reset]', false, array( 'id' => 'reset' ) ); ?>
              </form>
          <?php     }          /**     * Sanitize and validate form input     *     * @param array options     * @return array sanitized options     **/     function vertigo_theme_options_validate( $input ) {     global $vertigo_options_template;     $defaults = vertigo_get_default_options();          // Check accent color input format     // Valid = hexadecimal 3 or 6 digits     $accent_color = preg_replace( '/[^0-9a-fA-F]/', '', $input['accent_color'] );     if ( 6 == strlen( $accent_color ) || 3 == strlen( $accent_color ) )         $input['accent_color'] = $accent_color;     else         $input['accent_color'] = $defaults['accent_color'];          // Check that Vertigo font checkbox value is either true or false     if ( ! isset( $input['vertigo_font'] ) )     $input['vertigo_font'] = ( $input['vertigo_font'] == 'true' ? 'true' : 'false' );          // My New Option: Check that Disable Comment Links checkbox value is either true or false     if ( ! isset( $input['disable_comments_link'] ) )     $input['disable_comments_link'] = ( $input['disable_comments_link'] == 'true' ? 'true' : 'false' );          // Reset to default options     if ( ! empty( $input['reset'] ) ) {         $defaults = vertigo_get_default_options();         foreach ( $input as $field => $value ) {             if ( isset( $defaults[$field] ) )                 $input[$field] = $defaults[$field];             else                 unset( $input[$field] );         }     }          return $input;     }      **And I'm using this in my template files to show/hide the comments template:**               <?php if ( 'true' == $vertigo_theme_options['disable_comments_link'] ) { ?>      <?php comments_template( '', true ); ?>     <?php } ?>      **This is what the options look like in the DB called`vertigo_theme_options`:**               a:3:{s:12:"accent_color";s:6:"EE3322";s:12:"vertigo_font";s:4:"true";s:21:"disable_comments_link";s:5:"true";}      **Edit 7/25/11: This works in template file; need to call options first:**               <?php $vertigo_theme_options = get_option( 'vertigo_theme_options' ); ?>          <?php if ( 'false' == $vertigo_theme_options['disable_comments_link'] ) { ?>      <?php comments_template( '', true ); ?>     <?php } ?>


Is there anyway to get the inputted password string from the login form?

Is there anyway to get the password string from the login form?


conditional statement expressing that current user didn't logout (is still in the same login session)?

Thank you in advance for your time. I want to perform the following conditonal `if`:               if (current user didnt log out and is in the same login session )          {     Do_something;     }      How to express it using Codex functions? I want to add it to the following `if` but in vain.               if (         is_single()          && !empty($current_user)         && $post->post_author == $current_user->ID       ) {         remove_action('wp_head', 'process_postviews');       }      Your usual help is always appreciated.


Custom Registration Template/Page

Is there a way to display the WordPress register form on a custom page the way one would use `<?php get_search_form( $echo ); ?>` for a search form? If not how would one go about creating such a template? I would like to do this without Ajax btw. Any pointers/ideas are very welcome!


Language Redirect

I'm newbie on Wordpress. I'm using WP Pro Quiz plugin and qTranslate . On WP 3.7.1 qTranslate doesn't work fine so I'd like to overwrite a page content by code i.e on page 800 there is this shortcode [wp_pro_quiz 1] and I'd like to change it on [wp_pro_quiz 18] . Is it possible? Have you got any suggestions how to do it?


Add a specific css to a widget

I have a theme with a sidebar and 3 widgets. I want to change the color of one of those widgets. The problem is that all the widgets have the same code:

Widget title

      How can I change the generated code to make it build a unique identifier for each widget, and get something like this:

Widget title


Unique key for each row in a repeater field

Is it possible to have a unique key for each sub fields in a repeater field? I don't want to use the array index, because the array index can be changed, when adding new rows between existing rows. I have checked the meta keys in the database, but the meta keys are changing too. Can anyone help me how I can solve this?


Windows Live Writer - "Create a New Page" option disabled. How to update account configuration to enable Page Capability

I'm completely stumped as to how I can update my account configuration in Windows Live Writer to enable Page Capability so I can select "Create a new page" at the menu option. That option is currently grayed out for me. I've been able to edit pages before, but I recently updated my computer and had to reinstall software so I'm not sure what could have changed in that process. My Live Writer seems to be connected properly to my WordPress blog, but I can only create or edit "posts" at this juncture. I've googled my problem and searched all over this site but there doesn't seem to be a fix for me that I can find. Please help me enable pages! Thank you!


How to remove parent section in an attachment URL in wordpress?

In wordpress, an unattached attachment URL is               http://domain.com/?attachment=$id      Once after it's attached to a parent, it goes with parent's URL structure, for example:               http://domain.com/parent-title/attachment-title      I need my attachments URL contains only root domain as the unattached ones. How to make it?


adding fields dynamically in admin panel

I'm writing a plugin, all backend is finished and I want it to add quite big sets of data, so I want to add more fields dynamically like this: ![wordpress](http://i.imgur.com/W4HN7DR.png) I got some simple adding form, but it takes long time to add and is counterintuitive for an end user. Is there some wordpress function that can do this? Or even a direction someone can point me to.


Printing out Main Category ID's in a Loop

I'm looking to print out All of the Main Categories (So Exclude Sub- Categories) in a Loop, I need to get the ID's to do some advanced category listings. So I need to echo this out:               3 CatName     4 CatName     5 CatName     x CatName      Where the number is the category # and the CatName is the name of the category


How to reload a select box of posts dynamically?

I'm using custom meta boxes for a project. I have created a custom taxonomy (select box) and I have another select box populated with Posts. I need to only load the posts based on the selection of the first select box (taxonomy). How can I do that? Thanks


Custom post type - gallery. Howto build admin side management system?

How can I build some simple system for managing galleries? I need just title and images and I want to easily change their order, add and remove pictures etc. I made this simple image which shows what I mean: http://i56.tinypic.com/25s0k8m.jpg So where to start? Where can I learn this kind of advanced WordPress theming?


Mixing Tweets with Posts

I have a client who wants their blog to display both Posts and Tweets in chronological order. These should be mixed into the same feed. I didn't find any plugins that accomplished this, although there may be one I missed which someone could recommend. I was thinking to pull the tweets and store them as a custom post type, and then just pull both post types when displaying, but Twitter's TOS does not allow the storing of the data. Only option I see is to pull the tweets on page load, and then write a custom function to merge the two chronologically, which seems like a bit of work. Also, as far a caching the tweets, how can I go about this, considering that Twitter does not allow for storage of this information? Does anyone have a recommendation on the best way to accomplish this? Also the most efficient? Thanks in advanced.


Working with wordpress plugin and theme templates structures

This is probably totally off the wall, but I want to create a new wordpress plugin, that will have its own subset of templates and pages. Whats the best way to do this? The plugin will be used on three pages of the wordpress site. It will use the same theme, though It will have three different page templates. Is it possible to group the templates together in a sub-folder inside the theme or plugin. The pages will be static ie dont need to be available to wp-admin. How it currently is..... option a -> templates in theme root, using wordpress page admin. Below is two ideas of how i'd like it to be.... option b -> sub folder in theme with static pages (No need to create/edit in wp-admin). option c -> self contained templates inside plugin folder using current theme, and custom filters/ actions with static pages (No need to create/edit in wp- admin). This plugin is essentially a section of the wordpress site grouped together that uses the wordpress objects and database. It will have its own loops and pages.               /wp-content/plugins/mycustomplugin/mycustomplugin.php     /wp-content/plugins/mycustomplugin/templates/default.php     /wp-content/plugins/mycustomplugin/templates/template2.php     /wp-content/plugins/mycustomplugin/templates/mycustomplugin-loop.php      or               /wp-content/plugins/mycustomplugin/mycustomplugin.php     /wp-content/themes/mytheme/mycustomplugin/mycustomplugin.php     /wp-content/themes/mytheme/mycustomplugin/template2.php     /wp-content/themes/mytheme/mycustomplugin/mycustomplugin-loop.php


Active Menu Highlighter with Subpages?

my question is... * * * I have 2 pages & 2 subpages in each page. like: page1 -->subpage1 -->subpage2 page2 -->subpage1 -->subpage2 & my Menu is **Page1 page2** Now if i select subpage1(from page1) means the page1 need to active and highlight the menu. if i select subpage1(from page2) means it need to highlight page2 and page2 menu in active. how to do this? please help me to get rid of this problem.i need to implement in my wordpress website.


Related "custom post type" using "custom taxonomy"

on my "Work" template used for the custom post type with the same name, I have the following code showing a list of titles for every "work". What I want to do is to display just on that list the "Works" that have the same Custom taxonomy than the current one.               <?php $loop = new WP_Query( array( 'post_type' => 'work', 'posts_per_page' => 10, 'orderby' => asc ); while ( $loop->have_posts() ) : $loop->the_post(); ?>      * Any idea?


How do you handle postmeta in admin area?

I've a bunch of techniques to add some information in admin area for users. For that I use WordPress APIs and meta boxes. Ok it's cool but what if I want to display information that are set with the post e.g I have a metabox, I want to show some preview of the settings inside post edit. I cannot do this using `global $post` and `$post->ID` which are pretty handy for `get_post_meta()`. I mean it's pretty a matter of load. At this time e.g in `post-new.php` we do not have this information because WP_Post object has not been set up yet. How do you do this? **EDIT:** to be more precise I'm trying to get post meta in admin area. For example I have a code that add a metabox and the user enter or select something. I want to retrieve that in the same area. This way the user can see if its setting is correct or not. I've nothing against AJAX but I'm one of those that consider nojs first and if possible or if that brings comfort for users js as additional layer.


how to paginate subcategories listin archive page

I am using following code to display subcategories in category page.               if (is_category()) {       $this_category = get_category($cat);       if (get_category_children($this_category->cat_ID) != "") {         echo "";         echo "<ul>";         wp_list_categories('orderby=id&show_count=0&title_li=     &use_desc_for_title=1&child_of='.$this_category->cat_ID);         echo "</ul>";       }     }      Now I want to paginate list of subcategories, for example have 5 or 10 subcategory in every page and insert next and previous buttons. Any idea for this?


A plugin for software reviews site like this one?

I want to create a software reviews site based on categories. I really like what Gizmo did (see link below) http://www.techsupportalert.com/best-free-pc-tune-up-utility.htm there is an Intro text followed by top 3 softwares (more or less) with pros/ cons/ rating fields. I tried many plugins but all of them I should pre define all my fields , In other words , If I want to put 2 programs with predefined fields , I should have only created fields for only these 2 apps but what If I want to create 3 or more apps ?? what I want exactly is a plugin which I can create with it a group of fields , when I press a (+plus) button or something In my Editor , it shows the fields , and when I press it again , it shows the same type of fields again (duplication). I hope Any one could understand me because I'm not that good in English. * * * EDIT : Finally I found what I was looking for :) Magic fields ! Although I tried it before and I did know it can duplicate single fields , but I just realized it can create groups which can be dublicated just as I want :) this plug in is even more than I wanted, Thanks every one.


How to highlight current menu bar base on the URL?

==================================     Home Contact About     ==================================      For example, The menu should looks like               ==================================     Home Contact About          -------     ==================================      when the URL is http://loaclhost/contact/XXXXXXXX, the same as other. How to do this? It seems can use `nav_menu_css_class` by add_filter, but the key is how to judgment the current menu is contact (or other)?


Upgrading problem

I am using a CentOs server that managed with Plesk panel. All domains have different users. I have 2 different installation of WordPress. One is installed from FTP and the other one is installed from Plesk. WP installed from FTP cannot be updated from admin panel of WP. The error is; > Downloading update from http://wordpress.org/wordpress-3.4.2-no-content.zip… > > Unpacking the update… > > Could not copy files. > > Installation Failed WP installed from Plesk can be updated successfully from admin panel of WP. So I check the permissions and file ownership and did the same as WP installed from Plesk. But it doesn't fix the issue. Any suggestion? PS: I know how to update from FTP. PS2: I won't disable 'define('FS_METHOD', 'direct');'.


How do I change the default wordpress navigation header that comes with my theme?

THis questions is in general and applies to all themes. I would like to change the design by creating my own custom navigation bar and then coding it into my wordpresss site. I am a complete newbie and if anyone can please provide some instructions on how to do this it would be very appreciated! This is the navigation bar I would like to change: www.jacobicoffee.com


Will multiple category descriptions effect my search engine optimization?

I plan to use the category descriptions as outputted content into my posts for site user searches within my site, but I want to know when I make the site live to search engines will that presence of multiple category descriptions (duplicates) effect my seo in a negative way, i.e. getting blacklisted. So I will used the category description value in a custom field of a post, so that users can search the custom field of a post and get results of any posts with that category description. I would just use the search everything plugin, but unfortunately it doesn't work together with the existing search fields of my particular theme. My theme's advanced search allows multiple fields searches at the same time, which I need for dual search criteria. This goes back to reason why Im outputting the category description into a custom field of my post. I need to include all post meta content to be searchable, but because my theme is limited in that area I have to use an altenative solution, by directly inputted the value into the post to that it can be searched through a custom field. Will this negatively effect my search engine rankings? If there any tips or advice on other solutions for what Im trying to achieve please let me know. Thanks a lot.


Importing Geo data into wordpress database

I have a listing wordpress site and want to integrate geo data into the Wordpress MySQL Database for custom search functionality I want to utilize different aspects to create different things... City values will become taxonomies State values will become taxonomies Zip Code values will become taxonomies Latitude - will become custom fields Longitude - will become custom fields County will be come taxonomies City Taxonomy -> City Taxonomy Terms State Taxonomy -> State Taxonomy Terms Zip Code Taxonomy -> Zip Code Taxonomy Terms Latitude -> Custom Field Value Longitude -> Custom Field Value County Taxonomy -> County Taxonomy Terms Here are a couple sample entries from the SQL files I have:               DROP TABLE IF EXISTS `cities_extended`;     CREATE TABLE `cities_extended` (     `city` varchar(50) NOT NULL,     `state_code` char(2) NOT NULL,     `zip` int(5) unsigned zerofill NOT NULL,     `latitude` double NOT NULL,     `longitude` double NOT NULL,     `county` varchar(50) NOT NULL     ) TYPE=MyISAM;          INSERT INTO `cities_extended` VALUES ('Holtsville', 'NY', '00501', '40.8152',    '-73.0455', 'Suffolk');     INSERT INTO `cities_extended` VALUES ('Holtsville', 'NY', '00544', '40.8152', '-73.0455', 'Suffolk');     INSERT INTO `cities_extended` VALUES ('Adjuntas', 'PR', '00601', '18.1788', '-66.7516', 'Adjuntas');      Is this doable with Wordpress Database? Thanks


query_post problem

I am running query_post with the following arguments,               <?php $args = array(     'category'        => $cat,     'orderby'         => 'post_date',     'order'           => 'DESC',     'post_type'       => 'blog',     'post_status'     => 'publish' );       ?> $cat = 7 in this instance, it should be returning 1 posts, but it is returning all my posts if they are in any category.


Custom taxonomy not saving correctly

I'm using a custom post type and a custom taxonomy to display a list of properties and its type in a page. It's working fine but for some reason some of my posts' taxonomies aren't getting saved correctly, for example I have 4 categories in my custom taxonomy: storage, home, apartment and other, if I check the home option and save my custom post it shows as storage in my page. I did notice though that when I update my custom post to try to select the correct taxonomy term, after the page refreshes for a split second the incorrect taxonomy is marked as checked then it changes to the "correct" one even though it's not the one getting displayed in the page. It works fine for some posts I'm just having this problem in about 4 out of 20+ custom posts. Here's how I've set up my custom post and taxonomy: http://pastebin.com/tN2q4QxV In my single page I'm using `wp_get_object_terms(get_the_ID(), 'type')` to get the terms and loop trough them. Thanks in advance


Create Terms on taxonomy by text field

I want to add terms on a my taxonomy dynamically by a text field and button sample taxonomy: place_taxonomy - island_term like: [Textfield] [submit button]


Creating a custom menu

I want to create a custom menu in the style below, can this be done? The code in brackets needs to grab the actual page content for each page.
     (page-name)
      How can I use that one small bit of code to create my menu? That code should generate buttons for 5 pages that are in the main tree in the admin.


Contact Form 7 - Show additional post content when a user enters their information

Is it possible to show a brief snippet of a post until someone submits a form using contact form 7, at which time a more detailed post is displayed automatically? Is it also possible to store a cookie for that user so that if they visit the page again they see the detailed post without having to re-enter their information?


Display product SKU on page with Jigoshop

I'm using the Jigoshop plugin (everything's going great so far!) and need to display the product SKU on a page, does anyone know how to do this? p.s I would ask on the Jigoshop forum but you have to pay for it.


How to approach displaying products with no shopping cart plugin or post type?

I want to show products like an eCommerce store with product categories and detail pages, but I have no need for a shopping cart or checkout system. This is just to display the products for informational purposes. I have used custom post types on another project and that worked out fine, but I am wondering if anyone knows of a plugin that would make this fast and easy to customize. Also an import/export feature would be nice for adding lots of products.


RSS Feed Behaviour (Inc. Feedburner)

I have a self hosted Wordpress site (latest update as of time of posting) that I am using to host a podcast that I am starting. In order to minimise any future hassles should I have to change hosting for any reason, I chose to run the feeds though Feedburner, and get people to subscribe to those also. That way, I can move and repoint if required in the future. I installed a plugin (FD Feedburner) that redirects to my feed burner URL, but I have found that this only works for http://etc.com/feed URLS. When for example Safari detects the feed, if a user clicks the RSS button in Safari rather than one of my links, it opens the Wordpress original feed via feed://etc.com/feed. - Obviously this still works, but it splits my subscribers into 2 pools that makes tracking difficult. What is considered best practice for this sort of thing, is there any way to edit the built in RSS feeds (remove comments Feed etc, stop Safari detecting the RSS feed) and remove the Atom feed option while I am at it? Many thanks, Dan


widgetlogic and permalinks

I'm trying to use widgetlogic to conditionally display menus on certain pages. Each menu uses a tag like `is_page(array("Page Name", "Page Name 2" ...))`, and works perfectly until I try to change permalinks (whereupon all the menus disappear from their respective pages). Am I doing something wrong? Is there a workaround?


Is it possible to use github:gist with Wordpress?

I have a wordpress blog i.e. bruno.wordpress.com I would like to use github:gist. I paste my code in gist and get a link like: https://gist.github.com/1323748 Is there a way to show this code in my blog? (rather than just a link to the code.)


Wordpress sites translate dynamically generated Homepages

So I'm having trouble finding a way to translate the homepage content on a few pages I manage. They can be found here:   1. KorgCanada.com (Theme is Simplecorp, and the support forum offers no help)   2. EriksonMusic.com (Theme is target, and again, absolutely no help) I'm using the **Poplarware Language Switcher** plugin which is an outdated/ no longer maintained plugin for translating pages/ posts etc. It functions by using tags like `[lang_en]` English goes here `[/lang_en][lang_fr]` French here `[/lang_fr]`. And it's working perfectly for all my pages/ posts, EXCEPT for the dynamically generated homepages of both the sites, which is made up of the "Theme options" tabs within the GUI. If I put those tags in the text areas for those, they show up as plain text, and don't actually translate anything. I was hoping somebody could help me regulate this, preferably while using the same plugin, and perhaps just making a page template of the homepage, and hard-coding the French version myself... but I'm totally uncertain about how to go about this. If you have any ideas how I can accomplish this, please lend me a hand, I'm getting very desperate.


Translate Navigation Menu & Sidebar Widget Titles

Is there any plugin to translate navigation menu & sidebar widget titles ?


Admin Top Bar Not Showing On Front End

i'm having problem with displaying admin top bar on my site. I googled and got some solution which i tried like   1) Checking wp_footer in footer.php   2) Checkbox ticked in user profile saying show toolbar will viewing site. All done but no success. please can anyone point me in right direction. I'm using Classicraft theme. I'm using wordpress 3.8.3 I have another wordpress installation on same server and can see admin bar their but not on this site. is this theme specific problem ? Thanks in advance.


Getting 404 page not found error while trying to access add new plugin / themes

I am getting 404 page not found error while trying to add new plugin or view installed plugin in my admin panel. i am using Hueman theme. every time i tried to use some option of admin panel i am getting 404 page not found error. I tried all basic trouble shooting for this issue. I would really appreciate if someone help to solve this issue. this is link on which i am getting 404 page not found error. 1) http://readaddict.com/wp-admin/plugin-install.php


Defining the output of a Wordpress Att

I have this code where I'm trying to define how those attributes (ptid, ptle, pge ) will behave once the code runs. I would like to be able define them so to get them to execute functions before outputing the result.                   // Add Shortcode     function formatage( $atts , $content = null ) {              // Attributes         extract( shortcode_atts(             array(                 'ptid' => '',                 'ptle' => '',                 ‘page’ => '',             ), $atts )         );              // Code     return X     }     add_shortcode( 'p-fmt', 'formatage' );      p.s. anybody knows any good wiki about shortcodes?


Get attachment meta (I need attachment ID, unsure how to find it)

I've got the following example code, which creates a custom field and adds to the attachment meta:               function be_attachment_field_credit( $form_fields, $post ) {         $form_fields['be-photographer-name'] = array(             'label' => 'Photographer Name',             'input' => 'text',             'value' => get_post_meta( $post->ID, 'be_photographer_name', true ),             'helps' => 'If provided, photo credit will be displayed',         );              $form_fields['be-photographer-url'] = array(             'label' => 'Photographer URL',             'input' => 'text',             'value' => get_post_meta( $post->ID, 'be_photographer_url', true ),             'helps' => 'Add Photographer URL',         );              return $form_fields;     }          add_filter( 'attachment_fields_to_edit', 'be_attachment_field_credit', 10, 2 );               function be_attachment_field_credit_save( $post, $attachment ) {         if( isset( $attachment['be-photographer-name'] ) )             update_post_meta( $post['ID'], 'be_photographer_name', $attachment['be-photographer-name'] );              if( isset( $attachment['be-photographer-url'] ) )     update_post_meta( $post['ID'], 'be_photographer_url', esc_url( $attachment['be-photographer-url'] ) );              return $post;     }          add_filter( 'attachment_fields_to_save', 'be_attachment_field_credit_save', 10, 2 );      I've tried calling `var_dump(get_post_meta($post->ID));`, but I assume that meta is somewhere else, as whatever input is not there. According to the codex, I can call: `wp_get_attachment_metadata( $attachment_id, $unfiltered );`. However, I have no idea how to get the `$attachment_id`. My eventual goal is to add this meta data to the Advanced Custom Fields Gallery plugin, which adds the attachment meta to the post meta (I believe) — but that's down the road.


$count_posts->draft & published

Currently our portfolio is stacking up a lot and want to show a few projects less instead of showing all. Still, I'd like to show an indication how many projects we did in total. Currently I have the following code and need to count the drafts & published posts.                       $count_projects = wp_count_posts( 'apps' );             $published_projects = $count_projects->publish;             $total = $published_projects + 11;      How can I count all drafts & published posts together?


Wordpress and nginx, download some pages instead of serving them

Today i setup wordpress with nginx. The problem, i cant figure out, is that some pages will be served as expected and some other will be served as download. If i download them, the content is the sama as index.php in wordpress root folder. I tried to find some differences between the "normal" pages and the other defective pages, but cant find anyone. The funny thing is, if i give that faulty pages another permalink (e.g. ../funktionen -> ../features, the pages will be served correctly. If switch back to old old permalink, the page will be served as download. Here is my nginx conf:               #redirect     #  http://www.termin2go.com and     #  http://termin2go.com     # to     # https://www.termin2go.com     server {             listen 80;             server_name termin2go.com www.termin2go.com;             rewrite ^(.*) https://www.termin2go.com$1 permanent;     }               # redirect     #   https://termin2go.com     # to     #   https://www.termin2go.com     server {             listen 443 ssl;             server_name termin2go.com;             rewrite ^(.*) https://www.termin2go.com$1 permanent;     }          server {             listen 443 ssl;             server_name www.termin2go.com;             ssl_certificate /etc/ssl/private/www.termin2go.com.crt;             ssl_certificate_key /etc/ssl/private/www.termin2go.com.key;                  access_log  /var/log/nginx/termin2go.com.log;             error_log /var/log/nginx/termin2go.com_error.log;             set $root_path '/var/www/wordpress';             root $root_path;             charset utf-8;             client_max_body_size 7M;                  # DEFAULT INDEX             index index.php;                   # configure prerender for snapshot generation             location / {                     try_files $uri $uri/ /index.php?$args @prerender;             }             location ~ /(\.|wp-config.php|liesmich.html|readme.html) {                     return 444;             }                  # REWRITES             location ~ ^/(\d+)/$ {                     return 301 /?p=$1;             }                  # fix whitespace in url bug             if ($request_uri ~ " ") { return 444; }                  # redirect google bot to prerender for ajax content (AngularJS)             location @prerender {                     proxy_set_header Host $host;                     proxy_set_header X-Real-IP $remote_addr;                     proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;                     #proxy_intercept_errors on;                          set $prerender 0;                     if ($http_user_agent ~* "googlebot|yahoo|bingbot|baiduspider|yandex|yeti|yodaobot|gigabot|ia_archiver|facebookexternalhit|twitterbot|developers\.google\.com") {                             set $prerender 1;                     }                          if ($args ~ "_escaped_fragment_|prerender=1") {                             set $prerender 1;                     }                          if ($http_user_agent ~ "Prerender") {                             set $prerender 0;                     }                          if ($prerender = 1) {                             rewrite .* /$scheme://$host$request_uri break;                             proxy_pass http://127.0.0.1:4000;                     }                          if ($prerender = 0) {                             rewrite .* /index.php break;                     }             }                          # cache static files one month             location ~* \.(css|cur|js|jpe?g|gif|htc|ico|png|html|xml|otf|ttf|eot|woff|svg)$ {                     expires 31d;                     add_header Pragma "public";                     add_header Cache-Control "public, must-revalidate, proxy-revalidate";             }           # cache static files 30 days             location ~* \.(css|cur|js|jpe?g|gif|htc|ico|png|html|xml|otf|ttf|eot|woff|svg)$ {                     expires 31d;                     add_header Pragma "public";                     add_header Cache-Control "public, must-revalidate, proxy-revalidate";             }                  # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000             #             location ~ \.php$ {                     try_files $uri =404;                          fastcgi_split_path_info ^(.+\.php)(/.+)$;                     #NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini                          include fastcgi_params;                     fastcgi_index index.php;                     fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;                     #fastcgi_intercept_errors on;                     fastcgi_pass unix:/var/run/php5-fpm.sock;             }                  # prevent nginx from serving dotfiles (.htaccess, .svn, .git, etc.)             location ~ /\. {                     deny all;                     access_log off;                     log_not_found off;             }     }


How to enable full column width in Genesis layout options

We are running Genesis Framework version 1.6 on our site and cannot figure out how to enable the full column width option. Where do you go to enable this layout option?


Trouble logging in and/or changing password

I have tried to log in to http://www.femalefightpromoter.com/wp-admin using my username afcsarah2 and the password that has been on the account since the beginning. I have not been able to log in and I have tried to reset the password. When I click on the link in my inbox it takes me to a WP page that says "Sorry that key does not appear to be valid" here is the URL it directs me to. http://femalefightpromoter.com/wp- login.php?action=lostpassword&error=invalidkey I am in desperate need of help to log into my blog and have spent countless hours on the phone with godaddy (They are hosting it) Does anyone have any suggestion?


Using color picker in plugin, does input attribute order matter?

I'm trying to use the WP color picker in a plugin admin menu and it doesn't seem to be doing anything at all. I'm following the directions here: http://make.wordpress.org/core/2012/11/30/new-color-picker-in-wp-3-5/ This is how it is setup: cbs-admin-menu.php:               add_action( 'admin_enqueue_scripts', 'mw_enqueue_color_picker' );     function mw_enqueue_color_picker( $hook_suffix ) {         // first check that $hook_suffix is appropriate for your admin page         wp_enqueue_style( 'wp-color-picker' );         wp_enqueue_script( 'my-script-handle', ECBS_JS_URL . 'my-script.js', array(     'wp-color-picker' ), false, true );     }      my-script.js:               var $j = jQuery.noConflict();     jQuery(document).ready(function($j){         $j('.my-color-field').wpColorPicker();     });      In the admin menu there is a drop down box where the user picks the name of a template they want to edit. I'm using AJAX .post() to build the edit form and dynamically update a div to display it. This is the code that builds the form fields:               return ecbs_get_label( $ecbs_style_data[ECBS_STYLE_NAME], $ecbs_style_data[ECBS_NICE_NAME] ) .         '<input type = "text" name="' . $ecbs_style_data[ECBS_STYLE_NAME] . '" ' .         'value="' . $ecbs_style_value . '" ' .         (($ecbs_style_data[ECBS_VALUE_TYPE] === 'hex') ? 'class="my-color-field"'  :          'onLoad="this.value=\'' . $ecbs_style_value . '\'" ') .         '> ';       When I look at my source, I can verify that it has the correct `class="my- color-field"` attribute. The weird thing is, the `type="text"` attribute is at the end, even though it is not formatted that way in my code. This is what the outputted HTML looks like:               Background Color<input name="background-color" value="#997766" class="my-color-field" type="text">
      Could the type attribute being at the end cause an issue with this script? I wouldn't think so, but I can't figure out what else might be wrong. When I look at the source, I can verify that my-script.js is linked and the url is correct. * * * Edited to add the code from my other .js file. Maybe something conflicting between them? cbs-edit-options.js               // This script sends the id of the selected template to the php     // function ecbs_populate_admin_template() and then sends the     // formatted response to the ecbs-edit-area div in the admin     // submenu.     var $j = jQuery.noConflict();     $j(document).ready(function() {         $j("select").change(function() {             var str = "";             $j("select option:selected").each(function() {             str = $j("select").val();             try {                 $j.post( ajaxurl, {                     data: { template : str },                     action: 'ecbs_populate_admin_template'                 }, function ( response ) {                     //alert(response);                     $j("#ecbs-edit-area").html( response );                 }                         );             }             catch (err) {                 alert(err);             }             });         })             .change();     });     $j(function() {         $j( document ).tooltip();     });      This script works fine. I did try moving the contents of my-script.js to this file and enqueueing it instead, but that did not make a difference.


How to remove parent section from attachment URL?

I have buddypress installed. All URL goes under BP's URL structure. If an attachment belongs to a document in a group, the URL is:               http://domain.com/groups/group-name/docs/doc-name/attachment-name      I would like to learn how to change the attachment URL to:               http://domain.com/?attachment_id=123      Thanks!


template_redirect action only firing if logged in

add_action('template_redirect', 'add_header_redirect', 0, 0);     function add_header_redirect(){         if( is_page(array(8, 'testimonials', 'Testimonials')) ){             $default_testimonial = get_permalink( 19 );             header("Location: $default_testimonial");         }     }      this code is in my functions.php file and ONLY works when I am logged into WP. I want all users who go to /testimonials to be redirected. what's going on?


How can I eliminate the inline styles included by default with the Genesis framewrok?

I have created a child theme in the Genesis framework. I have created all of my style rules, however, in the markup, Genesis adds a few inline rules by default that I would like to eliminate. The rules look like this:               <style type="text/css" media="screen">         html { margin-top: 28px !important; }         * html body { margin-top: 28px !important; }     </style>     <style type="text/css">         #header { background: url(http://localhost/h.jpg) no-repeat; }     </style>      These inline styles are creating my last remaining problem. I've reviewed the docs and tried to find if there are any hooks or parameters that I can alter, but have not found any. How can i get rid of them across the entire child theme? Many thanks.


Where are the images for the theme Twenty Eleven 1.2?

In Twenty Eleven 1.2, where would I find the images that appear at the top of the blog -- in what folder? I know one of the images is called 'lanterns.jpg', but I can't find it or the other ones. Here's the site: http://richardclunan.com/ Thanks,


Post date vs. event date in Wordpress

If I'm creating a WordPress site, what should I do when I have a blog that manages events to keep date events? For instance, in my own case, I'm making a travel blog where some histories have a real date (when I visit some place), but are published in a later date (when I'm at home). I'd like to show the _real_ date but if I set this real date as the post date, the post order is a chaos (I have events that are directly hidden and never showed in the home page, because the date is not among the latest 10 posts). What should I do? Is there any plugin to help with that? Or maybe I can change my theme listing the posts in a different manner, but how?


Category Archives: Show posts categorized in parent category only

When I view a category page in 2010 theme, it shown posts categorized in:   1. the category visible in url   2. child categories of 1. I want to restrict the results to 1. only. Please help.


How to Rename a Template File?

If i have pages that point to `somefilename.php` and want to change the filename to `betterfilename.php`, can I leave the template comments unchanged without manually changing all the pages?               /*     Template Name: Some File Name     */


How to I make my post title link to a custom field

I have a custom field in my posts called `post_bookmark_url` which contains a link. I want the post title that is displayed in the excerpts on my home page to link to the `post_bookmark_url` rather than the permalink of the post. (I am doing this to create a Drudge Report type of aggregator.) How can I make the "post title" in the excerpts on the home page link to a custom field?


Best Query for blog posts

I am not getting any headway in this one problem I have a separate homepage from the normal blog page. However the site needs a blog so How do I structure a query that will display something like the default wordpress behavior


How to get the get the select values created by ACF plugin in wordpress

Basically I want to display the select box so admin can select the option while creating or editing a category to display the category in front page with image or not. I use advanced custom plugin to add a select box in categories page.   I created a custom field group of display with               field label  :  Select to display       field name :   select_to_display_       field type :   Select       options :   no,yes        location rules : Taxonomy term add/edit equal to categories. As soon as I create the custom field the values are stored in db of `wp_postmeta` table as               meta_key:field key value     meta_value:a:12:{s:3:"key";s:19:"field_51d53f2ed1236";s:5:"label";s:17:"Select to display";s:4:"name";s:18:"select_to_display_";s:4:"type";s:6:"select";s:12:"instructions";s:0:"";s:8:"required";s:1:"0";s:7:"choices";a:2:{s:2:"NO";s:2:"NO";s:3:"YES";s:3:"YES";}s:13:"default_value";s:0:"";s:10:"allow_null";s:1:"0";s:8:"multiple";s:1:"0";s:17:"conditional_logic";a:3:{s:6:"status";s:1:"0";s:5:"rules";a:1:{i:0;a:3:{s:5:"field";s:19:"field_51d53f2ed1236";s:8:"operator";s:2:"==";s:5:"value";s:2:"NO";}}s:8:"allorany";s:3:"all";}s:8:"order_no";i:0;}       When I go to dashboard->post->categories I can display the select box with options but when I select any option and click on update it is updating. but when in `index.php`               echo  get_field(' select_to_display_'); //nothing is displaying here          $field = get_field_object('field_51d3f9c3f5554');          if($field['choices'] == 'false')          {             echo 'A value is  set';          } else          {              echo 'A value is not set';         }      I'm always getting value is not set. I don't know whether my selected values are saving db or not. I don't have any meta key or values like `wp_acf` in database. But once you select the dropdown as `yes` in category page it is saving even after page refresh the value is `yes`. I'm getting confused whether the value is saving to db or not.


Wordpress and plugins update

How does a plugin update and wordpress update works? And what will be the its effect if for example I modified the codes of a plugin and then after some time, I will update it with the latest update of wordpress and those plugins?


I need a Pop up with description when i click an image

i need a pop up with description of an image when i click that image. How can this be done? Is there any plugin in wordpress that can do this?


An issue with SEO Ultimate

I'm using SEO Ultimate. The 404 monitor module is reporting several 404 errors. The errors are reported for urls that do not exist; 3 of them did exist as drafts but were never published. I checked my xml sitemap, but no luck there. Additionally, the link checker is not showing any broken links. Anyone experienced with SEO Ultimate who can point me in the right direction? thanks.


how to remove +new from wp admin area

I work on a project in which I want to remove +New link in WordPress admin bar. Actuly i want to replace 'new' to 'ADD Deal'. Is there any function in WP with this we can replace this text or how can I do this.


Updating WordPress overwriting customization tweaks - strategies?

Twice now I've updated wordpress, only to realise that (facepalm) it overwrites some changes I've made to the custom template - to sidebar or something similar. Obviously I don't HAVE to update, but it's better to for add-ons etc, and I like having the latest products and bug fixes. What are other people's strategies for straightforward updates to wordpress without losing custom modifications to the default template?


In what file I should include my code if I want content to come up on top of everything?

I added a button and when you press on it new content should come up on top of everything, but if I icnlude my code into header.php it will cover only header, if I include in index.php it will cover only index, so my question is where I should include my code?


Bulk post type conversion

I have been given a client's wordpress site to update & improve. Biggest problem - I need to take about 200+ posts of a specific category, 'reviews' and convert them all into a custom post type 'reviews'. On top of this I need to move a few custom fields that have been attributed to these posts, so they remain intact once moved. I expect I'll have to write a custom script that will change the mysql direct. But before I get my hands dirty- does anyone have any experience with doing this? Any tips/ gotchas/ scripts out there I can use? Cheers