I'm new in WordPress
I misunderstand one thing about the theme use in WordPress
For example, I wanna create the as same website as this I purchased this template.
But when I installed the theme in WordPress it shows me the default Index.php file with little info, used my purchased theme
And when I purchased the theme there exist all src files of the above website.
How I can use my purchased src files of website that will work all function for ex: logins with db?
Thanks in advance!!!!
After you purchased the theme, you probably have just installed the theme and haven't created any pages or tweaked any settings. So if you want to get the same look as that of the preview website, you probably have to check whether the developer has provided any dummy data for importing.
Most of the themes listed in ThemeForest would have the option to import dummy data, so that customers would be able to install some pre-made posts, pages, config, etc. This might be there inside the custom settings page(as a single button to download the content) of the theme, or maybe they have provided it in separate XML files for you to import. If the files you have downloaded doesn't have it, make sure you downloaded All files & documentation. Here's a sample screenshot:
My guess is that you might have only downloaded using the Installable WordPress file only option.
If you are still unable to get the dummy data, probably you have to ping the support of that theme asking them to provide the dummy data.
I am implementing multiple pages on a website. I am using FTP with Notepad++ to edit pages and I am using WordPress. I have multiple pages show on the Wordpress/Version Press,which I can edit through WordPress. But I cannot find those pages on NotePad++. I can only find multiple index.php, index.html pages. Those pages work fine, but I cannot find other pages like an about.php, login.php page etc.
Do I need to manually add those pages to NotePad++ or do I need to change the setting between WordPress and NotePad++?
WordPress (like most CMSs) stores page content in the mySQL database, not as PHP/HTML/etc. Therefore you cannot modify page content via FTP. If you need to code things that the CMS will not allow, you have two options:
1- Install a snippet or code editor plugin. These save your script in a Basecode format so that WordPress doesn't try to mess with it. This is the recommended method for minor issues such as injecting a few lines of PHP into a page.
2- Create a custom Plugin. These can be modified via FTP because they are saved as files in your plugins folder, not in your database. These are best if you have a specific application you need to write for your site.
3- Create a Child Theme. This is similar to custom plugins, but it is better if you need to change theme functionality on a global scope. Recommended making major alterations to your theme's header/footer/etc.
I am working for a client right now that is wanting me to author a wordpress plugin for them, and on top of that they want me to integrate it into their template as a feature. However since the url of the location of the plugin could change I want to be able to call the loaded plugin from the template, however I am not finding any good way to do so. I have read over WordPress Codex and not found a function that suits what I need, or I simply don't understand what they are doing. I am not familiar with how WordPress loads and uses plugins. Thanks!
Here's the WP overview on plugins.
In short, plugins are managed by the WP install and once activated automatically load when the pages are called. Plugin files are stored in: wp-content/plugins/ and are stored within each individual WP installation. As long as your client doesn't mess with the wp-content directory structure, your plugin should load if activated in the WP admin console (and it's functional/doesn't break). This is the only way to run plugins through WP as of now (though I don't see this changing).
Wordpress has a built in function to find the path to your plugin, similar to this:
$pluginpath = plugin_dir_url(your_plugin.php);
I believe that is what you are asking, no? Or are you referring to sending a function from the plugin to the template? In that case, you have to use an action hook. Here is the reference: Link
I have installed a Wordpress theme in /wp-content/themes/mytheme/
I then applied this theme to a specific site. I am using Wordpress multi-site.
I want users who have access to the site to also be able to edit the theme from Wordpress.
Is this possible? How?
By default, only the super-admin has the ability to edit theme files in the WordPress multisite environment. In order to circumvent this default behavior, you will need to build and install a simple plugin and modify a WordPress core file. Instructions for doing so can be found here. Posts by jroakes and jrue contain the code you need to make the modifications. Keep in mind that updating WordPress could break the modification. Also be aware of the security risks involved.
I'm in the process of learning php and creating themes.
Unfortunately, while I was editing a theme that i was currently using in drupal, I made a mistake in the theme such that nothing shows up anymore, even if i were to hit drupal/index.php. I want to change my broken drupal theme to a working one but i'm unable to do so because I can't even view the administration section.
The How To reset your theme via the database page on Drupal.org has instructions for changing your theme directly from the SQL prompt.
It's not immediately clear whether this will work in the most recent version of Drupal, so back up your database before attempting this.
The easiest way to change your frontend theme is to set it in your sites/default/settings.php:
$conf['theme_default'] = 'minelli';
In terms of sorting your current problem, here's a simple way to do it that should work... Let's say your current theme is called "custom_theme".
Go to your theme directory ("sites/default/themes" probably)
Backup your development theme (i.e. move it elsewhere, if you're using Linux command line do something like "mv custom_theme custom_theme.bak")
Copy the garland theme to here and name it the same as your broken theme (if using LInux command line, something like this should work "cp -a ../../../themes/garland ./custom_theme"
Try viewing your site now. It should now use garland instead of your broken theme.
As others have said before, it's also highly recommended that you use a different theme for admins as you do for normal users (in case you break stuff). Select a safe admin theme (like garland) and then you can nearly always get to the admin interface if you're playing with theming.
Or if you are using Drupal 6, removing/moving the broken theme folder will make Drupal change the theme to the default theme (Garland).
Maybe using two themes in parallel will help.
Set one for the "user frontend" - the one you are developing at /admin/build/themes, another one standard, like garland, which you are NOT going to change, as a "administration backend": /admin/settings/admin.
If you happen to break the theme you're developing, you just go to the admin area (/admin), it will switch back to garland.
you can also insert a new login form in your theme by including this code:
`<?php
if(!user_is_logged_in() ){
print drupal_render(drupal_get_form('user_login'));
}else{
print "You are already logged in!";
}?>`
anywhere in the page.tpl.php file of your broken theme, then register with your admin credentials ;)
Please also see the following stack over flow issue.
it is related to them
Changing Drupal's theme and keeping Garland as the admin theme?
Changing the Admin Theme in Drupal 6 Directly in Database
Now here is solution :
Remove the files of the bad theme and clear the cache. After clearing the cache you will be able to login again.
The main difficulty is that you have to clear the cache without being logged in.
Try one of the methods for clearing the cache described in
Clearing Drupal's cache
IF Not then Try this one :
If you have drush, the command to type would be
drush vset theme_default garland
Either on the commandline, or via an administration interface (eg PHPMyAdmin) enter the following query
UPDATE system SET status=1 WHERE name = 'garland';
Then either:
UPDATE variable SET value='s:7:"garland"' WHERE name = 'theme_default';
TRUNCATE cache;
TRUNCATE cache_bootstrap;
TRUNCATE cache_block;
Note that 's:7' refers to the length of the following string. Modify as needed. This is database surgery, tricky stuff.
OR
If you are using per-user themes, and you've just messed it up for yourself as admin, try
UPDATE users SET theme='garland' WHERE uid = '1';
Be careful, as getting either of those lines wrong can mess things up just as badly.
Cheers!
Mudassar Ali
As far as I know, theme settings are stored in the database, as well for each individual user. The quickest way to get rid of a theme is probably removing it from the theme path.
Just move it onto your desktop and Drupal should be able to detect that your requested theme is missing and point you to the default instead.
Update: Tried this on my Drupal 5 installation, it turned out 'clean'. I suggest copying a working Drupal theme into your theme directory (make a copy first).
It's worth mentioning that if you're using the "Sections" module to apply different themes to different parts of the site, the instructions given on the Drupal site won't necessarily work — you may find that moving the problem theme directory out of the way is the only method of seeing the admin interface properly.