Datafeedr Support Forums  

Go Back   Datafeedr Support Forums > Current Version (V3) Forum > Questions
Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Important - The support forums are now in "read-only" mode as we transition to an alternative help desk solution. Feel free to contact us here with any of your questions or search the forums for an existing solution.
 
 
Thread Tools Search this Thread Display Modes
  #1  
Old April 29th, 2013, 06:37 AM
youngy youngy is offline
 
Join Date: Jun 2011
Posts: 494
Default Using pagination with Categorty SHortcode

HI Eric,
Can you please advise what im doing wrong here:

http://golfing-warehouse.com/woods/

The category products display fine, but if you click on the pagination i get a 404.

Do I need to tweak the url settings in the factory of something?

Also incase you need to know I have set my permalinks to:

/%category%/%postname%/

Cheers Mate

Dave
  #2  
Old April 29th, 2013, 07:49 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi Dave,

That's an embedded view. Pagination doesn't work on embedded views.

Here's your store's category page where pagination does work: http://golfing-warehouse.com/store/category/mens/

Eric
  #3  
Old April 29th, 2013, 08:02 AM
youngy youngy is offline
 
Join Date: Jun 2011
Posts: 494
Default

Hi Eric,
HHmm right ok.

SO how can I make this work then? If i cant have the pagination work via the shortcode, what other options do I have?

You can see how im trying to put a product list their on a category page which I will bulk up with unique content around the list itself. Ideally blocking the list no follow etc, so it doesnt go against me for duplicate content.

Is there anyway at all I can display all the products on my list on that page? -

http://golfing-warehouse.com/mens/woods
  #4  
Old April 29th, 2013, 08:05 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi,

Pagination on embedded views doesn't work. There's no fix for that.

Your only option if you want to show all products in an embedded view is to display all products on 1 page. However this is not ideal as you have over 500 products in the "Mens" category.

Eric
  #5  
Old April 29th, 2013, 08:12 AM
youngy youngy is offline
 
Join Date: Jun 2011
Posts: 494
Default

Hi Eric,
Ok im stuck. Ive set up all these categories in the factory with the aim of using shortcode to display each category set.

Now seeing as I cant use pagination via shortcode, does this therefore mean I cannot paginate at all then with the method I want?

I have to be able to paginate somehow in this way as this is the best possible way to seo each page.
  #6  
Old April 29th, 2013, 08:14 AM
youngy youngy is offline
 
Join Date: Jun 2011
Posts: 494
Default

Hows about where it says :

Pages: 1 2 3 4 5 6 7 8 9 next pagelast page

As page 1 displays correctly on the category page, is there anything I can change on teh views so if someone clicks page 2, 3 4 etc itll go to the "store/"? taking them to the correct page for the rest of the products?
  #7  
Old April 29th, 2013, 08:34 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi,

Why not remove pagination from those views (the view that you are embedding) and just add a link at the bottom of the view that says "View more..." or "View next 18 products". That link will take the user to the store category page.

You can create a link to Page 2 of the specified category page like this:

Code:
<a href="<?php echo dfr('url')->query_to_url('page=2&view=category&c='.$category->id); ?>">View more</a>
I would suggest creating a new custom view. Name it something like embedcats.

Add a Product list module to the view.

Add the Product List template code to the view. So you might have something like this:

HTML Code:
<a href="<?php echo dfr('url')->query_to_url('page=2&view=category&c='.$category->id); ?>">View more</a><br />

<!-- Product List -->
<div class="pl">
  [product.each]
  <div class="t1 col3">
  <div class="bdr">
    <h2><a href="[product.link]" title="[product.name]">[product.name]</a></h2>
    <div class="thmb"><a href="[product.link]" title="[product.name]">[product.thumbnail tag='1']</a></div>
    <div class="prc">[product.currency mode="sign"][product.price]</div>
    <p class="desc">[product.description]</p>
    <div class="btns">
    <a href="[product.link]" title="View details of [product.name]" class="dfbutton dforange dfmedium dfrounded">Details</a>
    </div>
    <div class="clearingdiv"> </div>
  </div>
  </div>
  [/product.each]
  <div class="clearingdiv"> </div>
</div>
<!-- /Product List -->

<a href="<?php echo dfr('url')->query_to_url('page=2&view=category&c='.$category->id); ?>">View more</a>
Then on your pages in your blog, you would embed like this:

Code:
[DFR:embedcats?c=605386]
Eric
  #8  
Old April 29th, 2013, 09:29 AM
youngy youngy is offline
 
Join Date: Jun 2011
Posts: 494
Default

