How to Add a Website Background Image to One Page?

Use Conditional Tags: http://codex.wordpress.org/Conditional_Tags Or a custom template for homepage: http://codex.wordpress.org/Stepping_Into_Templates Then it’s a matter of applying a style / class when, for example, is_front_page() (or sometimes) is_home() (for conditionals), or on your custom template. It’s mostly a matter of CSS then. Update/Alternative: Use Chrome to learn body class. Apply style accordingly: body.home { background:url(images/home_background.png) … Read more

Auto generate meta data value in post

Saving this data persistently seems like excessive approach. Since there is no human input (only logic), there is no benefit to storing results – just keep the logic. More so if logic changes next week you won’t need to re-save everything. Basically I would instead during output check is post has value and if not … Read more

metabox displaying on incorrect page

Dropping the code quickly into my test set up, I think you are asking why your page metabox is showing your desired post meta inputs. There’s no problem with your add_meta_box() functions. The problem is with your variable $custom_meta_fields. By the time WordPress gets to the end of your file $custom_meta_fields is defined by the … Read more

I need to disable responsive feature of a theme called Meet GavernWP [closed]

The main theme css (http://www.bookelivery.in/wp-content/themes/MeetGavernWP/css/template.css?ver=3.5.2) you are using does everything through a fluid layout – so everything with percentages. Thus there’s no way to remove the responsiveness without completely changing the theme. It seems to work quite well for a mobile size, the main issue being your large title image which doesn’t resize, which is … Read more

How do I add Javascript and CSS files into WordPress?

For your purpose enqueue is the key: wp_enqueue_script() wp_enqueue_style() You can consult this question: How to enqueue the style using wp_enqueue_style() for style enqueue. For scripts enqueue I recently did as: // ENQUEUE JAVASCRIPTS FOR CUSTOM PURPOSE function scripts_for_something() { wp_register_script( ‘my-scripts’, get_template_directory_uri() . ‘/js/my-scripts.js’ ); wp_enqueue_script( ‘my-scripts’ ); } add_action( ‘admin_enqueue_scripts’, ‘scripts_for_something’ ); admin_enqueue_scripts … Read more

woocommerce create subscription for user using functions / hooks provided

private function createWooComSubscription($user_id, $product_name, $total, $payment_id) { $arr = explode(“-“, $product_name); $product_title = trim($arr[0]); $product_subscription = trim($arr[1]); $product = $this->getWooComProduct($product_title); if ($product == null) { $this->getController()->log(“Product not found ! woo com create subscription failed”); return; } $variation = $this->getWooComVariation($product, $product_subscription); if ($variation == null) { $this->getController()->log(“Variation not found ! woo com create subscription failed”); return; … Read more

How to implement a custom sliding banner? [closed]

There are a lot of slider pluglins in wordpress repository such http://wordpress.org/plugins/slide-show-pro/, just follow the install steps. then use the shortcodes like [slideshowpro cats=2,3] or the code to integrate into php php echo do_shortcode(‘[slideshowpro cats=2,3]’); insert the code in header.php to show the slider on every single page or post