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 October 9th, 2012, 07:55 AM
tloenders tloenders is offline
 
Join Date: Jun 2012
Posts: 52
Default Remove datafeedr css from <head>

Hi,

Datafeedr adds a css link to the head tag, which we don't need.
I can't seem to find a setting preventing Datafeedr from loading its own css?

Thanks!
  #2  
Old October 9th, 2012, 12:53 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi,

No, it currently cannot be disabled. The only workaround is to edit the plugin code. It goes like this:

1. Go to the plugin editor and select "datafeedr" (http://YOURSITE/wp-admin/plugin-editor.php?file=datafeedr/datafeedr.php)

2. Locate this line:
PHP Code:
function wp_frontend_action_wp_head() { 
3. Change it to:
PHP Code:
function __wp_frontend_action_wp_head() { 
This should remove all references to store.css from your blog.

Eric
  #3  
Old October 10th, 2012, 03:41 AM
tloenders tloenders is offline
 
Join Date: Jun 2012
Posts: 52
Default

That's what I was afraid of

Removing the function as you suggested also seems to remove the meta tags coming from datafeedr, right?

I just commented out the css outputting part:

if(dfr("app")->has_shop()) {
// Uncomment these lines to load the Datafeedr css in the header:
// $css = $this->app->url('css');
// echo "<link rel='stylesheet' href='$css' type='text/css' />\n";
}

Thanks Eric, fixed.
  #4  
Old October 10th, 2012, 04:55 AM
tloenders tloenders is offline
 
Join Date: Jun 2012
Posts: 52
Default

On a side-note, for the more technically inclined:

For another workaround without editing the plugin code, you could add the following code to the theme's functions.php file:


Code:
add_action( 'init', 'datafeedr_wp_head_remove_action' );

function datafeedr_wp_head_remove_action() {
	remove_action( 'wp_head', array( $GLOBALS['DFR_PLUGIN'], 'wp_frontend_action_wp_head' ), 10 );	
}
This would however also leave you without the meta description/keywords tags.

Last edited by tloenders : October 10th, 2012 at 04:56 AM.
  #5  
Old October 10th, 2012, 08:59 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi,

You're right. Your post #3 is probably best.

Eric
  #6  
Old February 7th, 2013, 09:26 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi,

It's now possible to disable the Datafeedr style.css file from being served on all pages of your site or just non-Datafeedr pages of your site.

This can be configured here: WordPress Admin Area > Tools > Datafeedr > Debug > Store CSS

Eric
 


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
Setting up "view head" elements jordand1 Questions 3 September 25th, 2011 01:15 PM


All times are GMT -5. The time now is 04:36 PM.


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