ordering and optimizing functions

If you think that you are making too many DB requests then you need to reorganize the way you store your data to be more efficient. It might even be totally irelevant if you employ the right type of caching. If your visitors are usually not logged in then a full page caching that W3TC, … Read more

How do I get thumbnails?

If your theme has support for Post Thumbnails the “Featured Image” metabox will be visible on the on the Edit Post and Edit Page screens. If it isn’t, make sure “Featured Image” is enabled in the screen options on the top right. After clicking the “Set featured image” link insert image. Once you have selected … Read more

Function not recognizing page id?

missing “else” in the 3rd elseif. <?php /* Which logo do we use? */ if (is_tree(’33’) ) { // if is conway $logoClass=”logo-conway “; $link = get_bloginfo(‘url’) . ‘/conway’; } elseif (is_tree(35) ) { // if is cullowhee $logoClass=”logo-cullowhee “; $link = get_bloginfo(‘url’) . ‘/cullowhee’; } elseif (is_tree(31) ) { // if is Johnson City … Read more

apply_filters() function

If the characters are html entities like &nbsp &lt or &#60 then use php’s default html_entity_decode() function to get the content in proper text format.

Function to get the name in database table from the comma separated string

Not tested but this should work: add_action(‘manage_pages_custom_column’, ‘display_page_custom_cols’, 10, 2); function display_page_custom_cols($col_name, $post_id) { global $wpdb; $user_group = $wpdb->get_results(“SELECT * From custom_user_group”,OBJECT_K); if (‘user_group’ == $col_name) { $pages = explode(‘,’,get_post($post_id)); $output = array(); foreach ($pages as $page ) { $output[] = $user_group[$page]->GroupName; } echo implode(‘,’,$output); } }

How to edit label_submit styling?

You can target your submit button in css like this. This will look for a input element with type=”sunmit” in container id respond. So make sure your container id is respond otherwise change it too. #respond input[type=submit] { /* your styles */ }

Function not pulling image or text from custom post type

Try this way, may help you. I just fetch from a specific post ‘s image from a specific Post Type called “gameshowwarriorsw”. $gameShowWarriorsWorld = new WP_Query( ‘post_type=gameshowwarriorsw&orderby=date&order=DESC&p=371’ ); while ($gameShowWarriorsWorld->have_posts()) : $gameShowWarriorsWorld->the_post(); $postTitle = get_the_title(); $postid = get_the_id(); $postContent = get_the_content(); ?> <li> <a href=”#” onclick=”return get_inzenwarriorhero(<?php echo $postid ; ?>);”> <?php the_post_thumbnail(array(219,143)); ?> </a> … Read more

Calling an custom field from theme option at the frontend

I’m not sure how you’ve decided to save your options but if I were to guess based on the code above, you’re saving your ‘aboutBlurb’ as an index in the website_options array which I also assume you’re saving in the actual WordPress Options – website_options[about]. To get that data maybe try this: $website_options = get_option(‘website_options’); … Read more