HI Eric,
That sgreat I think this might sort it out.

Omk ive been paying with it, ive doen something silly here and basic.

Its all set up the way I want it however I cant seem to get the product list as it should look on the category page between the 2 x "view more".

I need to add the product list code to my embed shortcode here right? It dont seem to be working..what am I doing wrong?

http://golfing-warehouse.com/mens/woods/
  #9  
Old April 29th, 2013, 09:39 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi,

Oh yeah, forgot to mention about that.

1. Go here: The Factory > Your Store > VIEWS > CUSTOM VIEWS > embedcat > View menu > View Properties.

2. In the CSS ID field, add the word: view

3. Save and click the [Update Settings Only] button.

Eric
  #10  
Old April 29th, 2013, 09:50 AM
youngy youngy is offline
 
Join Date: Jun 2011
Posts: 494
Default

Fantastic Eric! We've cracked it! Im happy with that!

One thing though mate, I want to "no follow" all links to the store, including view more, product images etc - every single link.

Is there a easy way to do this either factory or website side where it blocks the search engine from indexing these pages?

Im guessing doing this will stop any triplicate issues, so the only pages that will get indexed are the ones on wordpress right?
  #11  
Old April 29th, 2013, 09:54 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi,

If you want all pages in your store to not be indexed, do this: /show...0368#post40368

Eric
  #12  
Old April 29th, 2013, 10:03 AM
youngy youngy is offline
 
Join Date: Jun 2011
Posts: 494
Default

Great Thanks Eric,
I have now done this.

Couple of quick questions please:

How can I test this has worked.

Also im no programmer I accept that, but in the line of code:

<?php if (is_dfr()) : ?><meta name="robots" content="noindex,nofollow" /><?php endif; ?>


WHats it actually saying, id expect /store to be there somwhere?
  #13  
Old April 29th, 2013, 10:09 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi,

It's currently not working.

In your header.php file, find this tag: </head>

Then add the code above to right above the </head> tag like this:

HTML Code:
<?php if (is_dfr()) : ?><meta name="robots" content="noindex,nofollow" /><?php endif; ?>

</head>
Eric
  #14  
Old April 29th, 2013, 10:12 AM
youngy youngy is offline
 
Join Date: Jun 2011
Posts: 494
Default

Hi Eric,
Ok thats exactly what i did. Maybe I didnt save it, does it work for you now?
  #15  
Old April 29th, 2013, 10:14 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi,

No it's not working and it's still appearing in the wrong place in your shortcode. Make sure you remove the first line of code you pasted in there.

Also, if you are using a caching plugin, be sure to clear the cache.

Eric
  #16  
Old April 29th, 2013, 10:21 AM
youngy youngy is offline
 
Join Date: Jun 2011
Posts: 494
Default

OK mate I think ive got it.

You know theres 2 /head tags on the header.php?? Its a bit confusing.
  #17  
Old April 29th, 2013, 10:31 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

It's still not working. Can you PM me login details for your blog?
  #18  
Old April 29th, 2013, 10:42 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi,

You were putting the code into a commented out area. For example, you had your code like this (all of the orange code is commented out):
PHP Code:
<?php
/**
 * The Header for our theme.
 *
 * Displays all of the <head> section and everything up till <div id="main">
 *
 * @package WordPress
 * @subpackage Twenty_Eleven
 * @since Twenty Eleven 1.0
 */
?><!DOCTYPE html>
<!--[if IE 6]>
<html id="ie6" <?php language_attributes(); ?>>
<![endif]-->
<!--[if IE 7]>
<html id="ie7" <?php language_attributes(); ?>>
<![endif]-->
<!--[if IE 8]>
<html id="ie8" <?php language_attributes(); ?>>
<![endif]-->
<!--[if !(IE 6) | !(IE 7) | !(IE 8)  ]><!-->
<html <?php language_attributes(); ?>>
<!--<![endif]-->
<head>
<meta charset="<?php bloginfo'charset' ); ?>" />
<meta name="viewport" content="width=device-width" />
<title><?php
    
/*
     * Print the <title> tag based on what is being viewed.
     */
    
global $page$paged;

    
wp_title'|'true'right' );

    
// Add the blog name.
    
bloginfo'name' );

    
// Add the blog description for the home/front page.
    
$site_description get_bloginfo'description''display' );
    if ( 
$site_description && ( is_home() || is_front_page() ) )
        echo 
" | $site_description";

    
// Add a page number if necessary:
    
if ( $paged >= || $page >= )
        echo 
