add anchor tags rel to thumbnails id

You can add ID’s to thumbnails like this. <?php $attributes = array( “class” => “main-image portfolio ” . $extraLastClass, “id” => “photo_” . $post->ID, ); the_post_thumbnail( “large”, $attributes ); ?> Notice I have append id with $post->ID.

Categories id Tags

Get page content by ID (from a plugin)

The values assigned to $user_set_value should be stored somehow in some form, usually an option. You will know how the values and where the values are stored. It is easy then from there $user_set_value = get_some_saved_option_value(); $args = array( ‘page_id’ => $user_set_value ); $q = new WP_Query( $args ); Just change get_some_saved_option_value() with the actual … Read more

main menu page redirects to user ID

One solution would be to create a page with a page template that gets all info based on the user ID. Then you can add that page to the menu. Something like this: <?php /* * Template Name: User Info */ get_header(); //Your code for getting the users id $user_id = ‘123’; //Output userinfo using … Read more

generate an auto incremented id number when a new user is registered

You can use the same method as described in the link you mentioned, but simply use the created user ID and add 1000 so you get four digits. So user_id = 5 gets the meta number of 1005. add_action( ‘user_register’, ‘my_on_user_register’ ); function my_on_user_register( $user_id ) { $unique_id = 1000 + $user_id; update_user_meta( $user_id, ‘my_unique_id’, … Read more

Subcategory IDs in relation to parent category ID switch case

Ok. This code: $cat_id_gum=””; if(($category[0]->parent)!=’0′) { $cat_id_gum=$category[0]->cat_ID; } elseif(($category[1]->parent)!=’0′) { $cat_id_gum=$category[1]->cat_ID; } elseif(($category[2]->parent)!=’0′) { $cat_id_gum=$category[2]->cat_ID; } else { $cat_id_gum=$category[3]->cat_ID; } Is not really necessary. I’ll show you what I mean in a bit. Later, however, you then set $cat_id_gum to the current post ID… $cat_id_gum = get_the_ID(); … which doesn’t make any sense and makes … Read more