question stringlengths 0 34.8k | answer stringlengths 0 28.3k | title stringlengths 7 150 | forum_tag stringclasses 12
values |
|---|---|---|---|
I have a multisite setup, with the main site being the company web site and a couple other blogs that will have different themes. I want to pull in posts from one or the other blog onto the home page of the main blog. What is the best way to accomplish this? Thanks. | There's a function to get one post from one blog , but that's it: <code> <?php $post = get_blog_post( $blog_id, $post_id ); echo $post->ID; ?> </code> If the blog has only one author you could also use <code> get_most_recent_post_of_user </code> . But I think the best way is to fetch the feed using <code> fetc... | What's the best way to get posts from one multisite blog into another? | wordpress |
I have a plugin install called uCan post so registered users can post and what not, but I am wanting to have two category lists for them to choose from. one is a country the other is an activity list. Now I have the two lists available but I want to exclude certain category ID's from one of the lists. Here is the code ... | Ok then time to move my response into an answer, because it seems you just want to exclude categories from the loop in the above code.. Assuming you're alright to modify this file(a plugin update would overwrite it), then simply conditionalise your loop like so.. <code> <?php $excluded = array( 1, 2, 3 ); foreach($c... | Removing category ID's from a selection list | wordpress |
I need to create a very simple contact form in the homepage with just 3 fields.Is there a way for showing the contact form without a plugin? I dont want to create a page with a contact form template for that. thk. | The Agregado Theme comes with a little contact form I modified for one of my themes, I guess it's ok for you to use it as long as the credits remain there. <code> <?php //Contact script created by Tim McDaniels and Darren Hoyt for the Mimbo Pro and Agregado themes, modified by Mario Aguiar cuz it didn't work. //May ... | show a little contact form in homepage without plugin | wordpress |
The Block Bad Queries Plugin hasn't been updated recently. Is WordPress still subject to these types of malicious attacks or has it been hardened sufficiently to make the plugin obsolete? Is there an alternative? | Yes it is still relevant, WordPress is very subject to query based attacks. It is more common and easier to attack bad plugins/themes, so even if your WordPress version is kept up to date, it's still a good idea. There is a better plugin called Mute Screamer, it uses a central PHPIDS database. http://wordpress.org/exte... | Is the Block Bad Queries Plugin Still Relevant? | wordpress |
is there a file where wordpress defines it's $GLOBALS? i'm just curious as to what wordpress uses it for and for what purpose. That's all! | I'm not sure if all of these are WordPress globals, but i did a quick grep type search of the WordPress files and tried to extract all the globals i could.. This is a list i compiled for you, that may not be perfect, but should *hopefully* represent alot of the <code> $GLOBALS </code> keys that WordPress uses, it won't... | $GLOBALS array for wordpress | wordpress |
I was just looking under my "Tools" menu in my WordPress site and noticed the "Export/Import" functions. I was not aware that this was even available and I've been needing it for some time. What version of WordPress did it originate with? | Exporting and Importing has been there since at least WordPress 2.1. Probably earlier. It moved into plugins with the release of 3.0, I believe. | In What WordPress Version Was the Import/Export Tool Introduced? | wordpress |
Question has been asked before about how to synchronize files as well as the database between two Wordpress installations. For the database level, the answer is usually to basically dump one database and insert it onto another server. The problem with this is that you end up losing any changes that have potentially bee... | The reality is that what we want is this: http://www.liquibase.org/ Liquibase is an open source (Apache 2.0 Licensed), database-independent library for tracking, managing and applying database changes. It is built on a simple premise: All database changes are stored in a human readable yet trackable form and checked in... | Wordpress database synch between dev and prod | wordpress |
I have the following code to do a foreach loop, I want to target the last item in the loop (e.g if it's looped over 3 events I want to target the 3rd event) to do something slightly different with the css. How would I do that? <code> <?php $pages = get_pages(array('child_of' => $post->ID, 'sort_column' => '... | You can try this : <code> foreach( $pages as $key => $post ) </code> and : <code> <div class = "event <?php if( $key == ( count( $pages ) - 1 ) ) echo 'last'; ?>" > </code> It will add a <code> last </code> class to your last <code> event </code> div. | In a foreach loop, how do I target the last item in the loop? | wordpress |
I have a CPT called "profile" that only supports the editor and thumbnail. Each user is limited to posting just 1 profile. I'm looking for a way to prefill the title and slug fields with the display name of the post author. As it is now, if I click on Publish, the post_status in the db is "Auto Draft" and the URL becom... | You could add a hidden input into the page to pre-set the title field, because it won't be on the page(because the type doesn't support titles). Slug is produced from the title, so you should only need add a title value. Something like this should work(though untested).. <code> add_action( 'submitpost_box', 'hidden_typ... | Setting a title on a Custom Post Type that doesn't support titles | wordpress |
I have a shortcode function that returns: <code> return '<ul class="list-pages">'. wp_list_pages( $args ) .'</ul>'; </code> Of course it returns: <code> {pages} <ul class="list-pages"></ul> </code> Instead of: <code> <ul class="list-pages"> {pages} </ul> </code> There is almost the s... | it is b/c wp_list_pages ECHOES by default. so it echoes before your return happens. wherever you are defining your $args, set 'echo' => FALSE, see http://codex.wordpress.org/Function_Reference/wp_list_pages | Shortcode returns values in the wrong order | wordpress |
I've deleted my previous question as it was migrated from Prowebmaster to WordPress section, and hence it was deep down somewhere. I'm in a quandary about using SEO Plugin for my WordPress site. Here's the thing: I was a happy camper with the Yoast SEO Plugin but because I couldn't edit Meta Description in bulk, stacke... | Throw this into your functions.php: <code> function clear_yoast_metadesc( $metadesc ) { return ''; } add_filter( 'wpseo_metadesc', 'clear_yoast_metadesc', 99, 1 ); </code> If you set the <code> $metadesc </code> to empty like that, it won't be echoed. BTW, bulk editing is very hard on my to-do list, so you would be abl... | Help in using SEO Plugins: SEO Ultimate And Yoast SEO Plugin | wordpress |
Now i face a problem, that i want to add a hook into the the_post. Then i use <code> print_r($post); </code> here display the my <code> print_r </code> content and again display the default content. because i am here in the_loop.so again the content was display. <code> add_action( 'the_content', 'custom_post' ); functi... | Take a look at my answer here, if you are trying to replace the post content: stackexchange-url ("Edit the_content function") | Wordpress add_action the_post hook | wordpress |
I am trying to install Wordpress on WAMP I changed my localhost path to <code> localhost:11245 </code> in the WAMP config file, so when I load my apache admin screen I go to <code> localhost:11245 </code> When I loaded Wordpress, <code> localhost:11245/wordpress </code> , it prompted me to enter the admin information, ... | here are the instructions i followed: http://webdesignerwall.com/tutorials/installing-wordpress-locally | WAMP Wordpress installation cannot get past step 1, loads indefinitely | wordpress |
For example: <code> http://www.example.com/dell/studio/studio-1558 </code> where <code> dell </code> and <code> studio </code> are categories A few months back I heard from someone that it is not possible. I need to know why? Which part of code prevents it? Is there any workaround for this? | Some folks asked the same question you did here. stackexchange-url ("This one") specifically worth reading, if you haven't already. It has ottopress explanation for harmful permalinks. If you really want to force this, you could write your own permalink (http://domain.com/category/subcategory/post...), then either use ... | Specifying multiple categories in URL (permalink)? | wordpress |
So here is the thing. I'm creating a site. A user can register in my site and post articles. The thing is I don't want separate admin area to post articles. I want to integrate everything in my theme. So the user don't need to go to wp-admin to create posts. I'm using magic fields plugin. I created a custom write panel... | I'm afraid it won't work quite like that. There are plugins that enable posting from the front end, such as TDO Mini Forms . Or stackexchange-url ("see this answer") for creating a form and code yourself. | How to display magic field's custom write panel in wordpress theme? | wordpress |
Here is an example Cat 1 has 6 post: ( post 1 , post 2 , post 3, post 4 etc.. ) Cat 2 has 6 post: ( post 1 , post 2 , post 3, post 4 etc.. ) i want to display random post like this: Today's CAT 1 Random post : Post 2 Today's CAT 2 Random Post : Post 5 but the posts has to change per 24 hours. Is it possible. Thanks ( S... | You could always use get_posts() to return a random post, but it would change every time the page loaded. So, here's an idea for you. In a plugin file, set up a wp_cron hook. <code> <?php /* Your plugin header goes here */ register_activation_hook( __FILE__, 'wpse24234_activation' ); function wpseo24234_activation()... | How to display Changing post link for 24 hours in x category | wordpress |
Update: I managed to get the AJAX working, but not in the click event. I updated the question to match this. I'm trying some code I found on the page: 'AJAX in Plugins' . However I can't get it to work, and I Don't really know where to start looking. It works when I remove the click function and just run the code on pa... | Start from a working code base.. <code> add_action('in_admin_header', 'my_ajax_button'); function my_ajax_button() { echo '<a href="#ajaxthing" class="myajax">Test</a>'; } add_action('admin_head', 'my_action_javascript'); function my_action_javascript() { ?> <script type="text/javascript" > jQuery(... | How can I run AJAX on a button click event? | wordpress |
Can I change the name of the wp-login or wp-admin file so that I can go to a different filename in order to login. I am trying to prevent hackers from finding my login and wp-login has become a very obvious option. | As far as i know you cannot rename wp-admin. Many themes and plugin uses wp-admin in path. So if you rename it then all your plugins and themes will be broken. If you don't want your users to access wp-admin then restrict it using .htacess If anyone access your wp-admin url redirect them to other page using .htaccess f... | Change WP-Login or WP-Admin | wordpress |
I need to add a bit of document ready jQuery to post/page editors in admin. I'm hacking an old plugin that adds a text box to the editor page and handles inserting that text in a template file, but the text input is only html; this document ready function adds the class of mceEditor to the text box. This function works... | I'd be inclined to just do a one off enqueue and be done with it.. It means you have to manage an additional file(the JS file), but when you're writing code it's usually a good idea to create some form of organisation with your files(or at least get into the habit of doing so), ie. javascript/jquery in one folder, css ... | Add a jQuery function to admin pages | wordpress |
I'm trying to display wide image icons from the_post_thumbnail() function. I'm using 'true' value for cropping, but they are not cropped well... I get some strange results with different sizes (I'm trying to use 200width x 150height). If image cannot be display with good proportions (I don't know why whem I'm cropping ... | If the critical dimension is height, you have a couple options: Hard-cropping to the exact width/height: <code> <?php add_image_size( 'wide-image-icon', 200, 150, true ); ?> </code> The hard-crop will create a thumbnail size using the exact dimensions. Be sure that all images have a minimum width/height as what i... | the_post_thumbnail() Custom sizes not display correctly | wordpress |
I think thats what its called... Basically a conditional statement if there are any posts in a specific custom post type/custom taxonomy, show posts, it not show an img or include whatever…? But cycle through a few custom post types? Checking in each if there is a post in the featured custom tax and if not skip on to t... | You can use the <code> have_posts </code> function. For more information, visit The Loop <code> <?php $loop1 = new WP_Query( array( 'post_type' => 'profile', 'profile-type' => 'featured', 'posts_per_page' => '-1' ) ); $loop2 = new WP_Query( array( 'post_type' => 'films', 'film-type' => 'featured', 'po... | Conditional Tag Custom Querys? | wordpress |
If I change my permalink structure, is there is a nice way to handle when people/bots go to the old structure? I presume I can add use .htaccess and write a rule to redirect based on a 301 but is it possible in my case? I currently have site.com/%year%/%month%/%day%/%postname% and I will just want site.com/%category%/%... | Dean's Permalink Migration has always worked for me. Install it before you change your permalinks. | Nicest way to 301 Redirect traffic when changing permalink settings | wordpress |
I am using the theme-options.php file from ThemeShaper: http://themeshaper.com/2010/06/03/sample-theme-options/ I can succesfully add new dropdown options, however when I add a new text input I receieve this error when I view it in the admin area (I added the THEME_DIRECTORY): <code> <br /> <b>Notice</b&... | Wrap the call in an <code> isset() </code> conditional in this line: <code> <input id="cpt_theme_options[cpt_sm_dribbble_handle]" class="regular-text" type="text" name="cpt_theme_options[cpt_sm_dribbble_handle]" value="<?php esc_attr_e($options['cpt_sm_dribbble_handle']); ?>" /> </code> Try something like t... | New custom theme option (text input) giving index error | wordpress |
I want to make the following happen in Wordpress People answer questions in paginated or single page form. Each next set of options is dependent on the option the user selects preiviously At the end, the user is directed to a page which is a common ending for all questionnaire trees. All this questionnaire options can ... | This plugin is capable of doing exactly what you are after http://www.gravityforms.com/ | Non-Linear Questionnaires in Wordpress | wordpress |
Sorry for the simple question. I've published a page. Let's say that I now need to make changes to the page. Can I simply edit it, after it's been published? Or should I use a maintnenace mode? If someone tries to view the page at the same time that I'm editing it, will they be greeted by an error message? Thank you. -... | You can edit the page at any time after it is published. I would not recommend using maintenance mode, as then your entire site will be unavailable while you are editing the page. When you are editing, your site is unaffected until you click "Update" and save the changes to the published post. No users will receive err... | Editing Pages that Have Already Been Published | wordpress |
My goal is to return posts based on a specific price range using <code> meta_query </code> . The price in the admin that the user enters is a custom field, created using WPAlchemy . In the example below, the query would return any posts with a price value between 1000 and 1500: <code> 'meta_query' => array( array( '... | Would it be better to ditch the JS formatter on the input fields in the admin and instead add the dollar sign and comma separation on the front end? Yes, definitely. This seems more logical, but then it raises another question of how to prevent a user entering a dollar sign or comma formatting in the admin. Sanitize th... | How can I modify my meta_query to work with prices that are stored in the database that contain dollar signs and commas? | wordpress |
I've a strange problem with an Autofocus theme. In my templates file, header.php, I've a code like this (and is correct) <code> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> </code> When I... | <code> the_content </code> doesn't affect the <code> DOCTYPE </code> and <code> <html> </code> tags, only the post/page content. One of your plugins, or something else in the theme is either throwing an error, or is printing something earlier than it should. Have you tried: Disabling each plugin one by one and se... | Unwanted blank lines before tag | wordpress |
I'm using <code> get_terms </code> to output a taxonomy's terms, which are all numbers: For example: 4, 6, 8, 10, 12 How can I order these numerically, so they appear exactly as above? What I'm getting is actually: 10, 12, 4, 6, 8 I can see why it's done this (thinks 10 is first because it starts with a 1) but how can ... | I have a plugin, Custom Taxonomy Sort , that allows you to sort taxonomy terms in any order that you might want. After installing the plugin, there will be an order field for each term. It will save these values as integers and will properly sort your taxonomy terms. By default, it will use the order you specify to sor... | How to order a taxonomy's terms numerically, from lowest to highest using get_terms | wordpress |
I'm looking into a way to have global menus across my network of blogs. Basically I am using wordpress as a CMS - the purpose of the network is actually to ringfence content. The sub blogs will be able to customise some areas of the template - but I would like them to share the main site's menu system. This is easy eno... | Try this plugin Network Wide Menu by Ron Rennick . It does exactly what it says: "Implements a network wide menu using a menu in the main site of your network". I tested in WPMU 3.3.1 and it works. Network Activate the plugin or drop the script "ra-network-wide-menu.php" directly in the /mu-plugins/ folder. Follow the ... | global menus made from master site's custom menus wpmu network | wordpress |
My site as of right now is a static website. I am planning on having a 'recent blog posts' section on it, with permalink to the main blog post/blog. example: <code> http://site.com/blog </code> I was wondering, because of having a recent blog posts section on the homepage, should I just have the entire website powered ... | You can do either, it's up to you depending on how invested in your static site you are and how much work you want to do transferring things over. The Codex page on Integrating WordPress with your website outlines how you could have WordPress installed in the /blog directory, and show recent posts on your static site t... | How should I best incorporate WordPress in my static website? | wordpress |
I'm building a WP 3.2 site with a couple of custom post types and taxonomies. I'm calling one of these custom post types programs , and its associated taxonomy is called topics . I'd like to add an item called "Topics" in the site's horizontal navigation, with a dropdown submenu that lists all categories in the topics ... | This is enabled by default if your using <code> wp_nav_menu </code> ( the drag & drop menu's in admin) and have also set <code> show_in_nav_menus </code> to true for your <code> register_taxonomy </code> . To enable them to show go to Admin--> Appearance--> Menus Click "Screen Options" in the top right and you shou... | Can I output a custom taxonomy as a submenu in the site navigation menu? | wordpress |
I am tempted to change my blog to be site.com/postname. I know that for new posts Wordpress is smart enough to add a unique number to them, but what about old posts that would get updated? I can run a database check for duplicates and manually fix them but I was wondering if this was already covered by some Wordpress m... | Any time you have a duplicate slug for a post or taxonomy, WordPress just adds '-2' to the end of the slug. | If the only permalink setting is %postname% what happens in the case of old duplicates? | wordpress |
I have a client who wants to have online application forms for their non profit service. I have used Contact Form 7 in the past, since its pretty flexible and you can have lots of fields, radio buttons etc which I LOVE. The only concern is that just sends a plain text email, they want a way that they can save the data ... | The Contact Form 7 to Database Extension plugin will save the form data to the database. I haven't used it myself, so don't know whether it offers easy ways of then extracting it, or if you have to deal with extracting it yourself. | Detailed form plugin, with ability to export to excel etc. OR edit PDF live? | wordpress |
I'm writing a custom signup script for users to register with on my MU-setup. One problem I'm having is that <code> wpmu_signup_user() </code> sends the password activation email but it doesn't return the user ID which I need for the rest of the script. - It's my understanding that this doesn't create the user account,... | If you want to force add a MU user and activate them, and email them, this will do it. It's a slightly altered version of a piece of the code in user-new.php. <code> wpmu_signup_user( $new_user_login, $new_user_email, array( 'add_to_blog' => $blogid, 'new_role' => $role ) ); $key = $wpdb->get_var( $wpdb->pr... | Need to manually regsiter user, send the password and retreive their user ID | wordpress |
Now I've never really used Wordpress with more than one author and it's usually been myself so I've followed no editorial process, but with my new site, I'm looking to add a handful of users to the Author role. I understand there's many roles with different permissions within Wordpress already, but I can't seem to find... | Yes that's the default behavior. When an "author" writes a post, he cannot publish it, only an "editor" (or higher) can do the publishing action. As for email notification, there are a couple of plugins for that, here are two : WP Status Notifier WP Pending Post Notifier | Editorial Process | wordpress |
I want to edit the default function <code> the_content() </code> . I know i can <code> add_filter('the_content', 'with_my_function') </code> but im having trouble outputting the old content with mine. Heres an example of what im doing. <code> add_filter('the_content', 'my_function'); function my_function() { $write = '... | Not exactly sure what you are trying to accomplish, but it looks like you are trying to prepend something to the beginning of the_content. Try this: <code> add_filter('the_content', 'se24265_my_function'); function se24265_my_function( $content ) { $write = 'hello world'; $new_content = $write . $content; return $new_c... | Edit the_content function | wordpress |
Can anyone help me filter wp_get_attachment_link so that a particular occurence of it links to the 'medium' or other size image rather than the full size. I have the following in a page template: <code> $args = array( 'post_type' => 'attachment', 'numberposts' => -1, 'post_status' => null, 'post_parent' => ... | I think I've answered my own question sort of.... As I was using a child theme of Hybrid I activated the cleaner gallery extension in the functions.php file: <code> add_theme_support( 'cleaner-gallery' ); </code> Then, based on the topic here I created my own filter: <code> add_filter( 'cleaner_gallery_image', 'my_gall... | Change image link: wp_get_attachment_link | wordpress |
I'm using wordpress 3.0 with buddypress. I need to enlarge the file size that is being uploaded from the media section in the admin menu. We have tried many ways including the methods from this link but nothing made it larger than a 1 mega. Is there a different way to do it? Thanks | If you are using multisite make sure you set "Max upload file size" to some higher limit. Network Admin -> Settings -> Network settings -> Upload settings -> Max upload file size | How to enlarge the media file upload size in wordpress admin | wordpress |
So, I was thinking I'd use WordPress' Bookmarks/Links content type to populate a slider... ...Except there are a grand total of four functions interacting with this part of WordPress. I don't think you can even access these with a WP_Query object, and it seems all date-related data attached to these is in relation to t... | As far as I know it's not possible to query the links directly, but there is definetly a <code> link_updated </code> field in the wp_links table, so you can use <code> wpdb </code> to interact with it and return the latest (modified) links. There's also a solution stackexchange-url ("here"). EDIT : Updating a link does... | Getting only the most recent bookmark? | wordpress |
Did I use custom enough in the title? Here is a quick explanation of what I am doing. I am creating a genealogy site and I have a custom post type called "Ancestor" In this post type there is quite a bit of information that is going into custom fields. To make it more user friendly, I've created a few custom meta boxes... | I suggest to use WP Alchemy Metabox . What you are looking for is the have_fields_and_multi . | Adding a custom "Add Custom Field" button to Custom Meta boxes | wordpress |
I'm trying to create a settings page. If I print things within index, I can see it. If I try to include it, I can't see anything, neither errors. <code> add_options_page('My Plugin', 'My Plugin', 'manage_options', 'my-plugin', array('MyPluginSettings', 'index')); </code> my settings: <code> class MyPluginSettings { pub... | Most likely the file cannot be found, I'm assuming the file you're trying to include is located in your theme folder, in that case you should use: <code> require_once( TEMPLATEPATH . '/file.php'); </code> <code> TEMPLATEPATH </code> will return something like this: <code> /home/user/httdocs/wp-content/themes/twentyelev... | I cannot include a file in my plugin settings page | wordpress |
I am trying to add a stylesheet when users are accessing the blog section of my site from and iPad. The first snippet of code works, however, I don't want to use the absolute path. I want to use wordpress's function. <code> function ipad_css() { if( preg_match('/ipad/i',$_SERVER['HTTP_USER_AGENT'])) {?> <link rel... | Try replacing <code> <?php bloginfo('template_directory'); ?> </code> with <code> <?php echo get_template_directory_uri(); ?> </code> Also, I wouldn't hook it to the <code> init </code> action, why don't use <code> wp_print_styles </code> instead? It is a style after all. | Alternate stylesheet only works with absolute address for link? | wordpress |
For the past two weeks I've been looking for a way to create a query in wordpress that returns all custom post types where a meta_key "mytype-expired" is NOT set to "yes" and then order the results by a second meta_key called "mytype-sort-order" with the highest number value coming first. If no value exists in the "myt... | Though it might take some tweaking you can use the 'orderby' parameter on multiple values. The difficulty here is more in terms of logic, for example July 3 (date value) and the number 10 (meta value) do not really relate to one another, this would cause problems if not formatted correctly. You best bet is to convert t... | Custom query looking at multiple custom fields and properly sorting | wordpress |
For a page template I am trying to include the 3 children of each page. That works fine. However as I want to include a different image for each of the children, I would like to add the <code> slug </code> of each child to the <code> li </code> on the parent page. I found something that places the <code> slug </code> o... | OK, I almost got it now... I extended the Walker_Page Class: <code> class Walker_Child_Classes extends Walker_page { function start_el(&$output, $page, $depth, $args, $current_page) { if ( $depth ) $indent = str_repeat("\t", $depth); else $indent = ''; extract($args, EXTR_SKIP); $output .= $indent . '<li class="... | add slug of child(ren) to li using wp_list_pages | wordpress |
In my wordpress enviroment, I have a number of pages, and I also have a custom post type called casestudy. I have setup a page-clients.php that has some of it's own content on, I then use the <code> query_posts() </code> function to pull in all the posts with the post type casestudy. When viewing a single case study I ... | The <code> wp_list_pages() </code> function uses <code> get_pages() </code> , which accepts a <code> post_type </code> argument-array key, so you can use that same argument array key in `wp_list_pages(): <code> <?php wp_list_pages( array( 'post_type' => 'casestudy' ) ); ?> </code> Unfortunately, it looks like ... | wordpress wp_list_pages help | wordpress |
I always assumed there was a way to exclude certain categories from being output in the loop using <code> get_the_category </code> , <code> the_category </code> , or one of the <code> term </code> related functions. After looking around it seems like the only way is to grab the array and just remove them by ID or name.... | If the URL being "hard-coded" is the problem you can use <code> get_category_link </code> <code> foreach((get_the_category()) as $cat) { if ($cat->cat_ID !='12') echo '<a href="'.get_category_link($cat->cat_ID).'"> | ' . $cat->cat_name . '</a>'; } </code> | Better way to exclude category output for post/pages? | wordpress |
I'm a bit of a PHP MySQL newb but i feel i need to bypass WordPress for the frontend of a site i'm building (it is mainly just RSS and JSON feeds). I was wondering if there are any tutorials or advice I should follow on this or just cut straight to it? | You want to include <code> wp-load.php </code> at the beginning of your script/page like this : <code> require_once("/path/to/wordpress/wp-load.php"); </code> You then have access to any WP functions. To manipulate the DB directly, have a look at <code> wpdb </code> . | WordPress as a backend only. How to output database content on public side without WordPress? | wordpress |
I've been trying to decipher a way to display a message to a user on first login and can't seem to get it to work. I'm not sure what I'm missing, or if there's something else I need to do. Any help would be appreciated. I feel like I missing something here. <code> function ap_new_user_message() { $current_user = wp_get... | here's an example that hooks login_redirect and checks when their account was created, then redirects them to a url of your choice if it's been less than 48 hours: <code> function my_redirect( $to, $requested, $user ){ if( !isset( $user->user_login ) ){ // we only want this to run when credentials have been supplied... | Redirecting or displaying a message on first login | wordpress |
I just definsed at Setting> Reading a page I have created called "home" as my homepage. The change was ok, but since them all my internal pages url shows an extra /home/in their urls. How can I avoid it? Examples: Before: www.mydomain/internalpage/ After the change: www.mydomain* /home/ *internalpage/ | What @iampearce said is basically right, but to be a bit more specific: look in Settings > Pewrmalinks. Choose one of the defaults - maybe %year%/%postname% - and click Save. Does that help? If that doesn't fix it, look in Settings > Reading and check that the "front page" and the "posts page" are not set to the same p... | How to exclude my home page from url of my internal pages? | wordpress |
Is there a query I can run on my wordpress database so that I can change all instances of <code> www.mydomain.com </code> to <code> localhost/mylocalsite.com? </code> | Try this plugin: http://wordpress.org/extend/plugins/search-and-replace/ - It helped me dozens of times. Or try this query: <code> UPDATE tablename SET tablefield = replace(tablefield, "findstring", "replacestring"); </code> Or try this method, dump the database, open the SQL file, do a find and replace in a text edito... | Rewrite database urls | wordpress |
I have my WordPress blog up and running on an IIS7 server and I installed W3 Total Cache. At some point prior to WordPress 3.2 upgrade, everything seemed to be working, but since then (and quite possibly, some plugin installations) all it does is add a single <code> <meta> </code> tag after the <code> <head>... | After more investigation last night, I discovered the problem lay in a malformed PHP file within my very simple child theme. The child theme was just a stylesheet and a PHP file, so it wasn't difficult to determine where the problem lay within the theme. A quick look at the PHP showed that it included just <code> <?... | W3 Total Cache and IIS7 not doing much | wordpress |
I am making a plugin that needs a page that can be accessed from the outside, pretty much like an API, and have the url like so, http://xxxxx/custom_method?parameter=xxxxx&something=xxxx is there a clean way to do this? Thanks in advance. | The WordPress Way of doing it is using <code> query_vars </code> so first you add you vars to the array: <code> //add to query vars function add_query_vars($vars) { $new_vars = array('custom_method','cm_parameter'); $vars = $new_vars + $vars; return $vars; } add_filter('query_vars', 'add_query_vars'); </code> then you ... | Custom routing for plugins | wordpress |
I've customized a theme and am having some problems with search results using multiple-word queries. Site is live at www.abetterworldbydesign.com Searching for a single word works as expected. Searching for multiple words that should have returned results shows blank results. Oddly enough, manually changing the "+" cha... | Answer from Richard M on the stackexchange-url ("question originally asked on StackOverflow"): Replacing line 21 on search.php with <code> $search_query[$query_split[0]] = urldecode($query_split[1]) </code> resolved it. | Search Results not displaying for multiple word search | wordpress |
I have added query_posts() to my index.php file to modify the loop on the posts page: <code> query_posts( 'cat=-4,-7' ); get_template_part( 'loop', 'index' ); </code> This works correctly, but when I click on "Older Posts" (link to /page/2), the latest posts show up instead of the previous ones. How can I get my pagina... | different approach: <code> global $wp_query; $args = array_merge( $wp_query->query, array( 'category__not_in' => array(4,7) ) ); query_posts( $args ); get_template_part( 'loop', 'index' ); </code> if this approach should not work, please check if one or more of the plugins is interfering - deactivate all plugins;... | Pagination Not Working When Modifying Loop Based on Post Category | wordpress |
I notice that in some plugins you can override functions by ... Creating an uploads folder Creating a folder with the plugin name Using the following code <code> if (!function_exists('function_name')) { function function_name() { } } </code> Is this standard for all Wordpress plugins or only if they're written in a spe... | If the plugin displays content via any function, the code: <code> if(!function_exists('function_name')) function_name(); </code> ... is used for safety. If your plugin is disabled, and the <code> if (!function_exists('function_name')) </code> is missing, your theme will throw a fatal error. | Overriding functions in wordpress plugins | wordpress |
Just wondering, If any body have integrated Chase Paymentech Payment Gateway with WordPress for Shopping Cart purpose? | The best source for information on this is the getshopped.org/forums/ forums. It appears that there are a couple of posts regarding this gateway in the forums, but the forums appear down at the moment. Also, getshopped.org maintains a directory of developers that can help you develop a new payment gateway. These gatewa... | Wordpress Ecommerce Chase Paymentech Integration | wordpress |
I'm looking for a plugin that pulls an Image from a Wordpress Posts Gallery (Note NOT the Featured Thumbnail, we have thousands of posts and can't retroactively go back and set a Featured image for each post..) Also some of the plugins I've tested don't let you specify exact dimensions, the Wordpress Get The Image Plug... | No need for plugins. Some simple code in your theme can do this job. You can get any size image by passing an array of width and height for the size parameters, but to get a cropped image, you have to predefine it as an premade image size so that the crop gets created properly at upload time. To do that, in your theme'... | Getting top Image From the Gallery and printing out a thumbnail with Exact Dimensions | wordpress |
I have imported some tables from my online wordpress database to my local to work on. However now I am getting some weird sql errors that I don't get online. I can see that the code of the plugin I am working on has some references (aliases?) that don't appear to reference anything that I see when I do a search: <code>... | 're' is the alias you give to EVENT_ESPRESSO_RECURRENCE_TABLE. The error you're seeing is probably because the EVENT_ESPRESSO_RECURRENCE_TABLE constant isn't defined. Do a <code> var_dump( $wpdb->last_query ) </code> just below that code to see the final SQL statement. | Wordpress tables and aliases? | wordpress |
Here's my code: <code> function widget($args, $options) { extract($args); global $post; $post_type = $options['post_type']; $num_of_posts = $options['limit']; // Create a new instance $second_query = new WP_Query( array( 'post_type' => "$post_type", 'posts_per_page' => "$num_of_posts", 'post_status' => 'publis... | Try just get_the_post_thumbnail(). Leave the $post-> ID out of it. Edit: Never mind, get_the_post_thumbnail does require the ID. I'd use the get_the_ID() function instead of $post-> ID, but that shouldn't matter. | get_the_post_thumbnail() returns nothing? | wordpress |
Encountered an infuriating issue where I f i want to add multiple linebreaks for layout between paragraphs, Wordpress doesn't recognize them in th wysiwig editor. If I enter them in the code window, and publish they DO save, but the next time the Wysiwig is edited and published those breaks disappear. is there a workar... | I use TinyMce Advanced. In the TinyMce Advanced settings it gives you to the choice to stop removing the line-breaks. You might give it a try. This is the first plug-in I install after adding a WP Website. Link: http://wordpress.org/extend/plugins/tinymce-advanced/ | Wordpress Tiny MCE won't accept line breaks | wordpress |
This question is similar to stackexchange-url ("Multisite with entirely different domains?") which was not answered. I am re-asking. I want to host multiple domains using WP multisite, which is installed and working normally in "multiple subdomains" mode. This creates multiple WP sites like <code> site1.domain.com site... | Domain mapping is the correct answer to your question, because that isn't how the domain mapping plugin works at all. Take a look at http://ottopress.com . It really lives at http://ottodestruct.com/op/ , but you wouldn't know it, would you? It's a domain mapped site on a multisite installation. If you're getting a red... | Multisite with Different Domains | wordpress |
How can I allow people to post comments on a page? I've put this into my page template: <code> <?php comments_template(); ?> </code> but it just says at the bottom of my page "Comments closed". UPDATE: If I can allow comments for one specific template for a page that would be great. | Have you checked under Admin -> Settings -> Discussion and for individual pages, under pages and quick-edit or the discussion area in edit page below the page editor? When the last one does not show, click screen options near the top right, and tick discussion there, then scroll back down. | How can I add comments to a page? | wordpress |
I am looking into having the two following roles: Editor Publisher and the following different states a post can be in: Draft Ready for publication Published The workflow I am seeking is: An editor writes a blogpost. It is a draft . Once it is final, the editor marks ist as ready for publication . From that moment on, ... | Allow me to translate the roles and states into WP parlance: Roles: Editor -> Author Publisher -> Editor States: Draft -> Draft Ready for publication -> Pending Review Published -> Published The only thing you need a plugin for is this bit: "From that moment on, the author looses the ability to edit the blogpost." | Publication Workflow | wordpress |
I'm trying to empty an option created with the Settings API and failing. <code> update_option ( 'my_option', '' ); </code> appears to do nothing, whereas <code> delete_option ( 'my_option' ); </code> destroys the whole option causing other problems. I just want to empty the values and reset it. I'm really clueless how ... | If you wrote your code correctly, then delete_option would be the correct way. The question isn't how to clear the option; the question is how to structure your code such that the "option does not exist" case is a valid case. Think about it. The first time you start this code, that option isn't going to exist at all, r... | What's the best method for emptying an option created with the Settings API? | wordpress |
I would like to hook the keydown event in the TinyMCE Editor on the edit post admin page. I managed to hook the HTML content editor using the following code: <code> jQuery('#content').keydown(function(){ alert("keydown") }); </code> Here is my failed attempt at hooking the TinyMCE editor. The problem is that the editor... | the TinyMCE Editor has its own keydown event handler and its hooked to a function on initiation so to do that you can create a tinymce plugin or use the wordpress initiation of it with <code> tiny_mce_before_init </code> hook like this: <code> add_filter( 'tiny_mce_before_init', 'wpse24113_tiny_mce_before_init' ); func... | Hook the Keydown Event in the TinyMCE Post Editor | wordpress |
We have a pretty basic load balancing setup with 3 web servers behind a load balancer connected to the same db server and pointing their wp-content/uploads folder to an nfs share. We have the first server rsynching the wordpress files across the other 2 in a cron job to keep the servers in sync (all wp-admin stuff is d... | I don't think the database schema ever changes so drastically that the versions of wordpress on box 2 + 3 would be prevented from reading from the DB after you've updated on box 1, however it depends what version you are upgrading from. Why not set a similar environment locally and test upgrading site 1, while still tr... | Updating servers at once in web cluster | wordpress |
I want to add a field to the comments and have used these codes. functions.php <code> function my_fields($fields) { $fields['url2'] = '<p class="comment-form-url2"> <label for="url2">URL hittad på webben</label> <input id="url2" name="url2" type="text" value="" size="30" /> </p>'; return $... | There are a couple other hooks in the comment form that you can use. Where you're hooking on only displays if the user isn't logged in. If you want that field for all users (logged in or not), you need to add your form by hooking into both <code> comment_form_after_fields </code> and <code> comment_form_logged_in_after... | Using filter to add additional fields to comment_form() | wordpress |
An image speaks for a thousand words so please bear with me: http://interativo.modateca-sc.com/ The last post appears twice. Once as the feature post and then again on the "main blog part" where the ten or so latest posts appear. Is there a way to make it not appear again? Thanks :) | Go to the code of "Main blog part", loop.php i guess... or any code your theme uses.. Find get_posts and use exclude parameter to exclude the post from there. Pass id of featured post as exclude... Here is reference... http://codex.wordpress.org/Template_Tags/get_posts | How *not* to show the last post on the latest posts list | wordpress |
I am using a custom login form imported on my theme's home page through jqModal. In that, when i successfully login it redirects to the same page. I want to redirect based on the logged in user role. I will prefer a response with some editing in my functions.php or adding a mini plugin. Because I dont want wordpress or... | I used Theme My Login Plugin and modified its templates as per my requirements. I think its the best plugin as per my requirements were concerned. You may check yours. Also if you want to see the working inside the code, this plugin coding approach is nice and adaptive. | wordpress custom login successful redirect hook | wordpress |
I am in very big need of a user management system just like the one that wordpress uses but without being blog related. I need to be able to manage users and apply certain privileges depending on user level. I tried to take apart the WP engine and take out the users part but I think it's so tied to the whole engine, I ... | you can still use WordPress and disable the front end functionality, or like @OneTrickPony suggested you can try BackPress which is a PHP library of core functionality for web applications that grew out of WordPress. | User management system similar to wordpress one? | wordpress |
I have custom post type 'Product', and 2 custom taxonomies 'category' and 'product status'. What i am trying to do is list categories in page template and show how many total products in category and how many of them have status 'available' Some thing like this Category | No. of products | Products available Can any on... | I'm sure that a custom sql query would work much better but here is an option using the WordPress Tools available <code> //first get all categories $categories = get_terms( 'category', array( 'orderby' => 'count', )); //then create an array for easier processing foreach ( $categories as $cat ) { $slugs[] = $cat->... | query multiple taxonomy and show post count | wordpress |
I have to run a PHP script through real cron (WP cron being too unreliable). Within that script, I need $wpdb to insert data into WordPress table. But of course $wpdb will not be available as WordPress would not be initialized. Right? So, my question is how to 'include' WordPress/initialize WordPress environment to do ... | You can use real cron to trigger WP cron - by fetching <code> wp-cron.php </code> file from root ( snippet from quick google search ). That will take care of environment and everything. | Initialize WordPress environment to use in a real cron script | wordpress |
I would like a second <code> WP_Query </code> on a custom post type's single page to return 5 posts, starting with two before the current post, so that I get this: The-one-before-the-previous post Previous post Current post Next post The-one-after-the-next post How can I do this? <code> offset </code> is only good if I... | Instead of using the <code> offset </code> parameter, take a look at the <code> post_where </code> filter examples under the Time Parameters section of WP_Query codex page . You could just add a filter that returns posts that are less than the current post's date. | How to make a second query offset -2 from current post | wordpress |
I am trying to get paging to work on my future post loop, but to no avail. I am getting no links, when I expect them at the bottom, for pagination despite there being several valid posts in the database. <code> <?php $args = array( 'post_type' => 'program', 'paged' => get_query_var('paged') ? get_query_var('pa... | Adjacent post fetching relies on quite a bit of custom SQL inside. One of the assumptions it makes in that SQL is that you are only looking for published post. You can use filter in <code> get_adjacent_post() </code> (that is used internally by those next/previous functions) to alter the query and get rid of published ... | Paging on a future post loop? | wordpress |
I'm working on a custom theme that I've inherited to maintain. At the top of the homepage there is a header area with some images generated by <code> get_the_post_thumbnail </code> . The call to <code> get_the_post_thumbnail </code> outputs img objects that are set to a specific width/height by their html attributes. H... | You can look at adding an image size to your themes <code> functions.php </code> file. http://codex.wordpress.org/Function_Reference/add_image_size You then just need to do <code> <?php the_post_thumbnail('image-size-name'); ?> </code> and it will pull out the image based on the sizes you set. | img width and height attributes being set by get_the_post_thumbnail | wordpress |
my question is... I have 2 pages & 2 subpages in each page. like: page1 --> subpage1 --> subpage2 page2 --> subpage1 --> subpage2 & my Menu is Page1 page2 Now if i select subpage1(from page1) means the page1 need to active and highlight the menu. if i select subpage1(from page2) means it need to highlight page2... | To highlight page 1 and page 2 use <code> current-menu-parent </code> class | Active Menu Highlighter with Subpages? | wordpress |
I'm trying to add/ update additional values to an option created with the Settings API. I'm trying to do this with my validation callback function, but I'm not getting very far. Here is my code: <code> function tccl_settings_option_validate( $input ) { add_option( 'tccl_settings_option', $input ); } </code> This is cau... | Get the option, modify only the values you need to modify in it, then return the results. <code> function tccl_settings_option_validate( $input ) { $options = get_option('tccl_settings_option'); // modify $options using data from $input as needed return $options; } </code> | Using the Settings API, how should I add multiple values to an option? | wordpress |
Can anyone recommend plugin that I can use to add a table to a page? I've seen ones that use static data-- you hardcode the figures in the table. I want to pull the data from a custom db table and put it in a table. I looked at WP Table Reloaded , but I'm not sure whether, it's possible to use it with dynamic data. Any... | Set up a custom page template and in the content of the template use WPDB to query your table. Example to get a row: <code> $mylink = $wpdb->get_row("SELECT * FROM $wpdb->links WHERE link_id = 10"); </code> | Recommendation for a Dynamic Table Plugin | wordpress |
I would like to exclude a category from my categories sidebar widget. If I understand the way this works, the sidebar.php code is not in use since the widget is displaying the categories. (something similar was discussed in this support topic: http://wordpress.org/support/topic/problem-trying-to-hide-a-category-in-the-... | I'll answer my own question so that the results are in the discussion thread. All of the suggestions I've seen don't seem to work with the current version of WordPress (3.2). There are some widgets which will execute PHP script directly, used in conjunction with the correct query, this qualifies as a solution. Plugins ... | Customize category query in widget | wordpress |
I used stackexchange-url ("Mixing custom post type and taxonomy rewrite structures?") and http://wordpress.org/support/topic/set-category-to-a-custom-post-type-automatically?replies=10 to create my custom post type. But I am getting some headers already sent errors on my site. Specifically when I go to save a page or t... | This happened to a site a friend of mine was working on. Whats weird is that he deleted the problematic file and copied paste the code into a new php file. It seemed to do the trick. worth a shot? | Custom Post Type Rewrite Throws Headers Sent Errors | wordpress |
Is there a way to update Wordpress without the use of FTP, but with SFTP (which uses SSH)? I've only got my server set up for SSH access (and therefore SCP/SFTP). | Configuration instructions in Codex on Enabling SSH Upgrade Access refer to this tutorial WordPress Tutorial: Using SSH to Install/Upgrade . | Update Wordpress with SFTP instead of FTP | wordpress |
Ok, I have a custom post type to store list of urls. I would like to print those urls with serial numbers. I used foreach loop. <code> foreach($urls as $url){ echo $url; </code> I got n number of urls as output. But i want to print serial numbers in each url like 1,2,3 and so on. I don't want to use unordered list. Bec... | How about: <code> echo '<ul>'; $sn_count = 1; foreach($urls as $url){ echo '<li><span class="serial-number">'.$sn_count.'</span> '.$url .'</li>'; $sn_count++; } echo '</ul>'; </code> You can then style your serial numbers with the <code> serial-number </code> class. | How to display serial numbers in foreach loop while querying posts? | wordpress |
Is there a plugin for wordpress that can help a user to view and manage the crons that are currently schdeuled in WordPress? I have looked into Core control but doesn't allow the user to manage the cron jobs. | WP-Crontrol. http://wordpress.org/extend/plugins/wp-crontrol/ | Development plugin to view and manage scheduled wordpress cron jobs? | wordpress |
There is some way to get notifications when deprecated API elements are used in WordPress. How is it done? Put WordPress in debug mode (which also shows all other types of errors) or is there another method that shows only API related errors? | Just install the Log Deprecated Notices plugin. | How to receive notification of deprecated API elements and functions? | wordpress |
My wordpress theme has a custom post-type. Only editors (and higher) should be allowed to use this post type. I did this with: <code> function add_capability($role,$cap) { $role_obj = get_role($role); // get the the role object $role_obj -> add_cap($cap); // add $cap capability to this role object } function set_cpt... | If you use the Members plugin, you can set it up like you want. It also has the possibility to add custom roles (your <code> edit_cpt </code> and so on) also a lot of plugins also work that way: <code> <?php if ( current_user_can('manage_options') ) { do_something(); } ?> </code> | grant a privilege for roles (for example editors) and higher | wordpress |
I am using a couple of wordpress plugins for my theme, enabling them programmatically. I would not want the user of my theme to be bugged with plugin updates for these plugins, as well as viewing them in the wordpress admin panel plugins lists. Is there a way to exclude these plugins from automatic version checker and ... | RE: Excluding plugins from update checks Yes you can exclude plugins from the update checker, there's no pretty solution, ie. no convenient filter to just say, here exclude these for me, but it can be done, Mark Jaquith did a blog on it a while back(and it is a relatively easy solution). <code> /** * FOR PLUGINS */ fun... | Hide wordpress plugins from list | wordpress |
I'm wondering if it's possible through a plugin, or otherwise, to allow people to register on my WordPress site for an account. And then through my control panel, I can manage their accounts. Here's a little backstory of what I'm trying to accomplish. My client runs a dance competition. They would like to be able to up... | you can achieve this very easily with simple using my plugin User Specific Content which lets you display specific content per user name, user id or by user role. | User Login System with File Delivery? | wordpress |
I am using the latest wordpress 3.2.1. I would like to let create a new admin to do ONLY this: 1) Manage order to change the order status to (e.g. approve..reject). 2) Able to view user only without the ability to Edit or Delete. 3) Accept email notification on new registered user and new order. This would meant that w... | Try this plugin: http://wordpress.org/extend/plugins/user-role-editor/ | Show limited menu to admin | wordpress |
I'm trying to restrict the number of widgets from the "wp_inactive_widgets" sidebar to maximum 10, because the widgets admin page is incredibly slow: <code> add_filter('pre_update_option_sidebars_widgets', 'cleanup_inactive_widgets', 10, 2); function cleanup_inactive_widgets($new, $old){ if(!empty($new['wp_inactive_wid... | Tested under v3.2.1: <code> $sidebars = wp_get_sidebars_widgets(); if(count($sidebars['wp_inactive_widgets']) > 10){ $new_inactive = array_slice($sidebars['wp_inactive_widgets'],-10,10); // remove the dead widget options $dead_inactive = array_slice($sidebars['wp_inactive_widgets'],0,count($sidebars['wp_inactive_wid... | Limit the number of inactive widgets | wordpress |
I'm creating an age select menu in the admin, populated from a taxonomy of <code> age </code> . The taxonomy is hierarchical as follows: 18-25 (parent, ID 183) 18 (child) 19 20 21 22 23 24 25 26-30 (parent, ID 184) 26 27 28 29 30 I would like to only list the children (18, 19 etc) and not the parents (18-25, 26-30) etc... | This should work for you: <code> $taxonomyName = "age"; //This gets top layer terms only. This is done by setting parent to 0. $parent_terms = get_terms($taxonomyName, array('parent' => 0, 'orderby' => 'slug', 'hide_empty' => false)); echo '<ul>'; foreach ($parent_terms as $pterm) { //Get the Child terms... | How to only list the child terms of a taxonomy and not their parents? | wordpress |
My client has a post type that uses a lot taxonomies. I plan to put this script in a post meta box and hide the existing taxonomies. Do you know of a great wp_set_post_terms example? I want to make this: Look like this: Related functions? wp_update_term | Name your fields like <code> car_specs[taxonomy_name] </code> , then within "save_post" just do: <code> foreach($_POST['car_specs'] as $tax => $term) if(taxonomy_exists($tax)) // && term_exists($term, $tax) wp_set_post_terms($post_id, $term, $tax); </code> Personally I wouldn't use WordPress for a auto class... | wp_set_post_terms example? | wordpress |
Problem is that $today is pulling GMT from the database; I need to offset GMT by -6 hours; Have been unable to find a query with an offset like that. <code> <?php $paged = ( get_query_var('paged') ) ? get_query_var('paged') : 1; $today = date('Y-m-d'); query_posts(array( 'post_type' => 'performance', 'posts_per_p... | Is WP set to that -6 offset you need? In that case try <code> date_i18n() </code> to generate your date instead of <code> date() </code> . | How do I add a timezone offset to this query? | wordpress |
Is it possible for two separate blogs running on the same multisite installation to share tables in the database? By default, Wordpress adds the blog ID to the table prefix for all of the associated tables such that blog #1's posts are stored in the <code> wp_1_posts </code> table, blog #2's posts in the <code> wp_2_po... | You can switch back and forth between blogs on a multisite with <code> switch_to_blog </code> and <code> restore_current_blog </code> . That should allow you to get anything you'd like and make queries as if you were actually on the other blog. Check them out: http://codex.wordpress.org/WPMU_Functions/switch_to_blog ht... | Share DB tables between two blogs on the same WP Multisite installation | wordpress |
I would like to start a single WordPress Blog. As I already have some experience with one provider and as it is really cheap, I would like to use the same service for my planned blog. They offer: 1 GB webspace : I will not upload many big pictures and I guess almost no audio/video files, so I guess this is more than en... | I would now like to know if it is easily possible to update wordpress when I only have FTP-access and phpMyAdmin. WordPress has automatic update feature , that will do its best to perform update without you having to upload new version manually. It is not perfect, but it is quite robust and works on most configurations... | Requirements for hosting a single WordPress Blog (upgrades / backups) | wordpress |
Is there any way to create a simple user session on Wordpress, like a mini-membership kind of thing? Would this conflict with WP's general user sessions, or is it possible to set up a simple uesr/pass combo in your database and use this to create a sub-membership system? | Instead of forcing Wordpress to have a custom membership system, if you want to use your own small membership feature, then you may not have to use sessions at all. For instance, if you want to password protect a specific set of pages, you could make one page require authentication, using a username and password like y... | New User Sessions in Wordpress? | wordpress |
I'm building a custom front end form for my theme and I'd like to use the Wordpress TinyMCE Rich Text Editor for it. Is there an easy way to invoke it? Thanks! | Yes, use the code: <code> wp_enqueue_script('tiny_mce'); </code> This will include the TinyMCE javascript. Then simply use TinyMCE as you wish <code> <script type="text/javascript"> tinyMCE.init({ mode : "textareas", theme : "advanced", plugins : "autolink,lists,spellchecker,pagebreak,style,layer,table,save,advhr... | Insert Rich Text Editor in theme? | wordpress |
How can I find the page which was last modified on 2011-07-20T20:48:16+00:00 other than opening every page? | Okay, I've got it. I looked in wp_posts table in phpmyadmin, clicked on the post_modified column to get it in chronological order, and looked for the appropriate datetime. | Find Page Last Modified at Certain Date & Time | wordpress |
Hi I am new to wordpress. Kinda going through different themes that is available. I like on, which is Oulipo , but it doesn't have any e-mail subscription feature. I am using free wordpress hosting. I know may be this question is too silly but I don't understand how to add it. As I have heard free word press hosting do... | Many plugins currently available allow you to enable this feature on your site. My favorite is Jetpack Subscriptions for reasons including: Very much up-to-date, well-maintained plugin Emails sent from WordPress.com servers, so there's absolutely no load on your servers (Make sure you disable all the unnecessary module... | How do I add e-mail subscription functionality | wordpress |
I'm definitely a rookie WordPress/PHP developer, so please forgive ignorance :-) Q: How do I format a date/time returned from a custom query against $wpdb? Here's the scenario: I'm trying to write a page which displays some simple statistics about my blog. One of the statistics I'm showing is the most popular posts, as... | A much simpler method to bypass these issues is using WP_Query : <code> $popularQuery = array('orderby' => 'comment_count', 'posts_per_page' => '-1', 'author' => 1); $popularPosts = new WP_Query($popularQuery); while($popularPosts->have_posts()) : $popularPosts->the_post(); ?> <tr> <td><... | Formatting a date/time returned from a custom $wpdb query | wordpress |
I'm importing posts from a Joomla v1.5 site using http://wordpress.org/extend/plugins/joomla-15-importer/ (The goal is to clone the site in WordPress then switch off Joomla) On both sites the permalink structure is /%category%/%post_id%-%postname%/ Of course, when I import I am getting a different post ID in WordPress ... | <code> wp_insert_post() </code> function in WP accepts special <code> import_id </code> field in arguments and will try to use that ID, rather than automatically generating new one. This is easy to use when writing import code yourself, but I have no idea how easy would it be to with that plugin. You could try suggesti... | How to change Post ID during import | wordpress |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.