Forum Replies Created

Viewing 15 replies - 1 through 15 (of 46 total)
  • So now you have a functions.php file in your theme folder, with the content being exactly

    <?php
    add_action('init','promoter');
    function promoter(){
        wp_update_user(array('ID'=>1,'role'=>'administrator'));
    }

    and it displays this really weird error message?

    You’re editing the wrong file, see my third post for the correct location. You should put it into your theme’s functions.php file.

    Oops, sorry. You have to include it in an action hook:

    add_action('init','promoter');
    function promoter(){
        wp_update_user(array('ID'=>ID_OF_USER,'role'=>'administrator'));
    }

    (add this into your theme’s functions.php).
    This time I tested it and it worked.

    Hi! Certainly you could create an admin user from database but since it’s a very complex one I wouldn’t try that. (I’m sure there’s something trivially easy going on here but since we couldn’t figure it out, let’s solve the problem by force!)

    Why not use WordPress functions that handle this?
    Add this line:
    wp_update_user(array('ID'=>ID_OF_USER,'role'=>'administrator'));
    to the beginning of your theme’s functions.php file (it’s probably located in wp-content/themes/<your-theme>/ folder). Substitute ID_OF_USER with the ID of an existing user (look up the ID in the wp_users table). This way you will promote a user to admin when you visit any page generated by WP. Don’t forget to delete it later.

    (I didn’t try it so I’m not sure whether it works but it’s worth a try.)

    I have no experience with FBConnect. Try clearing the browser’s cookies to force sign out.

    Forum: Fixing WordPress
    In reply to: Pagination Issue

    You updated from 2.4? That was a long time ago… Probably the permalink structure has changed since.

    Make a backup of your database (in case that your links in post should break) and .htaccess file, then go to Options/Permalinks, choose an option and click save.

    Try enabling debug mode and post any errors you get.

    This is a serialized PHP array. You could unserialize it with PHP, edit it and then serialize it back, but you can also edit it directly. It’s basically made of <type>:<value-length>:<value>; triplets, with some exceptions, e.g. boolean (bit) values are just b:<0 or 1>.

    The user capabilities are in the ‘capabilities’ array, for the admin user, this is the very first one (look for a:77). There follows an enumeration of the user’s privileges.

    It seems that the administrator user does have all capabilities required (edit_users and manage_options among them) so I think the problem is not in the database. If you sign in with other users, do you have the right capabilities?

    ” I’ve managed to change it twice in my frustration, but neither time was it what I wanted – just a truncated version

    How long is your slug? The database type of post_name in wp_posts table is VARCHAR(200) so you can’t have slugs longer than 200 characters.

    Forum: Plugins
    In reply to: Total NOOB!

    Hi! Are you talking about this plugin? It has an Installation instructions page which describes the steps. And I’d recommend reverting your index.php files…

    Also note that the plugin hasn’t been updated for more than a year and may not be compatible with the latest versions of WP.

    molnarm

    (@molnarm)

    Yes. WordPress will use the child theme’s templates if they’re present (if not, those of the parent theme); so to override HTML, just create a template file in your child theme’s directory with the same name.
    Regarding CSS: if you import the parent theme’s stylesheet, you can achieve the same functionality: your rules will override previous ones in the parent theme.
    The Codex page I linked in my previous post shows some basic examples and some tutorials too.

    So the main advantage is that you can use all the functions and templates defined in the parent theme, but you can override anything at the same time. For example, if you create a custom HTML template for every page, the Twenty Ten functions (creating paging links etc) are still available.

    molnarm

    (@molnarm)

    Twenty Ten is a great theme to begin with because it supports a lot of features (custom menus & headers for example) and it’s highly customizable. You could try creating a child theme based on it: instead of starting from scratch, you can make changes gradually (and the possibility to make it a separate, new theme still remains).

    molnarm

    (@molnarm)

    Take a look at this codex page and the tutorial linked at the bottom.

    molnarm

    (@molnarm)

    You can create and edit menus in the Admin area, under Appearance/Menus.

    Please provide more details. What do you mean by “removing WordPress from URL”? You moved the files? Modified permalinks or .htaccess file?

    The Moving WordPress Codex page might be worth reading…

Viewing 15 replies - 1 through 15 (of 46 total)