How to reset a custom theme

If you look into the file includes/admin/theme-admin.php you’ll see that the theme’s options are stored in ‘themezee_options’. You can either delete these options per database manager or per a plugin. If you aren’t familiar with database operations, copy the following code into a PHP file, install it as plugin and activate it once. Then deactivate … Read more

How can I use the WordPress Loop and Pagination in multiple instances but different scenarios throughout my site?

In your main loop file, check the $args. It filters the query. you can use the same query on other pages using your own options. suppose, on another page, you want to fetch the posts of a different category. your query parameters may be like: $args = array( ‘post_type’ => ‘post’, ‘cat’ => ‘DIFFERENT_CATEGORY’, ‘posts_per_page’ … Read more

Automatically Display Sub Menu

If your developing this theme with your own html mark up and css then should be fairly easy… <?php wp_nav_menu( array( ‘theme_location’ => ‘primary’, ‘menu_class’ => ‘topNav’, ‘after’ => ‘<span> </span>’ ) ); ?> You will notice this menu PHP generates a unordered list with your sub menu as a nested unordered list. See your … Read more

Using JQuery to check for Rel Attribute of Image before Overriding It

/*———————————————————————————–*/ /* Add rel=”lightbox” to image links if the lightbox is enabled */ /*———————————————————————————–*/ if ( jQuery( ‘body’ ).hasClass( ‘has-lightbox’ ) && ! jQuery( ‘body’ ).hasClass( ‘portfolio-component’ ) ) { jQuery( ‘a[href$=”.jpg”], a[href$=”.jpeg”], a[href$=”.gif”], a[href$=”.png”]’ ).each( function () { var imageTitle=””; if ( jQuery( this ).next().hasClass( ‘wp-caption-text’ ) ) { imageTitle = jQuery( this ).next().text(); … Read more

Re-skinning Site

editor-style.css is used to style TinyMCE, the rich-text-editor employed by WordPress. Look for a plain style.css file in your theme – if it has been written with Starkers as a base, it ought to have one. I don’t mean to be impolite, but if you could not figure out that you were looking at the … Read more

What are the critical theme files when building a custom theme?

http://codex.wordpress.org/Theme_Development#Template_File_Checklist The bare minimum required is your index.php file and style.CSS file. Those two files alone are technically enough to run your entire theme. It’s highly unlikely that you’ll rely on those two alone. The above link gives you an in-depth look at both the minimum and recommended requirements. For example I run one theme … Read more

how can I do something on new user registration?

You want to use the user_register hook, probably. Then use the Filesystem API to make the folder. Be aware that filesystem manipulation is dependent upon server configuration and may not always work, but using the API should ameliorate that problem as much as possible.

how can I query all wordpress users of a blog

Refer to the get_users() Codex entry. $users = get_users(); You can pass the function an array of arguments, including: $args = array( // Order by username (display name) // Note: ‘login’ is default ‘orderby’ => ‘display_name’, // Order (note: ‘ASC’ is default) ‘order’ => ‘ASC’ ); $users = get_users( $args );