wordpress

Single query for selecting a random images from X unique parents?

I've used this query to randomly select a total of $limit-images (attachments), each from a unique and randomly selected parent. $query="SELECT {$wpdb->posts}.post_parent, {$wpdb->posts}.ID FROM {$wpdb->posts} INNER JOIN {$wpdb->term_relationships} ON ({$wpdb->posts}.post_pare...

Use Wordpress' Excerpt with a "more" link?

Wordpress' documentation suggests adding the following to functions.php to enable what I want to do: function new_excerpt_more($post) { return '<a href="'. get_permalink($post->ID) . '">' . 'Read the Rest...' . '</a>'; } add_filter('excerpt_more', 'new_excerpt_more'); As per: http://codex.wordpress.org/Function_Reference/the_excer...

Getting comment count to work on new Wordpress 3.0 theme loop setup

Anyone get this to work at all? In the new theme, comments are populated using wp_list_comments( array( 'callback' => 'theme_comment' ) ); and I have no idea where this is looping, so I don't know where to start counting a new variable. I can alter the layout of the comments in functions.php, but it's just a function and apparently word...

How do I print a certain wordpress category anywhere I want on any page?

Can someone tell me what the PHP would look like in order to get a category from Wordpress and then print it where ever I want? I'm guessing I have to build a PHP function. Something like: function get_a_category() { $category = get_the_category(); <-----( not sure how to ge ta specific category ) echo $category; } I have no idea ...

Custom rewrite rules in Wordpress

Hi, I'm in trouble with the internal wordpress rewrite rules. I've read this thread but I still can't get any results: http://stackoverflow.com/questions/2210826/need-help-with-wp-rewrite-in-a-wordpress-plugin I explain my situation: 1) I have a page_template called 'myplugin_template.php' associated to a wordpress page called "mypage"...

security precautions to take when running multiple sub-sites on the same main site

I have shared hosting, and within my own user space I run three different .com domains. One serves as the actual hosting plan master domain, and the other are subs via URL redirects and domain pointing. One of those subs is a Wordpress blog, and I'm concerned about the ability of an attacker to use security holes in Wordpress to access ...

What type of documentation does WordPress code follow?

I am trying to begin using some sort of standard for documenting my PHP code. Most of my code is in the form of WordPress plugins, some are getting quite complex, and I need to document it. So my question is simple, what system does WordPress use to document their code? ...

WordPress Mystique theme is not getting displayed with IE and Lower Versions of FF and Chrome

Hi, I have installed Wordpress and activated Mystique theme.I simply love the design and functionality provided by the Mystique team. But the problem is when I try to view my site with IE or any of the little older versions of Firefox or Chrome the page is not getting displayed properly.My Site URL is : http://blog.subhendu.info/index....

Wordpress plugin for jquery slider

I want to make a wordpress plug in of a jquery slider. Does anyone know any tutorial about this? ...

Wordpress / PHP - Cache custom queries ?

Hi So I'm making a plugin that gets a set of posts (using wp_query), and it does this every time you refresh a page. Can I cache the query results so the page gets generated faster? If so, how do I do it? because WP_cache functions don't work even if I enable cache in the config file. A alternative to wp_cache seem to be transients. ...

[Wordpress] Permalinks that filter both categories and taxonomies

Is it possible to show posts filtered by both taxonomies and categories? I.e. I have two categories: “News” and “Reviews” I have a custom taxonomy called ‘actor’. Can I show all the posts filled in the “News” category and “Tom Hanks” actor? Or all the news related to “Russel Crowe”? Or all the reviews related to “Tom Cruise”? Actually ...

How can I show some links/navigation to logged in users in wordpress?

Hello everyone, I need help with wordpress. I will show a login box on my main page and if some registered user logs in, I want to show some links/navigation to that person only (not to guests). Is that possible? If yes then how? Please guide me with. Thanks ...

Replace default marker on google geoxml map overlays?

I am pulling georss data from feeds and overlaying them onto my map with Google Maps Geoxml. How do I replace the default markers that appear on these map overlays? Currently they are default blue pins but I would like to remove and replace it with something more appropriate for my theme. I am working on a map for a Wordpress childtheme...

Lightbox in Wordpress

Hi, I want to have lightbox gallery in my Wordpress site.. How do i do that, because with simple examples it doedn't work. Thanks ...

WordPress Theme Hack - How Do I Call Specific Child Pages Only

I'm going to try my best to explain this correctly :) This question is regarding a Wordpress Theme Hack and php. Currently we are using Coda Blue as a theme see here. Right now the jQuery slider is being controlled by li's that are the tabs of the slider (web design, social media, etc). The tabs are created by making a page, and the ...

wordpress plugin help

I am trying to create a wordpress plugin admin menu. The problem I am running into is with the menus. I am trying to add a page in the admin without actually adding the menu link. So for example I want to have a menu called test then I want to have some extra pages but I dont want physical links to them because they are only going to be ...

Creating WP Plug in

Hello there, I'm up to study about creating WP Plug in and so I read this page - http://codex.wordpress.org/Creating_Options_Pages I try the example given in that page which is the below code : <?php // create custom plugin settings menu add_action('admin_menu', 'baw_create_menu'); function baw_create_menu() { //create new top-...

Get a value in a wordpress form

This is a sample input form from wordpress standard coding (I get it from this page - http://codex.wordpress.org/Creating_Options_Pages) <input type="text" name="new_option_name" value="<?php echo get_option('new_option_name'); ?>" /> When people insert the data in the form, the value will store in the function <?php echo get_option...

Manage a simple private area with Wordpress

I'd like to have ideas on how to manage a simple private members area with wordpress. I have to access this area with a simple login form on the homepage. This will be a one user authentication (one username/pass for all the users). In this private area the user can download some pdf and misc files uploaded in some way using wordpress. ...

how to find Page id inwordpress

i need to get page ID in wordpress throught php? ...