GET Taxonomy ID

If you’re on a taxonomy term archive page, you can access the current ID via get_queried_object_id(): echo function xyz( get_queried_object_id(), ‘product_cat’ ); You can also access the whole term object with get_queried_object(): $this_term = get_queried_object(); echo $this_term->term_id; echo $this_term->name; echo $this_term->description; echo $this_term->taxonomy; echo $this_term->parent; echo $this_term->count;

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

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)