Adding page Title in a custom coded page

function my_doc_title($title, $separator){ if(is_author()) // <- replace this with your custom page; maybe is_page_template(‘myprofile.php’) ? $title = get_the_author_meta(‘display_name’, get_query_var(‘author’)).$separator.get_bloginfo(‘name’); return $title; } add_filter(‘wp_title’, ‘my_doc_title’, 10, 2); (functions.php)

Document.body.scrollTop in WordPress

It would seem that something in WordPress causes a virtual revert to a standards that require cross-browser compatibility, making the same code not work inside and outside WordPress. However, with some code to handle browser-differences (and still avoiding using libraries), the following is what viewport.js looks like now: function height() { if( typeof( window.innerWidth ) … Read more

Single page template

Yes, even for custom page templates, you will need to have a loop in order to get the title and content. Try the following: <?php /* Template Name: Use Case Template */ ?> <?php get_header(); ?> <div class=”wrap”> <?php if(have_posts()): while(have_posts()): the_post; ?> <div class=”leftcol”> <h3 class=”usehd”> <?php the_title(); ?> </h3> <div class=”hd-div”> </div> <div … Read more

Setting variables as custom field values

Sure. Hook into the save_post action, then perform your custom queries upon save, and store them as custom fields of the post. add_action(‘save_post’, ‘my_extra_meta_saver’); function my_extra_meta_saver($post_id) { global $post; // Prepare whatever extra information you want here // Save each piece of info in a custom field update_post_meta($post_id, ‘meta_key’, ‘meta_value’); }

Using str_replace on wp-admin

I haven’t tested this code, but I think it will work for you. I just put add_filter after the function and chose preg_replace: <?php /** * wpse_replace_version_message */ function wpse_replace_version_message( $html ) { $html = preg_replace( ‘<span id=\’wp-version-message\’>You are using <span class=”b”>WordPress 3.4-alpha-19904</span>’, ”, $html ); return $html; } add_filter( ‘admin_print_scripts-index.php’, ‘wpse_replace_version_message’ ); ?>

Custom table or form

How I would do it: Create a public accessible form in a page. Look at the code of front end submission plugins to get an idea. Create a custom post type shipping. Create a custom user role customer with very limited capabilities (read_shipping, edit_user_profile). After form submission create a new shipping entry, register the user … Read more

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