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();
Related
I installed the following plug-in to provide testimonials for my WordPress site.
https://codecanyon.net/item/testimonials-showcase-wordpress-plugin/6588139
The plug-in somehow creates a submenu „Group“ with link „edit-tags.php&taxonomy=ttshowcase_groups&post_type=ttshowcase“ which I would like to get removed as there is no need for my case to have such groups.
So I reviewed the files on the plug-in’s directory but can’t find where the menu is created. It somehow looks to me it’s there by default or similar.
So I tried adding a function to the plugins main php file using „remove_submenu_page“, but that’s just crashing the whole site.
I would appreciate some help. Thanks.
add to your functions.php
remove_menu_page( 'edit-tags.php&taxonomy=ttshowcase_groups&post_type=ttshowcase' );
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
I've been trying to create different themes in wordpress but it seems difficult to me as it requires some core functions of Php which I am unable to understand. Now I want to ask the question in details whether we can convert HTML theme to wordpress theme? I know that every theme is made in HTML but what If I make a theme in HTML/CSS or even bootstrap. How to integrate it with wordpress Posts and Pages thing? How can I tell wordpress that when a user adds a post through wordpress, it should go here or wherever? I think the question is vague but I myself is confused. Please do let me know if you understood! Thanks
You will need a combination of PHP, HTML, and CSS (at the least) to create a WordPress theme. Luckily, the PHP requried for a basic theme is pretty simple. I'd like to refer you to: https://www.siteground.com/tutorials/wordpress/wordpress_create_theme.htm . It gives a basic overview on theme development where the PHP isn't too involved.
I am very new to wordpress. But have good knowledge in php, html, css and javascript.
I want to add custom font-resizer to my wordpress site. as shown below for example.
What would be the best and non-messy way to add the plugin code to my website.
I have looked at some tutorials online but it seems that I can't getting those.
Any help would be appreciated. thank you..
If you're trying to add that plugin specifically to your site, then its documentation suggests:
adding it through a widget that the plugin creates
or using this bit of code wherever you want in whichever template file: <?php if(function_exists('fontResizer_place')) { fontResizer_place(); } ?>
Does your theme have a place for widgets in its header? If not, you'll want to just place that bit of PHP somewhere in your header.php file.
I'm trying to figure out if there is a way to remove everything to do with comments from the wordpress admin in my theme (I'm guessing there is some way to do this through the functions.php).
You should have a look at the Disable Comments plugin.