' | ' sprintf__'Page %s''twentyeleven' ), max$paged$page ) );

    
?></title>
<link rel="profile" href="http://gmpg.org/xfn/11" />
<link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo'stylesheet_url' ); ?>" />
<link rel="pingback" href="<?php bloginfo'pingback_url' ); ?>" />
<!--[if lt IE 9]>
<script src="<?php echo get_template_directory_uri(); ?>/js/html5.js" type="text/javascript"></script>
<![endif]-->
<?php
    
/* We add some JavaScript to pages with the comment form
     * to support sites with threaded comments (when in use).
     */
    
if ( is_singular() && get_option'thread_comments' ) )
        
wp_enqueue_script'comment-reply' );

    
/* Always have wp_head() just before the closing 

<?php if (is_dfr()) : ?><meta name="robots" content="noindex,nofollow" /><?php endif; ?>

</head>
     * tag of your theme, or you will break many plugins, which
     * generally use this hook to add elements to <head> such
     * as styles, scripts, and meta tags.
     */
    
wp_head();
?>

</head>
This is the code you needed:
PHP Code:
<?php
/**
 * The Header for our theme.
 *
 * Displays all of the <head> section and everything up till <div id="main">
 *
 * @package WordPress
 * @subpackage Twenty_Eleven
 * @since Twenty Eleven 1.0
 */
?><!DOCTYPE html>
<!--[if IE 6]>
<html id="ie6" <?php language_attributes(); ?>>
<![endif]-->
<!--[if IE 7]>
<html id="ie7" <?php language_attributes(); ?>>
<![endif]-->
<!--[if IE 8]>
<html id="ie8" <?php language_attributes(); ?>>
<![endif]-->
<!--[if !(IE 6) | !(IE 7) | !(IE 8)  ]><!-->
<html <?php language_attributes(); ?>>
<!--<![endif]-->
<head>
<meta charset="<?php bloginfo'charset' ); ?>" />
<meta name="viewport" content="width=device-width" />
<title><?php
    
/*
     * Print the <title> tag based on what is being viewed.
     */
    
global $page$paged;

    
wp_title'|'true'right' );

    
// Add the blog name.
    
bloginfo'name' );

    
// Add the blog description for the home/front page.
    
$site_description get_bloginfo'description''display' );
    if ( 
$site_description && ( is_home() || is_front_page() ) )
        echo 
" | $site_description";

    
// Add a page number if necessary:
    
if ( $paged >= || $page >= )
        echo 
' | ' sprintf__'Page %s''twentyeleven' ), max$paged$page ) );

    
?></title>
<link rel="profile" href="http://gmpg.org/xfn/11" />
<link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo'stylesheet_url' ); ?>" />
<link rel="pingback" href="<?php bloginfo'pingback_url' ); ?>" />
<!--[if lt IE 9]>
<script src="<?php echo get_template_directory_uri(); ?>/js/html5.js" type="text/javascript"></script>
<![endif]-->
<?php
    
/* We add some JavaScript to pages with the comment form
     * to support sites with threaded comments (when in use).
     */
    
if ( is_singular() && get_option'thread_comments' ) )
        
wp_enqueue_script'comment-reply' );

    
/* Always have wp_head() just before the closing 



</head>
     * tag of your theme, or you will break many plugins, which
     * generally use this hook to add elements to <head> such
     * as styles, scripts, and meta tags.
     */

    
wp_head();
?>

<?php if (is_dfr()) : ?><meta name="robots" content="noindex,nofollow" /><?php endif; ?>

</head>
Eric
  #19  
Old April 29th, 2013, 10:45 AM
youngy youngy is offline
 
Join Date: Jun 2011
Posts: 494
Default

ha! Damn I knew i was doing something really stupid!!

OK mate so its all working now, no store pages will get indexed, just my blog pages?

If so great! Im good to go!
  #20  
Old April 29th, 2013, 10:47 AM
youngy youngy is offline
 
Join Date: Jun 2011
Posts: 494
Default

One last question mate:

You know how my usres start off on my "blog" then they can click here and they get sent over to the "store".

Is it possible that the widgets, side bars can change once they go over to store? This way they can use the store more effectively?
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
DFR Shortcode Dennis Questions 1 August 4th, 2012 09:00 AM
Category Parent Name Shortcode dhilditch Questions 2 May 16th, 2012 11:53 AM
Empedded Shortcode not appearing bkozlowski Questions 2 May 5th, 2012 11:26 AM
Assign PHP Variable to ShortCode lesljr Questions 4 March 19th, 2012 08:16 PM
Pagination with [DFR] Shortcode reimust Problems 1 November 20th, 2011 10:34 AM


All times are GMT -5. The time now is 01:17 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.