Wordpress - Problems setting up Nivo Slider without plugin - wordpress

I'm trying to setup the Nivo Slider on my Wordpress site without a plugin and the images aren't loading. Here's a link to the page I'm working on - Test site
Can anyone see what the problem is please?
UPDATE:
I've got the exact same code running on a non wordpress site and everythings running ok so I'm wondering if wordpress is the problem.

There is a 404 not found for the images you are loading, check to make sure they actually exist where you are linking to.

I think it's because you're trying to initiate nivo using the $, which gives this error:
$ is not defined -
http://teamworksdesign.com/v2/
- Line 12
The two methods that I've used to get around this are:
Method 1: Add $j = jQuery.noConflict(); Then, in place of all $, use $j
Method 2:
Wrap your code in
jQuery(function($){
CODE GOES HERE
});

Instead of downloading the Nivo slider and manually putting it in I've used the Nivo slider light plugin instead. It's open enough to give you quite a bit of control.
It seems manually putting it in creates conflicts with wordpress.
All is working fine with the plugin.

Related

Wordpress editor showing white text

I have a problem with a Wordpress site, the editor is showing the text as white (on a white background) so unless you highlight the text, you can't see it. This is only in the admin section of the site, the front-end doesn't seem to be affected
I have found where the css is changing the text to white ( /wp-includes/css/editor.min.css ):
.js .tmce-active .wp-editor-area{color:#fff}
I have removed this and cleared the cache (even tried a different browser) but it's still showing in the editor.
Also, the 'Visual' and 'Text' buttons don't work.
Any ideas?
I have gone through an disabled each plugin, one at a time but it still is a problem.
Check your javascript console. If you see an error like:
"post.php?post=2840&action=edit:2783 Uncaught ReferenceError: tinymce is not defined"
Then the loading of wp-tinymce.php failing. Because the editor hasn't loaded, it appear as if your text is white, or "invisible" in the editor. This can be worked-around by adding:
define('CONCATENATE_SCRIPTS', false);
(Per Tijmen above, or https://wordpress.stackexchange.com/a/63172/118510)
(I use WP Fastest Cache plugin which has it's own concatenation, so if I use that plugin, then I'm OK skipping the default Wordpress concatenation.)
The root problem, however, is that a request to:
/wp-includes/js/tinymce/wp-tinymce.php?c=1&ver=4506-20170408
Is failing or receiving a 404. This could be due to a security restriction on your hosting or CDN.
Let's start with the obvious: is your Wordpress install completely up-to-date, including all plug-ins, themes etc?
It could help to actively declare the color to be black, instead of simply removing the line of CSS you removed, so:
.js .tmce-active .wp-editor-area{color:#000000}
Alternatively, this issue has been known to be caused by several plugins, such as PS Disable Autoformatting, however that instance was a few years ago. Did you recently install a plug-in? If so, try disabling that plug-in to see if that returns the editor to normal.
If none of this solves the issue, you can also try downloading Wordpress and replacing the /wp-includes/js/tinymce/ folder. Although it's unlikely, it's not impossible that something went wrong during an update or so.
If nothing else works, according to this link, you can open your wp-config.php file and add the following line at the very top after the php opening tag.
define('CONCATENATE_SCRIPTS', false);
I have just fixed this problem and thought it would be worth mentioning this basic check to others. If you are installing another theme or a second theme that installs it's own set of plugins, make sure you don't have any existing plugin composers installed or still activated. This can cause the conflict that makes the text white and the tabs to not work.
For me, I had both CMSMasters Content Composer (From previous theme) and WPBakery Visual Composer (From new theme) installed and active, which gave me this exact issue. I had also tried replacing the tinymce file and adding the extra line to wp-config, but none of these worked. Deactivating CMSMasters Content Composer fixed the white text issue for me.
Go into your account settings and check "Disable the visual editor when writing" ... Now try your page and/or post again. You should have text, not in white, and now you should be able to edit your page. Of course, you won't have a visual editor and that isn't any fun.
I think this eventually is a server problem where there are not enough resources for all the block rendering for both javascript and css. In Chrome, check the 'performance' of the page in developer tools ... it's likely less than 30.
For me, the problem was caused by the way the wordpress editor interacts with vue.js in my plugin's custom admin page.
Specifically, the white-text issue on the editor was caused by being inside of a v-if. There must be some conflict in how v-if renders the content which breaks TinyMCE if it is inside of the v-if.
The fix was as simple as switching to v-show. This causes the TinyMCE to be rendered once on page load and then just hidden as needed. Using v-show causes the editor text and toolbar rendered normally.

Images wont show up since I updated wordpress

Yesterday I updated Wordpress to the new 4.4.2 version. After the upgrade, no images will show up on my blog. Previous to the upgrade everything was working perfectly. Here's what I've done so far:
- Deactivated all plugins to see if one was the problem - didn't fix
- Cleared all cache - didn't work
- Logged out of wordpress & logged back in - didn't work
- Tried uploading a new image & adding it to the page code - didn't work
- There are no updates needed in any theme, plugin, or wordpress
Here are some things to consider:
- When I go to the page & mouse over an image, the mouse recognizes that there's an image there.
- When I go directly to the image url - I can see it fine.
- When I switch to another theme - I can see images fine.
My url is: http://www.medicalbillingstudycourse.com
The theme is: Evident
I gather it must be something in the code of the theme?
I would love some help with this one!!!
Pearl
it seems like one of your js files aremissing. the .main imgclass has opacity set to 0 which the js is probably fading in.
either find that file or change your css to opacity 1

bootstrap integration with wordpress and datatable changes whole wp-admin background as white?

I am using DataTables 1.10 and bootstrap downloaded from Datatables CDN link source.When I am integrating both with wordpress plugin, bootstrap changes the background color as white(#ffffff) for the whole wordpress admin panel and plugin page by default.Not getting why this happened ? This should not happen as i have seen in the examples.Please help me to sort this out. Thanks in advance
I believe you are probably enqueuing the CSS for whole WP admin, rather than just that specific plugin settings page. Also, if the background for body / container is changed, probably you are enqueuing some generic styles file (which sets style for body element). It's the easiest to see why this happens from Chrome's console (or Firebug or similar tool) - click "Inspect element" on the changed background, and see what CSS file does it come from.
Also you might want to check this free WordPress plugin that integrates DataTables in WordPress: http://wordpress.org/plugins/wpdatatables/

Wordpress: media library grid mode infinite loading

So this problem is very strange because for me doesn't work Wordpress media library in Wordpress admin menu only grid mode, its very strange problem because this problem occurs ONLY on 1 account/ That would be same account that yesterday i was trying upload bunch of pictures to media library and it gave error:
Try again later...
Since that i have tried many things but besides logging with other account nothing helped.
Tried reninstall wordpress via wordpress admin panel
Tried disabling all plugins, changed theme to default wordpress
Tried inspect elemet for JS errors nothing there except
upload.php?mode=grid:46 Consider using 'dppx' units, as in CSS 'dpi'
means dots-per-CSS-inch, not dots-per-physical-inch, so does not
correspond to the actual 'dpi' of a screen. In media query expression:
print, not all, (-webkit-min-device-pixel-ratio: 1.25),
(min-resolution: 120dpi)
Tried include in theme functions bunch of codes that i found on internet didn't helped.(i don't have them now since nothing helped and i didn't saved them sorry...)
Tried flushing cache, proxy, different computers, different operating systems(max,windows), tablet nothing still on that particular account media grid view doesn't work
View that 'm seeing is this:
I don't understand whats wrong, why on 1 particular account it doesn't work i even tried flushing Wordpress cache but it doesn't work after i received that error which i showed above. Did somebody know how can i solve this? Thanks in advance!
Got exactly the same problem and some ajax error on revolution slider too, and after searching for long time i resolved my problem.
It was just an HTML comment in functions.php on child theme, after remove it, everything work perfectly for me.
Same problem with space in function.php don't cut your code with space between php tag
this type problem is create by functions.php file , remove the code of you added in functions.php and than see it work proper.
standerd code write in functions.php file
In my case, there was an error in the backend. You should check your network tab in developer tools and find admin-ajax.php. Even if it returns HTTP 200, it shows an error in the response body.
From the information provided, you can work on which plugin, theme, or whatever file causes the error.
If the problem is with the user and seeing that you have tried almost all, you can try deleting the user and creating it again.
I had exactly the same error. I could not search for plugins, get the list of my uploads, everywhere where an ajax function was triggered, I needed to reload the page to see the results.
clean your functions.php and see if it works now. if yes, clean up your functions.php search for spaces or not set closing tags.
Solution was simple – I just had accidentally added a closing php tag in my functions.php (?>).
After I removed it the problem was solved.

FitVid not working for iframes only on particular WP theme install

I am using FitVid in my theme and all is well except for a specific site that was migrated from Drupal. FitVid works fine with objects and embeds but not iframes, and only on this particular site. The only difference I can find is that a random <noscript> is inserted after the iframe.
Here is an example of the non working iframe on the problematic site:
http://wp.alimomeni.net/project/animal-warmth-no-64/
And here is an example with a different database where no shows up:
http://wpfolio.notlaura.com/project/pollen-from-hazelnut/
Why is FitVid not working for iframes that particular site install? I am concerned there is an issue with the database itself as the content was pretty messy after the initial migration and I haven't been able to replicate the issue anywhere else.
Any help greatly appreciated!
P.S. I have tried other responsive video plugins and my own jQuery to wrap the iframes.
edit
Since the first "problem"'s being resolved, here's another try:
I saw that your fitVid-JS is different from mine. Maybe on purpose, but maybe it's outdated somehow. Here's what I am using in my script which works - for me:
(function($){$.fn.fitVids=function(options){var settings={customSelector:null};if(!document.getElementById("fit-vids-style")){var div=document.createElement("div"),ref=document.getElementsByTagName("base")[0]||document.getElementsByTagName("script")[0],cssStyles="­<style>.fluid-width-video-wrapper{width:100%;position:relative;padding:0;}.fluid-width-video-wrapper iframe,.fluid-width-video-wrapper object,.fluid-width-video-wrapper embed {position:absolute;top:0;left:0;width:100%;height:100%;}</style>";
div.className="fit-vids-style";div.id="fit-vids-style";div.style.display="none";div.innerHTML=cssStyles;ref.parentNode.insertBefore(div,ref)}if(options)$.extend(settings,options);return this.each(function(){var selectors=["iframe[src*='player.vimeo.com']","iframe[src*='youtube.com']","iframe[src*='youtube-nocookie.com']","iframe[src*='kickstarter.com'][src*='video.html']","object","embed"];if(settings.customSelector)selectors.push(settings.customSelector);var $allVideos=$(this).find(selectors.join(","));
$allVideos=$allVideos.not("object object");$allVideos.each(function(){var $this=$(this);if(this.tagName.toLowerCase()==="embed"&&$this.parent("object").length||$this.parent(".fluid-width-video-wrapper").length)return;var height=this.tagName.toLowerCase()==="object"||$this.attr("height")&&!isNaN(parseInt($this.attr("height"),10))?parseInt($this.attr("height"),10):$this.height(),width=!isNaN(parseInt($this.attr("width"),10))?parseInt($this.attr("width"),10):$this.width(),aspectRatio=height/width;if(!$this.attr("id")){var videoID=
"fitvid"+Math.floor(Math.random()*999999);$this.attr("id",videoID)}$this.wrap('<div class="fluid-width-video-wrapper"></div>').parent(".fluid-width-video-wrapper").css("padding-top",aspectRatio*100+"%");$this.removeAttr("height").removeAttr("width").css({'width': '', 'height': ''})})})}})(window.jQuery||window.Zepto);
Sry for minified code, I only copy & pasted it.

Resources