Using MediaElement.JS in WordPress - php

So I have what I think for most of you, is a stupid question, but I can not figure this out by myself. I'm building a WordPress theme for a friend of mine, and I need to build a custom looking audio player. I think, that MediaElementJS is a good place to start.
In my understanding, MediaElementJS is part of the core features of WordPress, and I have added it in my functions.php with the code
function my_scripts() {
wp_enqueue_script( 'wp-mediaelement' );
}
add_action( 'wp_enqueue_scripts', 'my_scripts' );
But still, the normal browser player is showing in all the browsers. I have read a lot of topics here on StackOverflow and over the internet, but I just can't figure out where it goes wrong. Since it's part of the WordPress core I don't need to install the plugin that is also available right? Also I tried installing it, but it then also shows it as the basic browser player.
Is their someone here, that can teach me how I implement MediaElementJS properly in my theme? I think I can figure out the styling part out, but the installing of the MEJS, I don't know where to begin nor look for good instructions that are really going to help. It seems inpossible to find a good tutorial on this :(
I really hope someone can help me out with this.
Thanks in advance!
(since I'm working locally I don't have my site running somewhere, if
needed, I can host it somewhere!)

Related

Social Sharing Buttons Not Working in custom WordPress theme

I have of late been developing a custom WordPress theme for my own blog from the ground up! Most is not finished but my social sharing buttons are not working at all!
I have been using this tutorial....
http://www.jqueryscript.net/social-media/jQuery-Plugin-To-Customize-Social-Share-Buttons-Counters-SocialShare.html
and gone over all of my code with a fine tooth comb! I even tested it on a testing page and it's working fine there so i have no idea why it's not working on the actual theme!
I got a feeling it has something to do with my functions.php page as none of my widgets work in my sidebar which i have overcome by adding the custom code there! So i probably have to add some more code to my functions!
Also just to let you know eack of the buttons and their counters are contained within a div I made just below the_content and above the comments_template on my single.php
I am also running WordPress Version 3.9.1 if that helps
Any help would be greatly appreciated!
Phillip Dews
Without any examples, fiddles or code samples, it is impossible to assist. Having had a fair bit of experience with WP, this will be very difficult to help you with, unless you can provide a live site to look at. Even then, may be challengin' :)
Looking at that page you linked, your problem is almost certainly php-based, not jQuery. If your functions don't work and you're adding php code directly to your sidebars, then yeah, absolutely php.
A couple of things I can think of though that are commonly problematic:
Check/test/debug your functions.php file by itself. Make SURE it's rock solid.
If you're developing heavily, setup XDEBUG. Invaluable!
If you're mostly themeing, check out the debugbar plugin.
Of course, you'll always want to make sure you're using the template hierarchy correctly (http://wphierarchy.com/). Double check every path you use, specifically the differences between paths to load stuff from themes -vs- child themes:
http://codex.wordpress.org/Child_Themes
http://codex.wordpress.org/Function_Reference/get_template_directory_uri
http://codex.wordpress.org/Function_Reference/get_stylesheet_directory_uri).
Oh yeah: functions.php in child themes loads in addition to the parent's functions.php, it does not replace it.
Hopefully something in here helps.

How to make a blog type page with prev & next page functionality?

I was wondering if I needed to learn javascript and or php to make a site that can move content from page to page as new content is added (like a blog). I was thinking of using wordpress and wipe the design and write my own css, but seems you need to do a $30 update to have access to css.
Is there a free site (like wordpress) that could help me out with the php part or whatever is needed to have this kind of functionality? How many hours would it take to learn php to get the 'blog' running correctly if I only know html/css right now, with a bit of javascript and can manage jquery plugins.
Thanks alot for any answers.
If I recall correctly, WordPress is entirely free and fully customization per your liking - no charge.
PHP would be your answer to do this, and Javascript would only help compliment the transitioning. If you've never tinkered with PHP or any other software programming language, you will spend months perfecting this. It's a whole other ball game.
But like I said, WordPress is entirely free and modifying the CSS is as well. I've never heard of a $30 charge to change WordPress CSS file.
You're talking about upgrading a WordPress.com site where they host it for you and strictly control what you can do.
You want to go to WordPress.org - it's free and you can do whatever you like - but you do need to sort out your own hosting.

Beginning to use wordpress, custom theme?

I'm pretty new to wordpress (only a couple of days), but I have it up and running on my website with the default theme. First of all I would like to change this theme. I have found a tutorial directly from wordpress but it is extremely vague: http://codex.wordpress.org/Theme_Development. I'd like to have a totally different layout for my website though, with only one page being replaced daily with a different article - a new article everyday basically. But I don't know where to start. I want to first create the theme though, I think that will put things in to perspective. How do I do so? I know the principles of php and enough about html and css to create whole websites. Thank you
That link should tell you everything you need to know. You basically just edit the theme files to get the layout that you want. The best way to learn truly is to experiment. If you have a specific question I could help you with that, but to tell everything involved in creating a custom theme would go way beyond the scope of an answer for this site.

How to add custom fields for users (like Company:) in Joomla 1.5?

I've been searching on the internet for some kind of tutorial to do this and I've only found this one that seems to do the work ( http://tech.nabtron.com/add-custom-field-for-user-data-joomla-1-0-tested/97/ ) but the problem is that this tutorial is focused in Joomla 1.0 and I'm using Joomla 1.5.. the files are not in the same place and some classes are very different...
It will be great if you could point me to a web page where somebody explains how to do this..
Or if you are a Joomla expert help me with this please... I have some knowledge about php and mysql but I'm not familiar with the Joomla workflow.
Any kind of help will be much appreciated.
Thanks everybody!
Have a Look at this Extension if you dont like to hard code it
http://extensions.joomla.org/extensions/news-production/content-construction/5583
And here is the hard coding tutorial
http://groups.google.com/group/joomlagrandrapids/browse_thread/thread/10d2610576fadab5
Ok.. I've found my solution in this page and a little bit of imagination.
It was pretty easy.. I thought it was more complicated.
http://jwarlock.com/tutorials/joomla-tutorials/9-adding-fields-to-joomla-registration-page.html
If you are in the same position as me and you don't understand the tutorial, please don't hesitate to contact me.
Cheers, Luis.
Your best bet is Joomla Meta http://joomlacode.org/gf/project/usermeta/
It uses the same functionality (well similar to how it will be implemented in J1.6) and doesn't require any core hacks
It's been used on this site http://www.theabroadgroup.com/propertyabroad/index.php?option=com_user&view=register&Itemid=71

PHP wordpress style related posts

Do you know how wordpress decides which related posts to show?I mean I know if it has tags, then it's easy but if it doesn't?
Best Regards,
Generally the 'related post' function of a Wordpress Blog is created by the owner of the blog, or using a plugin. I can imagine that those plugins either look for new posts with similar tags or in the same category as the post it is displaying.
As far as my knowledge extends, I do not believe that Wordpress has a show_related_posts function, although I may be wrong. If it does, it would be simple enough to look it up on the documentation at wordpress.org.
Also, another good part about OpenSource programming is that you can simply go in and look at any of the code that you are curious about. I personally use Notepad++, and when I find a function in Wordpress or any other CMS I am not famillar with, I simply copy and paste the function name, and do a Multi-File search on the function to figure out where it is declared.
I'm going to have to go with Chacha102, as far as I know this can only be done using plugins or by hacking the code yourself.
I did something similar by falling back on the post's category if it had no tags, works pretty well too.
This guy has the leading plugin for related posts. I'd download that and take a peek at his code and see how he does it. Then you can reverse engineer it and make it your own. The beauty of opensource.
http://wordpress.org/extend/plugins/wordpress-23-related-posts-plugin/

Categories