Datafeedr Support Forums  

Go Back   Datafeedr Support Forums > Current Version (V3) Forum > Tips, Tricks & Tutorials
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
  #81  
Old February 8th, 2013, 05:09 PM
thk1976 thk1976 is offline
 
Join Date: May 2012
Posts: 232
Default

I have added this code

// Add store categories to nav menu
function dfr_menu_items($items, $args) {
if ($args->theme_location == 'primary') {
$cats = str_replace(array("<div>","</div>"), array("",""), datafeedr_tag('Category List?c=%ci'));
$items = $items . $cats;
}
return $items;
}
add_filter( 'wp_nav_menu_items', 'dfr_menu_items', 10, 2 );
// add_filter( 'wp_list_pages', 'dfr_menu_items', 10, 2 );
  #82  
Old February 8th, 2013, 05:12 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Quote:
Originally Posted by thk1976 View Post
I have added this code

// Add store categories to nav menu
function dfr_menu_items($items, $args) {
if ($args->theme_location == 'primary') {
$cats = str_replace(array("<div>","</div>"), array("",""), datafeedr_tag('Category List?c=%ci'));
$items = $items . $cats;
}
return $items;
}
add_filter( 'wp_nav_menu_items', 'dfr_menu_items', 10, 2 );
// add_filter( 'wp_list_pages', 'dfr_menu_items', 10, 2 );
Did you already create a Menu here WordPress Admin Area > Appearance > Menus and then set that menu as the Primary Menu?



Eric
  #83  
Old February 8th, 2013, 05:25 PM
thk1976 thk1976 is offline
 
Join Date: May 2012
Posts: 232
Default

Yes, did that as well
  #84  
Old February 8th, 2013, 05:39 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Quote:
Originally Posted by thk1976 View Post
Yes, did that as well
I'm seeing the links now. Did you get it working?
  #85  
Old February 8th, 2013, 05:51 PM
thk1976 thk1976 is offline
 
Join Date: May 2012
Posts: 232
Default

yes the categories are there, but i changed the categories in the factory, and the changes are not showing, the categories i deleted are still appearing after i updated the site.
  #86  
Old February 8th, 2013, 06:16 PM
thk1976 thk1976 is offline
 
Join Date: May 2012
Posts: 232
Default

Strangely, its only on the front page the categories show up wrong
  #87  
Old February 8th, 2013, 06:30 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi,

I'm guessing you're viewing cached versions.

Eric
  #88  
Old February 9th, 2013, 08:58 AM
thk1976 thk1976 is offline
 
Join Date: May 2012
Posts: 232
Default

DOH' of course, sorry
  #89  
Old February 11th, 2013, 04:19 PM
thk1976 thk1976 is offline
 
Join Date: May 2012
Posts: 232
Default

made a mistake on my page http://polo-shirt.dk/ how do i recover the page, tried to delete the stuff i pasted to the functions.php file, but that did not help me out

Last edited by thk1976 : February 11th, 2013 at 04:22 PM.
  #90  
Old February 11th, 2013, 05:02 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi,

It appears you've added the function twice. It should only appear in your functions.php file once. It seems that it's on line 515 and line 532.

Eric
  #91  
Old February 11th, 2013, 05:09 PM
thk1976 thk1976 is offline
 
Join Date: May 2012
Posts: 232
Default

Hi, yes i removed the datafeedr code, but the problem still withstands.
  #92  
Old February 11th, 2013, 06:36 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Quote:
Originally Posted by thk1976 View Post
Hi, yes i removed the datafeedr code, but the problem still withstands.
I'm guessing you're viewing a cached page again if you removed all of the datafeedr code from your theme's functions.php file.
  #93  
Old February 15th, 2013, 06:00 PM
thk1976 thk1976 is offline
 
Join Date: May 2012
Posts: 232
Default

Do you know how to do this in the suffusion theme, i tried to add the code to the functions.php but nothing happens
  #94  
Old February 15th, 2013, 06:48 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi,

For the suffusion theme you either need to specify "top" or "main" in your function like one of these:

PHP Code:
// Add store categories to nav menu 
function dfr_menu_items($items$args) {
    if (
$args->theme_location == 'top') { 
        
$cats str_replace(array("<div>","</div>"), array("",""), datafeedr_tag('Category List?c=%ci')); 
        
$items $items $cats
    } 
    return 
$items

add_filter'wp_nav_menu_items''dfr_menu_items'10); 
PHP Code:
// Add store categories to nav menu 
function dfr_menu_items($items$args) {
    if (
$args->theme_location == 'main') { 
        
$cats str_replace(array("<div>","</div>"), array("",""), datafeedr_tag('Category List?c=%ci')); 
        
$items $items $cats
    } 
    return 
$items

add_filter'wp_nav_menu_items''dfr_menu_items'10); 
Eric
  #95  
Old February 16th, 2013, 06:50 AM
thk1976 thk1976 is offline
 
Join Date: May 2012
Posts: 232
Default

Perfect! thanks a bunch
  #96  
Old March 2nd, 2013, 10:28 AM
thk1976 thk1976 is offline
 
Join Date: May 2012
Posts: 232
Default

Store ID: 17nkzu1o84cmqd7i
Website URL: http://www.sneakerssko.dk/
URL to page in question: http://www.sneakerssko.dk/

I have added som categories, but the wont show at the front page navigation bar, when i go to category pages they show correctly
  #97  
Old March 2nd, 2013, 10:30 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Quote:
Originally Posted by thk1976 View Post
Store ID: 17nkzu1o84cmqd7i
Website URL: http://www.sneakerssko.dk/
URL to page in question: http://www.sneakerssko.dk/

I have added som categories, but the wont show at the front page navigation bar, when i go to category pages they show correctly
Did you clear any cache that you might have?
  #98  
Old March 2nd, 2013, 10:38 AM
thk1976 thk1976 is offline
 
Join Date: May 2012
Posts: 232
Default

Yes, cleared the history and temporary files.
  #99  
Old March 2nd, 2013, 10:43 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi,

I think you still need to
Quote:
Make sure to select "Don't use layout for this view" in the View's properties menu.
Eric
  #100  
Old March 2nd, 2013, 11:05 AM
thk1976 thk1976 is offline
 
Join Date: May 2012
Posts: 232
Default

Quote:
Originally Posted by Eric View Post
Hi,

I think you still need to

Eric
Hi, done that, but the problem is still there.

mvh
Thomas
 


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


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


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