Show or hide lang=”ur” in main element

It looks like this attribute is hardcoded into your body tag. You could adjust it with your own body_lang() function like this (untested) : <body <?php ( function_exists( ‘body_lang’ ) ) ? body_lang() : ” ;?> <?php body_class(); ?> > where you can define the following, in your functions.php file: /** * Display the language … Read more

How to Order Posts by Custom Fields?

var_dump your $args arguments: array(4) { [“cat”]=> string(7) “2,39,30” [“orderby”]=> string(14) “meta_value_num” [“order”]=> string(4) “DESC” [“meta_key”]=> string(12) “album_rating” } The second time you use a key, you overwrite the first time. You cannot build the array like that. The orderby parameter will take a space separated string, so this is closer: $args = array( ‘cat’ … Read more

Custom field value link title

You would probably make life much easier for yourself if you stored Post IDs as your custom meta value, rather than post URLs; that said, you can try back-tracing the Post ID using url_to_postid(), then get the post object from the ID, then get the post title: // Your original code here $custom_fields = get_post_custom($post_id); … Read more

How to use page metadata while using wp_list_pages()?

You can do it easily with jQuery by using .eq() to add a specific class to each i element. Example: Add a class to your i element from PHP. <?php wp_list_pages(‘link_before=<i class=”retina_icon”></i>&link_after=<br >’); ?> Then add another class to it with jQuery. jQuery(‘.retina-icon:eq(0)’).addClass(“retina-icon-1”); jQuery(‘retina-icon:eq(1)’).addClass(“retina-icon-2”);

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