Attach File Funcion for Common people
I have not used it, but this might be what you’re looking for: Easy Comment UploadsWordpress Plugin
I have not used it, but this might be what you’re looking for: Easy Comment UploadsWordpress Plugin
The current-item CSS class generated by wp_nav_menu() is .current-menu-item. However, wp_nav_menu() also has backward-compatibility with wp_page_menu()/wp_list_pages(), and does output .current_page_item (if the current context is a page post-type, of course). So, a couple of possibilities: The current context is not a static Page You’re using a custom walker for the wp_nav_menu() output, that doesn’t output … Read more
So if I understood correctly, you’re make a site for a client, and already have a list of “books” you want to import. My suggestions : Create a custom post type for your books I think it’s the best approach, and it allows you to add any custom fields you want as meta fields. Look … Read more
You must write a small plugin for the Hook pre_get_posts; an example: add_action( ‘pre_get_posts’, ‘fb_allow_draft’ ); function fb_allow_draft( $query_obj ) { // only on admin screen use this filter if( ! is_admin() ) return; // change our query object to include any post status $query_obj->query_vars[‘post_status’] = ‘any’; } If you will specific this new loop … Read more
To translate custom page templates you must select “Synchronize page template” in WPML options. For it to actually work the page template markup must be localized or internationalized using a recognized format, for example http://codex.wordpress.org/I18n_for_WordPress_Developers, and then have an accompanying .mo/.po file . WPML also has an addon called “String Translation module” which can scan … Read more
i added this $query_vars[‘s’] = “Please Enter Keyword to search “; It’s working.this may question may useful for some other.:) anyhow thanks friends.
In general, special theme functionality (including shortcodes) should be placed in your theme’s functions.php file, which is in the root of your theme folder. If the code is less than a few dozen lines, it probably won’t be worth creating a separate file (unless you just really want to organize your code that way). So … Read more
You can use the get_term_by function. This allows you to obtain a term (from a given taxonomy) by its slug or name (or id). The returned term object contains the term’s ID. For example: $term =get_term_by( ‘name’, ‘December-12’, ‘Birthday’); $term_id = $term->term_id; If ‘December-12’ is the slug, rather than the name, of the term, simply … Read more
$args = array( ‘post_type’ => ‘product’, ‘tax_query’ => array( array( ‘taxonomy’ => ‘icomcat’, ‘field’ => ‘id’, ‘terms’ => array($prodcatid) ) ) ); $postslist = get_posts( $args );
Add a new “more field” radio button. For its value use *Show, Hide. The asterisk defaults to “Show”. PHP $value = get_post_meta($post->ID, ‘my_image’, true); if ( $value == ‘Show’ ) { echo ‘<img src=”https://wordpress.stackexchange.com/questions/49217/myimage.jpg”>’; }