Envato theme check - php

I have converted HTML to Wordpress. That's why I have created some custom widgets and it's working fine. Now I am trying to solve error using Envato theme check plugin. I have solved most of the waring but can't solve. I can't understand what is the problem of this error?

As per the themeforest guideline, registering new widgets are not allowed inside the theme. register_widget is a plugin teritory function and should be called from a plugin. I suggest you to put that the code into a plugin and make that plugin required in the TGMPA list.
You can find a guideline here

Related

Wordpress PHP add code to plugin dissapears after updating

How can we add code to a plugin so that it does not dissapear when updating the plugin? I cannot find any answer on the internet.
Actually there is no way.
Here some options:
Create your own plugin;
Don't update the original plugin (Not
recommended);
Try create your custom function on your child theme
paste.

Duplicated WordPress plugin activation issues. How to activate both plugins?

I have duplicated a WordPress plugin. Both plugins are working as I need, but the problem is that I can only activate one plugin at a time.
If one plugin is activated then the other plugin activation is not working without giving an error message. (I already have tried WP_DEBUG etc)
The plugin is a custom plugin so can't share the URL or name of the plugin.
First, you need to download the whole plugin and study the core functionality, change the plugin name to a new one, change all the variables used inside it to a new one.
Or you can check this link, there are some plugins
http://wpkicker.com/duplicate-plugins-wordpress/

jQuery not working in Moodle theme

I am using Moodle 3.1+. I am trying to develop a custom theme. In my theme jQuery is not working. I have tried by using $THEME->javascripts_footer in theme config.php file and $PAGE->requires->js() in frontpage.php. Please help
Time has past since you asked for help, so I guess you have found the answer?
For anyone else finding this post, then they will be happy to learn that Moodle 3.1 already uses jQuery. So if your theme is based on the Moodle default theme, which is Bootstrapbase, then there is nothing you need to do.
If your theme is not based on the Moodle default theme, then you need to read this Moodle Doc: jQuery
Try adding this line as a page setting on top
$PAGE->requires->jquery();

Problems with my wordpress template made with bootstrap

I have been developing a site for the prelaunching campaign of our product on kickstarter.
I had coded the site in bootstrap and then ported it to wordpress.
The thing is that I installed the wordpress prelaunchr plugin. When I try to add the shortcode [prelaunchr] and update the page, appears nothing new on it.
Any kind of hint will be much appreciated.
I have checked the plugin with other wordpress themes and there is no problem so the root of the problem is the bootstrap ported template.
(here is the site, the only thing left is the input for the email which is the thing that prelaunchr generates)
www.pysmile.com

Using a woocommerce function in your wordpress child-theme?

I am currently working on a e-commerce site using wordpress and woocommerce and the theme The Retailer.
The theme does not have breadcrumbs links and now I have decided that I want to add them. From my understanding Woocommerce should have support for this.
I will enable the breadcrumbs links on the single-product.php page. The woocommerce documentation says that I should use <?php woo_breadcrumbs(); ?> function to enable the breadcrumb links.
But when I add the <?php woo_breadcrumbs(); ?> statement to my single-product.php page I get a fatal error saying that the function is undefined. My questions is how to make my child-theme "recognise" this function?
If I use "brute force" method and copy all the original woocommerce breadcrumbs code (found in: woocommerce/templates/global/breadcrumbs.php) to my own function inside my themes functions.php the breadcrumbs are working, although I do not get the delimiters and other things that should come with them...
This is not an elegant solution. Instead there must be some way for me to "register" the woocommerce breadcrumbs function inside my theme so that I can use the standard recommended woocommerce prodcedure. How would I do this?
Thank you for your help! Kind regards, Lukas
Here is solution that would work I guess:
Copy the "shop" folder to your theme from the below destination
wp-content\plugins\woocommerce\templates
And paste it inside your theme. I hope that will do the trick.
If your theme is woo-commerce ready, there is a file "theme-woocommerce.php" in includes folder; Thats were you can do the modification; You may want to create a child theme as well, in case you want to update your theme in a future

Categories