Showing posts with label cms. Show all posts
Showing posts with label cms. Show all posts

Wordpress Shopping cart Installation

How to Use WP Shopping Cart


Wordpress Shopping cart
Wordpress Shopping cart


Add the shopping cart to your theme.


Copy wp-shopping-cart.php to your theme directory. Call the shopping cart in your functions.php file: Normal PHP shopping car

require_once('wp-shopping-cart.php');

Configure your settings.

In the wp-shopping-cart.php file, replace these variables with your information:
$paypal_account - Your PayPal email address
$cart_icon - An icon for your shopping cart link, if you have one
$url_store - The URL of your store
$url_cart - The URL of your shopping cart
$url_update - The meta info/URL when the cart is updated
$url_success - The meta info/URL when the checkout is successful
Shipping variables - Based on shopping cart subtotal value

 Create product pages.

Create pages for your products, and use the [add_to_cart] shortcode to create links.

Shortcode variables:
product="PRODUCT NAME"
price="X.XX"
options="TITLE=OPTION 1|OPTION 2|OPTION 3" (Not required. Limit 1 set of options.)
sold="SOLD OUT MESSAGE"

Example:
[add_to_cart product="T-Shirt" price="20" options="Size=Small|Med|Large"]

Create a shopping cart page.

Create a shopping cart page, and use the [checkout_cart] shortcode to embed a cart.


 Add a link to the cart.

Add a link to the cart anywhere on your site using the [checkout_cart_link] shortcode or <?php echo checkout_cart_link(); ?>.

Another Method

WP Shopping Cart Installation


  • Unzip and Upload the folder “wordpress-paypal-shopping-cart” to the “/wp-content/plugins/” directory.
  • Activate this Plugin
  • Go to settings and configure the options your peyment method paypal email,shopping cart and return url etc
  • Use the shortcode to add a product a post or page where you want it to appear

WP Shopping Cart

To add the ‘Add to Cart’ button simply insert the following shortcode to a post or page next to the product description:

[wp_cart_button name="PRODUCT-NAME" price="PRODUCT-PRICE"]

Replace PRODUCT-NAME and PRODUCT-PRICE with the actual name and price.

Here is an example usage of the shortcode:

[wp_cart_button name="Test Product" price="19.95"]
To add the shopping cart to a post or page, insert the following shortcode to a post or page.

[show_wp_shopping_cart]
Using Button and Cart Form a template File

To Add 'Add Cart Button' from template.php file use this code:
<?php echo print_wp_cart_button_for_product('PRODUCT-NAME', PRODUCT-PRICE); ?>
<?php echo print_wp_cart_button_for_product('wordpress', 7.50); ?>
To add the shopping cart to the sidebar, simply use the widget from the widgets menu or add the following line to your sidebar template file where you want the shopping cart to appear

<?php echo print_wp_shopping_cart() ?>

WordPress Creating a Static Front Page

WordPress Creating a Static Front Page

         Wordpress shows your recent post in order on the front page of your site.  Front page Customize  on the your site. WordPress user want a static page as the front page instead.  This static page look is common for users desiring static page on the front page of the site. Login Page Custom WordPress

creating a static front page

 static front page



Blog posts on static front page


That worked great. Just for anyone finding this post, what I have accomplished is pulling in blog post content into a 'static' page template so that I have static content and blog content on the same page. Here is the code I used with both loops, the first being the blog content loop and the second being the standard page template loop for static content: Display Random Post 

<?php $my_query = "showposts=3"; $my_query = new WP_Query($my_query); ?>
<?php if ($my_query->have_posts()) : while ($my_query->have_posts()) : $my_query->the_post(); ?>

 <!-- standard tags to display blog post information like the_title() here -->

<?php endwhile; // end of one post ?>
<?php endif; //end of loop ?>

<?php if (have_posts()) : while (have_posts()) : the_post(); ?>

 <!-- standard tags to display the static page information like the_title() here -->

<?php endwhile; endif; ?>

Only show sidebar on home page

edit your sidebar.php file, found in the theme files in the /wp-content/themes/{theme-name} folder

put this as the first line:

<?php if ( is_front_page() ) { ?>
and this as the last line:
<?php } ?>
That will cause the sidebar contents to only display on your home page.

<?php }
else {
 ?>


Wordpress Schema Updated tricks

Schema when we used to optimize keyword lots of anchored backlinks, make high keyword density etc.

SEO Already discussed just remembered  SEO means(Search Engin Optimization) serving better user experience. We have to make our blog semantic so anything to everything can understand it easily.

Followed wordpress schema updated tricks is Plugin for wp seo structured data schema
schema


This plugin install and activated and this  dashboard bottom side seo schema click see screenshot just fill this form and see your site schema updated.

How to Create a Page that Displays Random Post Wordpress

randompost


How to Create a Page that Displays Random Post WordPress

First Create a child theme and activate or create a  page this have you ever been to a site and saw this Look nice.  They have a link top navigation  bar to something like stumbe!  or Read Random Articles, or some other creative text.  When you click on that link, it take you to page that display one random article or image category some else.  Each time you refresh, you are delivered with a new post. this page  fatel error is click solve it.

Article Create Custom Page template and simple paste this code:

   <?php
query_posts(array('orderby' => 'rand', 'showposts' => 1));
if (have_posts()) :
while (have_posts()) : the_post(); ?>
<h1><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h1>
<?php the_content(); ?>
<?php endwhile;
endif; ?>


Display Relative Date:

 Have you  Ever seen this post  and comments and wondered how did the blogger  manage to do this?
Actually it is pretty very easy.

download plugin wp-relative date

once you have downloaded and activated this plugin, look in your single.php page and your site index page (index.php) and page.php for this code:


<?php   the_date();  ?>


Replace it with:

<?php  relative_post_the_date(); ?>