question stringlengths 0 34.8k | answer stringlengths 0 28.3k | title stringlengths 7 150 | forum_tag stringclasses 12
values |
|---|---|---|---|
I have a plugin that expects there to be a default "uncategorized" category with ID=1. I've inadvertantly deleted the uncategorized category. Is it possible to recreate the category as ID=1? When I look at a default WP install, I see that the table "wp_terms" has uncategorized as the first record with id 1. It also app... | You need 3 steps: 1.Creating a term in wp_terms with ID is 1 2.Insert a term_taxanomy into wp_term_taxonomy with term_id is 1, and taxonomy must be category 3.Insert a term_relationships into wp_term_relationships with object_id is 1 and term_taxonomy_id is 1 Run below code in PHPMYADMIN to re-create this category! <co... | Default category got deleted. How to get it back as ID=1? | wordpress |
I am looking for SQL code that I can run from phpmyadmin to remove all registered users on the blog that do not have any post associated with them. | <code> <?php /** * Plugin Name: Delete Non Authors */ function delete_non_authors() { global $wpdb; $non_authors = $wpdb->get_col( "SELECT DISTINCT $wpdb->users.ID FROM $wpdb->users LEFT JOIN $wpdb->posts ON $wpdb->users.ID = $wpdb->posts.post_author WHERE $wpdb->posts.ID IS NULL" ); foreach ($n... | Code to remove authors with no posts connected to them | wordpress |
Symptoms: Can't view ANY previous Posts, but the correct totals are listed by class - published, draft.... When creating a new post - no save or publish button Unable to administer ANY plug-ins - error message: You do not have sufficient permissions to access this page What Has Changed? Upgraded from 3.0.2 to 3.0.1 or ... | I had some problems upgrading to 3.0.3 on a multi-site installation. I had used the automatic upgrade and it failed, but luckily, downloading and extracting the new files from WP.org and uploading them directly fixed it. I would try that first. If that doesn't work, try re-uploading your backup files. You did make a ba... | Upgrade Nightmare - No Posts, Permissions Issues and Can't Create a new post | wordpress |
Is there anyway to disable custom dragging and sorting of the posting fields in admin? From time to time, the fields gets dis-ordered, and I have to sort them back to the way I want it, witch is kinda annoying. I want this also because I'm going to have other editors on the site, and I want a standardized order for eve... | I can answer the last part: "I also want the excerpt-field to be above the content-field. Is all this possible?" The only way to move anything above the content field is via JavaScript--there are no php hooks or filters up there. It's kind of a lame workaround because you can usually see (visually) the jump as the fiel... | Default, locked sorting of posting fields | wordpress |
I need to publish a audio file that I want to make available to listen and not to download any idea how to do it? Is there any free WP plugin for that? Something where user cannot save the audo using any webbrowser plugin like DownloadHelper etc. | Have you looked at either Audio Player or XSPF ? I've had good success with both of those. | audio streaming plugin but with no save option? | wordpress |
Here is my form: <code> <form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform" class="validate"> <?php if($user_ID) : ?> <?php else : ?> <div class="label_container"> <div class="left"> <label for="author" class="label label_name"&g... | First of all, I highly recommend using the <code> comment_form() </code> function. It's all of the above code in one line (more if you need to tweak parts of the code). You can designate name and email as required in the settings section of your admin area: | How do I make wordpress comment fields required? | wordpress |
Is there an app for the Windows Phone (7) that allows submission to WordPress? Having used the WordPress app on the Blackberry, I'm looking for one that is similar to that, but for the WP7. I've had a look and not found anything, though there are rumours (potentially unsubstantiated) that one is being created.. | Official page: http://windowsphone.wordpress.org/ Was kinda hard to find, I basically guessed URL in few tries in analogy to android.wordpress.org :) | WordPress on WP7 | wordpress |
Is there some plugin or some way to integarate any of the following : Cubepoints Achievements with either of the following : Favorite (default in bp) Vote it Up Emo Votes | I'm the author of the Achievements for BuddyPress plugin, and it's lucky I saw your question. I don't often read this site. I can't talk for Cubepoints, but with Achievements, it is easy to extend support to other plugins. For developer documentation, see http://achievementsapp.com/developer/add-support-for-a-plugin-no... | Integration of Cubepoints/Achievements | wordpress |
Is there any way to get wordpress to check for, download private theme updates? I found this plugin for private plugin updates.... http://w-shadow.com/blog/2010/09/02/automatic-updates-for-any-plugin/ I'm looking for the same thing but for themes. | It's quite possible. I've been doing this for years with my Version Checker plugin. I do not distribute it openly, but in essence it checks a private version API , and then tosses the extra results into the update_core, update_plugins and update_themes site transients. WP then takes it seamlessly from there courtesy of... | Automatic Updates For Private And Commercial Themes? | wordpress |
How can I find out in which sidebar was a widget dropped? From inside that widget. More precisely from the <code> form() </code> function. Can I automatically remove the widget if it's not added in the appropriate sidebar? | See this thread: stackexchange-url ("Limit widget to certain sidebar?") | Get the sidebar ID in which the current widget was dropped | wordpress |
I'd like to have the home page have a menu title of "Home" and a different page title "What we can do for you". How to do this without going into code. Is there any plug in to do this? | You don't need a plugin if you're using the built in menus - in Appearance -> Menus, click on a menu item and you can change it's navigation label. The label is what shows in the menus. | How to have "Page Title" different than "Menu Title" in wordpress 3.0.3? | wordpress |
How can I get the number (count) of, let's say, text widgets from a sidebar? for eg. if I drop 4 text widgets in the sidebar, I want to get this number somehow from another widget | Call wp_get_sidebars_widgets(), and loop through each sidebar. Off the top of my head, text widgets have an ID like widget_text-$i. | Count widgets of a certain type | wordpress |
i started a new blog and i see that there are two pages it starts out with: Home About i want to add a third one but instead of having it load up an internal page, i want to have this go to an external link. is this possible ? | Admin Dashboard -> Appearance -> Menus If the theme is WP 3.0 ready, you will have an option to add a custom link (ie external link) on the left side, and you can drag and drop it into the order you want. Justin Tadlock wrote an awesome post about 3.0 menus - http://justintadlock.com/archives/2010/06/01/goodbye-headach... | how can i add a menu link that goes to an external page | wordpress |
I'm attempting to dynamically create a text widget, add it to a named sidebar widget that my theme has already created ($sidebar_id = 'home-header-widget'), then populate the text widget with some preset content. I'm getting an error as indicated above at line 35 (commented below). Any ideas what I'm doing wrong? <code... | This part triggers it: <code> = ["widget_text-$id"] </code> Copy paste gone wrong or something? Square brackets used this way make no sense to PHP. | Plugin could not be activated because it triggered a fatal error, unexpected '[' | wordpress |
I like to have a clean blog, and I also like that comments that are replies to other comments actually are replies to other comments. Some people don't mind that difference too much and just leave another comment instead of a reply. That's alright, but I'd like to fix it so that my blog stays clean and so that things a... | first, if you're not already using it, you need wordpress threaded comment . you can stylize it with css of course. after that, if someone comments the post, and you think it was supposed to be a reply to some other comment, you can do it with move wordpress comments or just do it manualy... | Is it possible to move a comment that should be a reply to another comment? | wordpress |
On the right rail here: http://www.julianamaeberger.com/soma/sample-testimonial-3/ I am showing a random post "Testimonial". Below that I am showing all featured images for the category "Testimonial" so that you can flip through the images and choose where you want to go next. I want to highlight the image that is rela... | How you want to highlight this image is specific to your layout, but it probably involves setting a class to the <code> <li> </code> surrounding it? You can do this by comparing the ID of the post you have displayed with the ID of the post of which you are showing the thumbnail. In your first loop you save the ID... | How to show a featured image as current? | wordpress |
I'd like to have my header banner change every day, chosen (e.g. randomly) from a list/folder of images. So far I only found plugins that select a random banner per post or per page view, neither is what I want. Do you know of a plugin, or any other way? Edit: Example. I'm adding a folder to my wordpress installation. ... | <code> <div id="header"> <?php mt_srand((int)date('z')); $headers=glob(PATH_TO_FILES .'/*.jpg'); $header=mt_rand(0,count($headers)-1 ); ?> <img id="header-image" `src="<?php echo URL_TO_FILES . '/'.basename($headers[$header]); ?>" alt="header" /> </div> </code> replace your current header ... | How to rotate the header image per day? | wordpress |
I am looking for a wordpress plugin that allows my users to customize which posts are appearing on the home page. The users should have a settings page where they can select which categories and tags they´d like to see posts from. Do you know if anything like that has been developed? Free or premium. | I am looking for a wordpress plugin that allows my users to customize which posts are appearing on the home page. Not sure there's any particular plugins for this, but it's certainly possible with a few functions. The users should have a settings page where they can select which categories and tags they´d like to see p... | Filter index page plugin | wordpress |
I would like to change the order in which users are displayed in the admin. At the moment it seems that they are order by the username. I think I have found the right place in the wp-admin/users.php, which is around line 187: <code> ORDER BY user_login"); </code> I am not 100% sure if this is right as I don't know much... | Nope, the line you found seems to be some basic preliminary query. Selection of users for display in table seems to be handled by <code> WP_User_Search </code> class. Luckily it can be hooked into easily. Try this (changes order to descending): <code> add_action('pre_user_search', 'change_user_order'); function change_... | How to change the order in which users are displayed in admin? | wordpress |
I need a function that returns true when the author is an admin or an editor or of a certain role. I can't use is_single because I have set up a forum and there are a million singles out there and I need a different layout for THE posts (the ones written in the blog by admins and editors) than from the forum entries | <code> author_can() </code> seems to fit. Example: <code> if( author_can( get_the_ID(), 'administrator' ) ) </code> | A function that returns true when the Author is a certain role is_author(admin)? | wordpress |
I am using Manifest 1.01 by Jim Barraud on my site www.inteftrust.org. I'd like to know how can I get full width with this theme. Thanks. | yes, go to your /wp-content/themes/manifest_v1.1/style.css and edit the following IDs to look like this: <code> #siteWrapper{ margin: 0 auto; padding-top: 15px; width: 97%; text-align: center; position: relative; } #coreContent{ float: auto; width: auto; margin-top: 8px; } #footer{ width: 97%; margin: 40px auto 0; padd... | How to edit my theme for full width? | wordpress |
i just want this code to be added in my functions.php, so that it will directly display after my post ends currently i am adding this code to my single.php, but i want to add this is in functions.php, this code is use to fetch all the tweets of the respective account, the code is here <code> <?php function parse_twi... | I'm not sure why you don't just insert the code in the single.php, or use Denis's solution, but if you want to hook into <code> the_content </code> you can do so by putting the following in your functions.php file: <code> function append_the_content($content) { $content .= 'PUT YOUR FUNCTION HERE'; return $content; } a... | write in functions.php | wordpress |
How difficult would it be to add an option for "nofollow" to the Link editor's existing "Link Relationship(XFN) options list? Alternately, or better yet, in addition, add an item to the "Bulk Actions" listing called "Make links no follow" that would make all selected links rel="nofollow". I'd like to add this feature t... | Alternatively you can undo the code that disables the relationship box by re-pointing the enqueue to the xfn.js script.. First create a modified version of that script, like so.. <code> jQuery(document).ready( function($) { //$('#link_rel').attr('readonly', 'readonly'); $('#linkxfndiv input').bind('click keyup', functi... | How to add an option for "nofollow" to the Link editor's existing "Link Relationship(XFN) options list? | wordpress |
i tried this code, it is not giving me any 404 page instead it is giving me the same page back, now i think the submit buttons needs to be configured <code> function the_taxonomy_dropdown($taxonomy) { $id = "{$taxonomy}-dropdown"; $terms = get_terms($taxonomy); echo "<select name=\"{$id}\" id=\"{$id}\">"; foreach... | Just a standard HTML form will do! <code> <form action="<?php echo home_url('/'); ?>" method="get"> <p><?php wp_dropdown_categories('taxonomy=taxonomy-1&name=taxonomy-1'); ?></p> <p><?php wp_dropdown_categories('taxonomy=taxonomy-2&name=taxonomy-2'); ?></p> <p&... | drop-down list another query | wordpress |
<code> function validate_username( $username ) { $sanitized = sanitize_user( $username, true ); $valid = ( $sanitized == $username ); return apply_filters( 'validate_username', $valid, $username ); } </code> in wp-includes/registration.php i want to change <code> $sanitized = sanitize_user( $username, true ); </code> t... | Like so: <code> function my_validate_username( $valid, $username ) { $sanitized = sanitize_user( $username, false ); $valid = ( $sanitized == $username ); return $valid; } add_filter('validate_username', 'my_validate_username', 10, 2); </code> | add_filter return value | wordpress |
i have a function of custom taxonomies to display a drop down list on my website, which is working fine, but there is one problem, the default value is a custom taxonomy, but that i dont want, i want a custom word, like select cause the current default value, when i select it, it is not redirecting to the corresponding... | Not sure exactly what you're asking. Do you just want to include a blank value before the list of terms? Would this work: <code> echo '<option value="#"> - Select - </option>'; </code> (inserted just before the line foreach($terms as $term) { ) | drop-down list taxonomy problem | wordpress |
I'd like to add some code to my plugin populate a specific sidebar (if it exists) with a text widget containing preset content. Assuming that the sidebar I'm trying to preset is referenced by ID as "my-widget", how would I preset the content's of that widget with a text widget containing the text "Hello World"? | You need to do this in two steps. First create the actual widget. Find a widget ID that does not exist, and toss in an extra entry in (off the top of my head) the widget_text option, which corresponds to the text widget config. Off the top of my head, it'll look something like: <code> $ops = get_option('widget_text'); ... | How to preset a sidebar widget with default content via script? | wordpress |
What is the correct method to refer to images from within your plugin code, so that no matter what the folder is named, they resolve correctly? I had an issue where a user downloaded my plugin twice, then used the 2nd downloaded file to install it. Since Windows automatically named duplicate files foldername(2).zip, wh... | I am not sure about this specific example but in general <code> plugins_url() </code> is fitting function for this. Example from Codex: <code> plugins_url('/images/wordpress.png', __FILE__); </code> | How to link to images in my plugin regardless of the plugin folder's name | wordpress |
I have a custom post type that I want to display the page you are on and how many pages total in this manner "Page 3 of 5" (meaning you are on page 3 of a 5 page post). These don't have to be links, just plain text numbers. I'd still like to keep the standard function of the wp_page_links parameter "next_or_number" set... | The current / total page count is set up by <code> setup_postdata() </code> which runs at the beginning of the loop. So, if you're in the loop, all you have to do is this: <code> global $page, $numpages; echo "Page $page of $numpages"; </code> If you need to do that outside of the loop, do this first: <code> global $pa... | Display "Page 3 of 5" for a paginated post | wordpress |
Running IIS 7 and WP 3.0. I've got a web.config that has the necessary rewrite rules to make permalinks work, and they're working. However, if I point to n-nexus.realtimepublishers.com/content/?feed=rss2, the server first generates an HTTP 404. Weirdly, it then delivers the RSS feed. The problem is that the initial 404... | The 404 is typical of WP thinking it has got no posts. Seeing that you actually have posts, I'm prompted to ask if you've plugins that mess around with query arguments or that override the loop partially or entirely? If so, they might be missing a few lines of code to allow WP to "know" it has found posts. | How do you make RSS feeds work under IIS 7? | wordpress |
I display a random post loop on a page. I'd like to put a "refresh" link to refresh the content of the loop via ajax. Is this possible? This is my loop if it helps: <code> <ul id="content-inner" class="thumb-grid clearfix"> <?php query_posts('posts_per_page=20&orderby=rand'); ?> <?php if (have_posts(... | Shouldn't be too tricky. First: create a javascript file and add this: <code> jQuery(document).ready(function($){ $('#refresh-links-id').click(function(e){ e.preventDefault(); $.post(ajaxurl,{action:'jpb_random_loop'}, function(data){ $('#content-inner').fadeOut(250).empty().append( data ).fadeIn(250); }); }); }); </co... | Ajax loop refresh on click | wordpress |
Generally on our wordpress blogs,there will be a label "Wordpress" displayed on title bar .Does any body have idea how to hide or remove it? Update : Here is a website's screenshot,which shows the label : My website is powered by wordpress multisite installation and like many people I wanted it as self branded even tho... | I personaly don't think you should really do this, and I would leave it there if I were you - it is in fact a way to support WordPress, and don't forget you got it for free. ;) but, if you really want to do it, go to /wp-admin/admin-header.php and remove <code> &#8212; WordPress </code> from this line: <code> <t... | Removing label 'Wordpress' from title bar | wordpress |
This code: <code> <?php the_terms($post->ID, 'type') ?> </code> Gives: <code> <a href="/archives/type/image" rel="tag">Tag</a> </code> What do to if I want to display only "Tag" word, not link eg. <code> Tag </code> Thanks! | While you can specify separators and such in <code> the_terms() </code> arguments, it assumes that you actually want links. You can discard unwanted HTML by using filter: <code> add_filter('the_terms', 'no_terms_links', 10, 2); function no_terms_links($term_list, $taxonomy) { if ('type' == $taxonomy) return wp_filter_n... | Formating the_terms() function output | wordpress |
Well, I'm using my own taxonomy for custom post type. It looks like this: <code> register_taxonomy("our_gallery", array("gallery"), array("hierarchical" => true, "label" => "Types", "singular_label" => "Type", "rewrite" => true)); </code> I have created a few "types"/categories in my admin panel like "Black... | I think you are getting confused by terminology here. Category is a <code> taxonomy </code> . Specific categories you create are <code> terms </code> . our_gallery is <code> taxonomy </code> . Landscapes is <code> term </code> . our_gallery is not <code> category </code> . It is its own <code> taxonomy </code> and has ... | Getting Wordpress custom taxonomy/category? | wordpress |
I would like to display all my category items under a single parent but I failed to do so now I'm creating a new menu link for each category and dragging it into place in the custom menu screen. Is there an easier and automatic way of doing this? | If you need to use a custom menu, then what you're doing is probably the only way. "Select All" in the Categories meta box on the admin menus screen, "Add to menu", and then reorder the category items as you like. But if you just want an automatic list of categories, then why not just call wp_list_categories() in your ... | How to automatically generate custom menu item from categories? | wordpress |
Couldn't find anything in the related questions, so here goes: I have a post which, when viewed on the site, is returning a redirect loop. The error page is showing an address for the post that originated when the post was added to a category that was subsequently deleted. www.macrowikinomics.com/innovation-communities... | Do you use a plugin called Redirection? It has a setting that will automatically create redirects when a post permalink is changed, and if the post is renamed and then changed back to the original name, you get a loop. And if a category is removed, WP will reassign a post to the default category and that may be part of... | How to reset canonical URLs / fix redirect loop | wordpress |
All right, so we're probably all familiar with the typical way to ensure that your main CSS file is refreshed when you load the page (busting the browser cache), right? <code> <link rel="stylesheet" type="text/css" media="all" href="<?php echo get_stylesheet_uri(); echo '?'.filemtime( get_stylesheet_directory() .... | You're using the file's path in the first call, but its URL in the second. So it won't work. | Cache busting CSS files other than style.css | wordpress |
I am trying to modify the support links under the help section (Contextual help).I want to replace these Documentation on Using Themes and Support Forums with my own .So I removed the links in wp-admin folder from many pages under admin section .But for plugin pages,I can't able to find the files to remove. Is there an... | But for plugin pages,I can't able to find the files to remove. For dealing with plugin/registered pages that you won't necessarily know the hooks for, something like this will work... <code> add_action( 'admin_head', 'set_plugin_help_text'); function set_plugin_help_text() { global $_registered_pages; if( !empty( $_reg... | Modify links under 'help section'? | wordpress |
How can one get the blog ID as well as the database prefix of the main blog in a wordpress multisite installation? Is the main blog's ID always 1? Also how can the main blog's table prefix be acquired from within the mu-plugin's code? | Use the constant <code> BLOG_ID_CURRENT_SITE </code> . And to get the database table prefix, use; <code> $main_blog_prefix = $wpdb->get_blog_prefix(BLOG_ID_CURRENT_SITE); </code> | How to get the main blog's id and db prefix from a mu plugin? | wordpress |
Since upgrading to WP 3.0.1, a couple of my sites no longer display the update link to 3.02/3.03 on the Dashboard or on the Updates page. On one site, I tried re-applying permissions, but this didn't change a thing. There are no plugins related to 'hiding' update/nag messages. All the sites have been around since 2.7. | Try flushing out the transient data(options prefixed with <code> _site_transient_update_ </code> - wp_options table), WP will recreate them for you anyway. Not always a solution but tends to work for me when i have that problem. You can do this by adding the following lines to your current theme's functions.php (in wp-... | Missing Update Link to 3.02/3.03 on Dashboard | wordpress |
I have a function that defines a custom field on a post type. Say the field is "subhead". When the post is saved, I want to do some validation on the input, and display an error message on the post edit screen if necessary. Something like: <code> // Handle post updating function wpse_update_post_custom_values($post_id,... | Store errors in your class or as a global, possibly in a transient or meta, and display them in admin notices on POST requests. WP does not feature any flash message handler. | Add validation and error handling when saving custom fields? | wordpress |
i'm using this sql.. but it does not work <code> UPDATE wp_options SET option_value = replace(option_value, 'http://old.com, 'http://new.com') WHERE option_name = 'home' OR option_name = 'siteurl'; UPDATE wp_options SET option_value = replace(option_value, 'http://old.com', 'http://new.com') WHERE option_name = 'home' ... | I do this all the time to move a site from our staging server to the live domain. I use PHPMyAdmin to export the database as an SQL file, then open it up in a text editor and do a global find and replace on the old url to change it to the new url. The use the SQL script to import the new SQL file to the new database, a... | How do I move a Wordpress site to another server? | wordpress |
How can I set up wordpress to recognize <code> www.example.com/wp-content/uploads/2010/12/history.pdf </code> as something like <code> www.example.com/about/pdf-download/ </code> I also want the user not to see the actual link but the new one. | Do you just need to redirect that one specific request (for /wp-content/uploads/2010/12/history.pdf to /about/history.pdf)? Or do you need to to handle many requests (say, for /wp-content/uploads/2010/12/* to /about/*)? If it's the former, use a symbolic link (or, if you're not on Unix/Linux/BSD, whatever equivalent yo... | Custom Download Link | wordpress |
How can I add a nofollow option to my blogroll links editor? Attempted to just type "nofollow" into the "rel" input box, but its auto deleted onblur. If I turn javascript off (thanks to Matt's suggestion below), It works, but when I check the source on my site, the rel attribute looks like this... rel="nofollow"on... | I know of three ways around this and unfortunately they all suck: Hack a core file Use a plugin Temporarily turn off scripgs in your browser and change them in the edit links section. | Make blogroll links no-follow? | wordpress |
I found a image accorian menu plugin based on mootools farework. Please suggest if any based on jquery framework. | Thanks to @t31os. This is what i was looking for: http://wordpress.org/extend/plugins/accordion-image-menu/ | Jquery based image accordian plugin | wordpress |
I've been bashing my head against my desk all afternoon trying to figure this out. I've got a custom post type all set up, with hierarchical set to "true" and I can assign parents and see the relationship in the back end. Which is great. Except I want to list the children (and siblings) of my special new post type. I f... | As name hints <code> wp_list_pages() </code> is intended for use with pages. As in "a page page". It uses <code> get_pages() </code> internally, which has <code> post_type </code> argument that defaults to <code> page </code> . I am not sure at all this is supposed to work for non-pages, but you can try to pass your cu... | wp_list_pages doesn't work in hierarchical custom post type | wordpress |
I'm using the excellent PHP Code Widget plugin, and want to create a widget that displays the post thumbnail (aka featured image) for the most recent 'project' post. Here's the code I have so far, but it isn't producing the desired result. This actually outputs nothing. <code> <?php global $post; $args = array( 'pos... | Moving here so comments don't turn into a mess. Basically there are two things that can go wrong here: Fetching of posts. Check that <code> $thumbnails </code> gets correct post and only one. I am not sure if that is the issue, but <code> get_posts() </code> docs list <code> numberposts </code> argument instead of <cod... | How can I show the post thumbnail from the most recent of a certain post type, in widget? | wordpress |
I'm not sure if this setting is handled in my wordpress installation or by Feedburner but right now my feedburner feed is displaying the feedburner favicon. How can I set it to use my blogs favicon? | As @Rarst pointed out, there is no implementation of a favicon in the RSS spec (although there does seem to be one for Atom). Feedburner (and other readers) rely on the de-facto standard that the favicon exists at the website root; <code> http://example.com/favicon.ico </code> Some clients may also try <code> .png </co... | How do I set my Feedburner feed to use my favicon? | wordpress |
How can I make a link like this? <code> http://www.lifecellskin.us/Dev/About </code> the "Using_Permalinks" part, A is Capital letters. But WP automatically convert upper case to lower case. I'm trying to convert an old site that made by only html to a WP platform site. Some links to the site look like this: <code> htt... | The page URLs are defined by the slugs, and by default they are formatted and lower-cased by the function <code> sanitize_title_with_dashes() </code> . However, this function is called via a filter, and you can unhook the filter so it doesn't get called: <code> remove_filter( 'sanitize_title', 'sanitize_title_with_dash... | How can I make Capital letter ( upper-case ) permalinks? | wordpress |
I'm tasked with making a site that has 'families'. Each family has a gallery, a 'region', and a 'name', both of which are searchable upon. My initial thoughts about this were to create a template for a child page of 'Families' that contains 2 custom fields (name and region), and just use some gallery plugin on each pag... | you could make category for each family (name), and a (sub)category for each region, and then assign custom templates to each category using category templates plugin . or - in case you want to use pages instead of posts/categories - then you don't need this plugin but instead just create additional page templates for ... | Approach to creating a site with this structure | wordpress |
I just came back to my site from dinner and was unable to find any posts listed in the dashboard. After snooping around, I found that my .htaccess file was modified, and some new files were added to my home directory. I deleted the .htaccess code, and the files (they all started with PE). I see that in the last hour a ... | See FAQ: My site was hacked « WordPress Codex and How to completely clean your hacked wordpress installation and How to find a backdoor in a hacked WordPress and Hardening WordPress « WordPress Codex . Do a good job cleaing or you'll be doing it all over again. Who is your host? Check with them, too. Some hosts are bet... | Wordpress cracked? Posts not found in dashboard | wordpress |
I have a pretty specific requirement to show different text in a field label on the user profile page based on the current user's role. I can't seem to figure out how to check whether the current use is an "author". I am looking for a function like: <code> is_user_in_role($user, "author"); </code> I imagine this is pre... | If you only need this for current user <code> current_user_can() </code> accepts both roles and capabilities. | How to check if a user is in a specific role? | wordpress |
I've created my own custom post type using this tutorial: http://thinkvitamin.com/code/create-your-first-wordpress-custom-post-type/ Everything works fine, but I'm having major problem with "Read more" feature. As we all know <code> <!--more--> </code> adds <code> <span id="more-[number]" /> </code> at the ... | The quicktag will not operate and is ignored in Templates, such as single.php, where just one post is displayed. http://codex.wordpress.org/Function_Reference/the_content | "More" span making trouble | wordpress |
Anyone know how to override noindex on certain categories? I only want a few of my categories to be index but the rest not, in the All in one SEO plugin I have a setting that says "Use noindex for Categories" What I was wondering if there was any way of overriding this on some categories but leave it in place for the m... | From quick look at code this is getting concatenated into <code> $meta_string </code> variable, that is echoed without passing through any filter and so not easily modifiable. Likely for more precise control you need to disable this option in plugin and insert tag with your own code. | All In One SEO Plugin - Category INDEX | wordpress |
I'm trying to fix a site which has been injected with external spam. After inspection I found out that the external content (so far just html advertising different kinds of drugs, no scripts) was in the static pages created by w3 total cache. How can I find out what part is responsible for this? The obvious answer woul... | It is prolly injected in your files. Look at the plugin files, search for eval or base64. | Spam injected in w3 total cache page cache | wordpress |
If I have a page with ID 123, I know my template file <code> page-123.php </code> will be called to render it, but if my theme is used across a network, could a page in a different site also have ID 123? I assume, if so, that I'll need to sniff <code> $current_site </code> and requiring an alternate template file if it... | Nope, they aren't unique. So yes - you'd have to check current site and do that.... or use a theme with a custom menu? | Are page/post IDs unique across a whole network? | wordpress |
Ok guys, i have problem when using some trics from here or other sites. I <code> m trying to use this method of adding custom user fields. But, when i add this, everytime i save it </code> s all ok, but when i come back to edit something different in user profile, those new fields just goes blank, and if i did not inpu... | You have specified the value of the <code> <textarea> </code> in a <code> value </code> attribute, but for a <code> <textarea> </code> you must put it between the two tags: <code> <textarea rows="10" cols="60" name="adsense_336" id="adsense_336" class="regular-text" ><?php echo esc_attr( get_the_au... | Update users custom profile fields | wordpress |
I have just changed the theme on my blog, and because of a small page width, it breaks the layout. Most of my earlier images (attached in posts) are around 600px in width, and now I need to resize all of them them proportionately to 450px. How do I resize them all at one shot? Is there a plugin for this? P.S.: Writing ... | I asked stackexchange-url ("a similar but broader question"), and I still need to research and write a complete answer. In the meantime here are some pointers that might help you: I wrote stackexchange-url ("a set of plugins that resizes all images to the size used in the editor"). It works by converting <code> <img... | Resizing all images | wordpress |
I am looking for a simple example on how to create a user bar or a simple theme with it that can serve me as example. What I meant is something like we have here on Wordpress Answers if u get above the logo you have a userbar with information when user is logged in and options to login/register when user is not logged ... | If you're looking for an example how this can be done, grab the current development version of wordpress. It's already everything in there you might need / can imagine. If you don't want to make use of 3.1 but 3.0, use the 3.1 code as the example you're asking for. The user bar is located in admin-bar.php and class-wp-... | User bar above logotipo? | wordpress |
The codex doesn't seem to say how one would go about adding a description to a custom widget registered with <code> wp_register_sidebar_widget() </code> . The default description seems to be the name of teh widget itself. <code> function myFunc(){ /* widget code */ } wp_register_sidebar_widget( 'wdgt1', 'Site Map', 'my... | Here's what you looking for: <code> class WP_Widget_Sitemap extends WP_Widget { function WP_Widget_Sitemap() { $widget_ops = array( 'classname' => 'widget_sitemap', 'description' => __( "This is the description" ) ); $this->WP_Widget( 'sitemap', __('Site Map'), $widget_ops); } function widget() { ... } functio... | How to add a description to Widgets? | wordpress |
I've tried to explain the benefits of WordPress to others; comparing it to static sites is easy, as (most) everything can be done online with WP. I have more difficulty comparing and contrasting with other content management systems such as Drupal. I realize that there is no perfect system for every use, but what featu... | Hi @Grant Palin : My use of WordPress is almost exclusively CMS, and the other software I have experience with is Drupal (2 years ago, but have continued to follow it) and DotNetNuke (5 years ago, and I haven't looked back.) I also reviewed Joomla about 3+ years ago and found is to be both too complex and too inflexibl... | What are the advantages of WordPress over other systems? | wordpress |
I have seen on some websites that you can sort posts server-side by passing in some queries like so: <code> domain.com/?sort=date </code> or <code> domain.com/?sort=name </code> How would I do this with WordPress posts on a page? | The display of posts is controlled by WordPress Loop. It has a lot of possible arguments, but they are rarely exposed in URL (especially if using pretty permalinks). But it is possible to make use of arguments by manually adding them to URL. For sorting see Orderby Parameters . Your example would be something like: <co... | Server-side sorting of posts | wordpress |
I'm just wondering how I would go about redirecting to the latest post when you go to the web site? Similar to http://gregorywood.co.uk/ Many thanks :) Suleiman | Try this (as plugin or theme's functions.php): <code> add_action( 'template_redirect', 'redirect' ); function redirect() { if ( is_home() && ! is_paged() ) : wp_redirect( get_permalink() , 301 ); exit; endif; } </code> | Redirect homepage ( www.sitename.com ) to the latest post | wordpress |
Call me stupid but I coudn't figure out how to do it. For text input I would just: <code> <input type="text" name="option_name" value="<?php echo get_option( 'option_name' ); ?>" /> </code> and then hook it into workdpress using <code> register_setting() </code> . I could then get its value thru <code> get_... | I tend to store multiple options as an array, so i'd have something like this.. <code> <?php $options = get_option( 'myoption' ); ?> <input type="checkbox" name="myoption[option_one]" value="1"<?php checked( 1 == $options['option_one'] ); ?> /> <input type="checkbox" name="myoption[option_two]" val... | How to use checkbox and radio button in options page? | wordpress |
How can I extend the functions of the WordPress 3.1 admin bar in my plugins? I am looking for specific hooks and filters to use in adding links or other features to the admin bar. A good example of what has already been done is the Yoast WordPress SEO (Wordpress Plugin). Currently there is no documentation available on... | Yoast's plug-in is actually a very good example if all you want to do is add menus. Basically, the admin bar is just an alternate set of links to the same plug-in admin pages you have in the sidebar. To add the top-level SEO menu, Yoast does the following: <code> $wp_admin_bar->add_menu( array( 'id' => 'wpseo-men... | Is the new WordPress 3.1 admin bar pluggable and how can I extend it? | wordpress |
Is is possible to get a page's permalink from the slug alone? I'm aware that you can get the page's permalink from the ID using <code> get_page_link() </code> : <code> <a href="<?php echo get_page_link(40); ?>">Map</a> </code> I'm curious if there is any way to do the same with the slug of a page: <co... | You're talking about Pages right? Not Posts. Is this what you looking for: <code> get_permalink( get_page_by_path( 'map' ) ) </code> <code> get_permalink( get_page_by_title( 'Map' ) ) </code> <code> home_url( '/map/' ) </code> | Get page link from slug? | wordpress |
I would like to provide our WP users (authors) with a tinyMCE editor instead of standard <code> textarea </code> for their "Biographical Info" on the Profile page. I have spent a lot of time searching online for plugins and references for how to accomplish this without a satisfying solution. Any tips would be appreciat... | I found a very helpful blog post which shows exactly how to accomplish what I am after with only three small changes to the <code> user-edit.php </code> page. First Change I had to add a class name to the <code> <textarea> </code> tag for the description. <code> <textarea name="description" id="description" ro... | How to use tinyMCE for user "biographical info"? | wordpress |
I'm setting up a site with a theme that takes advantage of the "featured image" feature of WordPress. Since my end users are not the most tech saavy in the world, I'd like to set things up so that the categories would have a default "featured image" assigned to the post. In the event of multiple categories assigned to ... | In your template where you have the Featured Image displayed: <code> <?php the_post_thumbnail( 'thumbnail' ); ?> </code> you can make it conditional on whether the Featured Image is set, then have it default to whatever you want if it's not set. One way to do this is to put all the default images in a directory a... | Can I set a default featured image for a category? | wordpress |
i want to change the address of the file attachment link to wordpress [example: http://www.sitename.com/category/sub-category/article.html /attachment/ image etc.]. i did research on the subject a few days, but could not get any results.. looking at the structure of the connection! after " .html ", " / " mark d... | Actually, you can always just use a query parameter, even if you have the "pretty" permalinks enabled. So instead of <code> /category/sub-category/article.html/attachment/image </code> you can go to <code> /?attachment=image </code> . The only case when this "breaks down" is when you go to <code> /category/sub-category... | attachment url rewrite | wordpress |
Can someone explain to me please how exactly Bad Behavior works? On their official site, they say that it uses HTTP headers, IP, and meta fingerprinting - but I would like some specifics on its mechanisms, not a simple description. To be more precise - how does it profile malicious activity (what kind of activity trigg... | Bad Behavior does two things: It checks the HTTP request and sees if it is as per the standard or not. Usually spammers don't write their scripts so well as to be fully compliant with the HTTP standard. Bad Behavior can make out poorly scripted HTTP requests from properly scripted ones (which would be sent by genuine v... | How exactly does Bad Behavior plugin work? | wordpress |
i migrated a wordpress site from one domain to another. I still have images and links that seem to be pointing to my old domain name. where can i get a list of all places in wordpress that hardcode or has the domain name in it. the only place i saw was in the database in the wp_posts table in the guid column. where els... | Don't worry about changing the guid, you'll be fine if you never update that field. The main places you'll need to update are in the post_content column of wp_posts (for links and images), and in the wp_options table (for widget data). Before you do any database replacing, though, read through this thread: stackexchang... | how do i find out why links point to my old domain | wordpress |
I am using wordpress mu. My blog administrators are unable to edit users - getting the message: You do not have permission to edit this user. I have checked my plugins etc and cannot find the cause. Is there a solution to this problem? | this is set in wp-config.php: define( "EDIT_ANY_USER", true ); | You do not have permission to edit this user | wordpress |
I have inherited a situation where our team supports over 100+ separate WordPress installs for various clients. I am looking to make the whole process a bit more efficient. For all of those in a similar situation of managing a large number of Wordpress installs: Are there any tools or techniques that are helpful? The t... | Well it depends on how/where they are hosted. If if they are hosted on different servers or the same I would still use the command line and a script file. If they all have different usernames/passwords you going to have to write a lot. Pre-planning will save you a ton of time in maintenance. First it would be best to g... | Adminstering Large Number of Wordpress Sites | wordpress |
Title is little bit :S sorry :) For example,we have paginate links function that output html something like this <code> <span class='page-numbers current'>some number</span> </code> How can I filter that,to remove that span,class,to apply my own html tags,styles,tnx in advance.I just want to apply my own st... | Use a custom pagination function: my source: <code> function fb_paging_bar( $args = array() ) { $defaults = array( 'range' => 4, 'custom_query' => FALSE, 'previous_string' => __( '&laquo;&laquo;&laquo;', FB_GREYFOTO_TEXTDOMAIN ), 'next_string' => __( '&raquo;&raquo;&raquo;', FB_GREYF... | Add filter on html tags,attributes on specific function in wordpress | wordpress |
Recently, I had to move to another domain and had to recreate all my MySQL tables on the enw server. I noticed that for some posts, the number of comments is doubled. Example - http://inversekarma.in/scraps/you-dont-mess-with-the-rajinikanth/. In the above post, there's only 4 comments, but the comment count shoes 8 co... | Try this code: WARNING: THIS IS JUST PSEUDOCODE! <code> $entries = $wpdb->get_results("SELECT * FROM wp_posts WHERE post_type IN ('post', 'page')"); foreach($entries as $entry) { $post_id = $entry->ID; $comment_count = $wpdb->get_var("SELECT COUNT(*) AS comment_cnt FROM wp_comments WHERE comment_post_ID = '$po... | Resetting comment count | wordpress |
I've got a custom meta box for a custom post type which will be the only metabox I plan to show in the main column (except the native title box). I want to move the native Expert box/field inside my Custom Meta Box. I'm able to create a field called Excerpt in my Meta Box, however I only know how to save this to the Cu... | Just name the field 'excerpt'. E.g.: <code> <textarea name="excerpt" id="excerpt"><?php echo esc_html( '$post->post_excerpt' ); ?></textarea> <!-- if it is a textarea field --> </code> or <code> <input name="excerpt" id="excerpt" value="<?php echo esc_attr( '$post->post_excerpt' ); ?... | Replace the Post Excerpt Meta Box with a Field in My Custom Meta Box | wordpress |
I have two custom meta fields that I've enabled for each post, scottb_customHeader and scottb_customTitle These work fine as long as I'm using the full edit feature to edit posts. However, when I click "Quick Edit", then click "Update", my custom meta values for the post are cleared out. What do I need to do to resolve... | Add a hidden flag to the post edit form along with your custom fields. Something like <code> <input type="hidden" name="my_hidden_flag" value="true" /> </code> Then, wrap all of your custom save_post stuff in a check for this flag. Then you don't have to check for the autosave constant any more either--if the fla... | "Quick Edit" > update clears out my custom meta values | wordpress |
I am trying to run an automatic update from Wordpress 3.0 to 3.02. However, I get the following error message: "Unable to locate WordPress Root directory. Installation Failed" I also cannot install plugins on the same server. The error message for the plugins is quite similar: "Plugin could not be deleted due to an err... | Jeff, unfortunately this looks like a problem with your hosting setup, so your host will be the only one who can help. If they can't, and the problem doesn't correct itself, I'd recommend exporting your site and moving to a more supportive host. In the meantime, though, who is your current host? If you have FTP access,... | Automatic updates not working/plugins not installing | wordpress |
How can I remove the Featured Image meta box? I've tried using the <code> remove_meta_box </code> function and specifying the boxes ID but it doesn't seem to work like it does for the other native meta boxes. Here is the specific code I tried: <code> add_action( 'admin_menu', 'remove_thumbnail_box' ); function remove_t... | I haven't had time to test this but this looks like it should work for you. <code> add_action('do_meta_boxes', 'remove_thumbnail_box'); function remove_thumbnail_box() { remove_meta_box( 'postimagediv','post','side' ); } </code> Check this for more info. Edit: The main change here is that you need to attach the functio... | Remove the Featured Image Meta Box | wordpress |
I had used the ZD Video Plugin for WP a long time, and now, since my move to WP 3.0.2, it doesn't work anymore. To embed a YouTube video using the plugin, I would just write [zdvideo]url-of-youtube-video[/zdvideo] Now I need to go back to plain YouTube embedding. How do I write a MySQL query that searches for <code> [z... | What about these two queries? <code> UPDATE wp_posts SET post_content = REPLACE(post_content, '[zdvideo]', ''); UPDATE wp_posts SET post_content = REPLACE(post_content, '[/zdvideo]', ''); </code> | Search and replace text across all posts | wordpress |
I have a plugin that I use on all my new sites to set up site defaults (deletes the "hello world" post, the "about" page, the "Mr WordPress" comment, etc...) I'd like to add a routine that removes all the default links under "Blogroll". I'm not sure what function to call. Any ideas? | Haven't tested this yet, but it should do the trick in 3x: <code> // Get all the existing links $arr_args = array( 'hide_invisible' => 0 ); $arr_links = get_bookmarks( $arr_args ); // Run through the list and delete 'em foreach($arr_links as $obj_link) { wp_delete_link($obj_link->link_id); } </code> Of course, yo... | Remove Default Blogroll Links via Plugin script | wordpress |
Here's the setup: The client uses a proprietary custom-coded PHP CMS and is wanting to move to WordPress with BuddyPress. The old, custom CMS has a roster functionality, which I'm using BuddyPress custom fields to replace. The custom fields are basic contact info (Phone, Fax) and company info (Text field). What is the ... | I ended up writing a bunch of MySQL statements. My process went: Add users into wp_users. Add first name into wp_usermeta. Add last name into wp_usermeta. Add nickname into wp_usermeta. Add last activity into wp_usermeta. (This is important for BuddyPress; otherwise, users won't show up in the members-loop) Add name to... | Importing users to Buddypress with custom fields | wordpress |
I'm sure there is a simple reason/answer for this: Why does <code> echo 'Archive for '. the_time('Y'); </code> give me <code> 2010Archive for </code> ? I had expected it would give me <code> Archive for 2010 </code> | As most template tags that start with <code> the_ </code> this one echoes time and not returns it (which template tags that start with <code> get_the_ </code> do). First <code> the_time() </code> fires and echoes year, then its return ( <code> null </code> ) gets concatenated and echoed with string. So: <code> echo 'Ar... | Why does this echo values in the wrong order? | wordpress |
Does anyone know of a way to add code to the functions.php file which will automatically force all posts belonging to a custom post type to be "private" and/or "password protected" with a default password set? I am specifically referring to creating a new post or editing an existing post thus ensuring a post belonging ... | You can hook onto <code> save_post </code> , <code> wp_insert_post </code> or <code> wp_insert_post_data </code> to modify the post object prior to it being inserted or saved. Using <code> save_post </code> or <code> wp_insert_post </code> the callback would need to declare two args and would receive the post object as... | Forcing all posts associated with a custom post type to be private | wordpress |
I have a plugin which creates a new database table. Upon activating the plugin is there a way to insert all my posts ids into that table? Right now I'm using an action hook to immediately insert the id of new posts I publish. <code> function transfer_post_id($post_ID) { global $wpdb; if (!($wpdb->get_row("SELECT pos... | Like so: <code> INSERT INTO $mytable (post_id) SELECT ID FROM $wpdb->posts as posts LEFT JOIN $mytable as dup_check ON dup_check.post_id = posts.ID WHERE dup_check.post_id IS NULL; </code> | Insert all post IDs in new database table | wordpress |
I'm working on a site that has been running for few years and had different maintainers so it's kind of a mess. What I found weird is a lot of entries in <code> wp_postmeta </code> where all the keys are numeric and contain a string like this: <code> wpAjaxe17fbeda4c811052694cd66e93bf1868f720040882f22c2bba8432e030f010c... | The best way to know which plugin was adding them is to search/grep your installation for occurrences of <code> 'wpAjax' </code> and <code> "wpAjax" </code> . If you find none (which is likely, since the oldest is 3 years old) safely <code> delete from wp_postmeta where meta_key like 'wpAjax%' </code> , or something al... | Uknown meta entries in wp_postmeta | wordpress |
( Moderator's note: The original title was "drop down taxonomy") I want to add a drop-down box filled with my custom taxonomies, so when someone selects any value, it redirects to corresponding page. I tried out this code, which worked <code> <?php wp_dropdown_categories( array( 'taxonomy' => 'name of taxonomy' )... | Hi @ntechi: Here's a function I wrote which I named <code> the_taxonomy_dropdown() </code> to give you what I think you are looking for. <code> function the_taxonomy_dropdown($taxonomy) { $id = "{$taxonomy}-dropdown"; $js =<<<SCRIPT <script type="text/javascript"> jQuery(document).ready(function($){ $("s... | Redirect to Post List by Taxonomy on User Selection of Taxonomy Dropdown? | wordpress |
I'd like to modify the properties of a registered style(or script - same applies) before it's been loaded. Right now i'm trying to modify a registered style just before it gets enqueued, so i can point it at another file(ie. change the <code> src </code> property, maybe others to). Looking for some ideas specifically a... | Modify a registered style's path I wanted to tweak the path to one of the WordPress admin stylesheets so i could keep requests down, and because it makes little sense to include two stylesheets, when the one i'm calling redefines all the styling in the stylesheet enqueued by WordPress. The idea is basically to re-point... | Is it possible to change the attributes of a registered style or script before it fires? | wordpress |
My shopping cart is being cached by w3 total cache. This is the expected default behaviour. The thing is I can't find an easy solution for this. I am showing my shopping cart on almost every page, so using rejected cookies or something similar is not an option. Is it possible to tell w3 total cache not to cache a singl... | W3 Total Cache is a very advanced plugin that has built in ways to handle almost any situation. To exclude a page from being cached use one of the following commands below: <code> define('DONOTCACHEPAGE', true); Disables page caching for a given page. define('DONOTCACHEDB', true); Disables database caching for given pa... | WP-e-Commerce and W3-Total-Cache integration problem | wordpress |
I'm using the mysql GREATEST() function to compare two table fields and display in a loop either one with the highest integer value. The 2 fields consist of vote scores for posts: UP or DOWN. <code> function vote_results($post_id) { global $wpdb; $table = $wpdb->prefix . "post_votes"; $results = $wpdb->get_row( "... | I think you want to use <code> get_var() </code> , not <code> get_row() </code> - looking at the documentation , MySQL's <code> GREATEST </code> just returns a single value. <code> $results </code> will then just be the value of the greatest (be it <code> up </code> or <code> down </code> ). If you want the greatest <c... | greatest() function returns undefined property | wordpress |
What are the capabilities that a super-administrator has that an administrator does not have? The codex page on user capabilities does not have a list of capabilities of the super-admin. It lists only the capabilities of the administrator. | The super_admin has access to all admininstrator APIs and also the multi-site functions. If you go to the codex page, it will say so: http://codex.wordpress.org/Roles_and_Capabilities#Capability_vs._Role_Table You can find the multisite functions here: http://codex.wordpress.org/Function_Reference#Multisite_functions I... | What are the differences in capabilities between the super-administrator and administrator? | wordpress |
( Moderator's note: The original title was: "submit button in wordpress.") I'd like to create a registration form to send an email. I've tried Contact Form 7 but I would like to use my own HTML <code> <form> </code> . I can do the entire coding but I just want to know the code for the "submit" button so that the ... | Hi @ntechi: While you might be able to do something on the client with jQuery I think your best bet would be to use the Post/Redirect/Get Pattern and submit your registration form via a <code> <form method='post'> </code> action. The code after the screenshot below is a " Page Template " for a " Page " illustrate... | Programming WordPress to Send an Email on Registration Form Submit? | wordpress |
I've just moved a site I'm developing to WP3.1 so that I can take advantage of and start testing some of the new features. I'm especially liking the <code> has_archive </code> parameter in registering custom post types. I had a post type called 'recipes', and added this line to the args on registering it: <code> 'has_a... | I asked the question too soon. And thanks to @Jan Fabry for pointing me in the right direction. In case anyone else has this problem, here's the answer. Any time the rewrite rules are changed (adding a new post type, changing the slug or the has_archive slug, etc.) you have to call <code> flush_rewrite_rules </code> on... | Setting up custom post type archives in WP3.1? Any luck? | wordpress |
Guys I know this is the stupid question but need a little help, I need to put ads on my homepage as I have on my post page: These are the ads I get on my post page (i.e <code> single.php </code> ). I also want the same thing on my home page over here: I tried using a <code> <div> </code> tag like I did on <code> ... | How do you have your home page set up and what template are you trying to modify? Usually it is <code> index.php </code> or <code> home.php </code> , but it can also be <code> front-page.php </code> or even something completely different from defaults. See Template Hierarchy in Codex. | How can I add Google ads to my home page? | wordpress |
Which files do i edit to make the textarea for tag & cat description bigger? Or maybe there's an easier way through functions.php to save having to do it every-time i update wp? Thanks | Hook onto the edit-tags page and insert some additional styling to adjust the textarea, the ID remains the same for post tags, categories and i think other taxonomies to.. Adjust CSS for taxonomy management page Example only, tailor to suit you needs. <code> add_action( 'admin_print_styles-edit-tags.php', 'resize_descr... | Making the category & tag Description textarea bigger | wordpress |
i have a form which is displayed after every post, so i coded it in single.php, but the form is too long so i thought of putting it in jquery section, where if the user wants then he/she can click on open and the form will slide down for this purpose i used slide up/down jquery http : //api . jquery . com/slideDown/ i ... | Trim your above code down to.. <code> <?php wp_enqueue_script( "my_script", plugins_url( '/your-script-name.js', __FILE__ ), array( 'jquery' ) ); ?> <?php wp_head(); ?> <?php woo_head(); ?> </code> Place your jQuery into a JS file, then enqueue it with jQuery as a dependancy(as above), this will ensur... | need jquery help | wordpress |
I would like to know if it is possible to host a wordpress blog on the subdirectory of a rails application: For instance: I would like to have domain.com/blog instead of having my blog on a subdomain: blog.domain.com . I'm currently using lighttpd, but I can switch to something else if there is a solution. Thanks | You can also set an apache Alias to say /blog is /path/to/wordpress so it's technically not inside your RoR app, you can deploy/make changes to the RoR app all day long then, without the need to worry about overwriting wordpress files. | Host wordpress on a subdirectory of a Rails application | wordpress |
I have my site hosted at http://blog.rgksugan.in . I have set a subdomain in it for my blog. But after landing on my blog whatever other links I click i get the link as http://rgksugan.in/blog/wordpress/stack-overflow/ . I want it to be http://blog.rgksugan.in/stack-overflow What should I do...? | Have you changed the site address to try and remove the wordpress from the URL? This is under Settings then General. You then have two URLs one of which is the actual physical directory and the other is the one you want to appear to the visitors to your website. This should allow you to remove the 'wordpress' element f... | How to solve this problem with my subdomain? | wordpress |
I have come across a function before that displayed the exact SQL code that was used in a loop for example, but can't remember. Can anybody tell me that function? Cheers | Hi @Keith Donegan: If I understand your question correctly I think this is what you are looking for? <code> <?php echo $GLOBALS['wp_query']->request; ?> </code> <code> $wp_query </code> is a global variable that contains the current query run by the loop. If you run the above code anytime while the loop is sti... | How to display sql query that ran in query? | wordpress |
Is there a way to limit the size (dimensions) of the image a user can upload to their profile? It looks like Wordpress does do some kind of limiting as uploading a 1024x768 image the result gets scaled down to 360x270, but where is that configured, either in the UI (which I haven't found) or through code? This is the s... | It looks like the author image section of the User Profile editor was from the " Author Image " plugin. I didn't suspect that at first because I didn't know that plugins were allowed to modify that screen, so I thought it was just a build-in Wordpress function and that the plugin just allowed for easy display. As it do... | Limit author image size | wordpress |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.