question
stringlengths
0
34.8k
answer
stringlengths
0
28.3k
title
stringlengths
7
150
forum_tag
stringclasses
12 values
I'm looking for a plugin that gives me some on-the-fly syntax highlighting in the HTML editor of posts and pages. I swear I've seen it somewhere, but I can't find it, all the ones I find are for showing it nicely on the front-end of the post/page to users. In case it's not clear, I Would like to have my HTML editor tab...
Try http://wordpress.org/extend/plugins/syntaxhighlighter/
Which plugin gives me pretty html syntax in the editor/dashboard?
wordpress
I am using a theme that comes with several different font stylings for headers and text. However there is no simple way to apply these classes inside the editor. How can I enable a drop down similar to TinyMCE that allows me to select text and apply a class/style to it in order to have my marketing and sales department...
You'll need two code snippets. The first puts the select menu there. The second populates it. This is based on this tutorial , but slimmed down a bit. <code> add_filter( 'mce_buttons_2', 'mrw_mce_bad_buttons' ); add_filter( 'tiny_mce_before_init', 'mrw_mce_init' ); function my_mce_buttons() { return array('formatselect...
Apply Classes to post text inside editor
wordpress
i got an options page that needs to affects a certain (for now) css value.. i have about using php variables in css and creating custom global variables in wordpress but havent something easy enough to understand so i have done this and places it in my header file <code> &lt;style type="text/css"&gt; .current-menu-item...
You are doing it correctly. I would suggest two enhancements: Do not put this code directly in header.php. Create a custom function to print the css and hook this into the wp_head action. Always sanitize/escape input before you print it to the screen. Look into ctype_xdigit() for creating a custom function to sanitize ...
Getting values from options page to css
wordpress
I'm developing a simple plugin for letting a user insert a post from the frontend. I have a shortcode [add-post] which a user can put on any page, say, for eg. My Wall Page Now on My Wall Page a simple form comes up which has a title field, a content field and a category select field so that user can choose which categ...
You don't need to hook into an action for a shortcode - adding the shortcode using <code> add_shortcode() </code> will make it run when you call <code> the_content() </code> . That said, your function for your shortcode needs to return your output, not just echo it outright. Otherwise you will find that your form will ...
add action for displaying posts using a shortcode
wordpress
I am developing a plugin, but during the activation phrase I am constantly facing bugs. However there is no easy way to display error messages, since echoing stuff would result in 'unexpacted output' error. I tried the admin_message hook but it doesn't work. How can I alert the user if some stage of the activation has ...
For testing purposes you can use the log system (php_error.log): <code> error_log('Plugin activated', 0); // Check for DB table existance if(!$this-&gt;hasDBTable()){ error_log('Database not present', 0); if($this-&gt;createCELabelsDBTables()){ error_log('Database was created.', 0); } else { error_log('Error creating t...
How to output message during plugin activation
wordpress
I need to determine whether the reading settings are set to use a static page or the latest post for the front page. Is there a conditional that will return true if the front page is set to show a static page? I don't need to check what page the static page might be, just if its a static page at all. For this scenario ...
Your conditional logic makes sense as well but you're probably looking for this: <code> if ( 'page' == get_option('show_on_front') ) { // do something } </code> Hint: You can append <code> options.php </code> to the WordpPress admin url like this: <code> http://www.example.com/wp-admin/options.php </code> to see all op...
how to check if front page is set to show a static page
wordpress
I want to access a plugin file (when <code> &lt;a&gt; </code> is clicked) without exposing actual path of the file. I am using the following rewrite rule: <code> add_rewrite_rule( 'continue/([0-9]+)/?$', 'wp-content/plugins/my-plugin/continue.php?where=$matches[1]', 'top' ); </code> The request is redirected to <code> ...
That rewrite rule won't work at all, flushed or not. There's two kinds of rewrite rules in WordPress. Those that have their rewrite urls start with index.php and those that don't. All WordPress internal rewrite rules must start with index.php. It can't redirect to anyplace else, because it's already been redirected to ...
add_rewrite_rule: $matches var not replaced by captured value
wordpress
I've almost edited dashboard of wordpress but now i'm confused with sidebar I can't find page where appereance, posts, comments, settings etc etc. Can anyone know where i can find codes of that sidebar
What exactly do you mean by editing? I hope not modifying WP core files, which is considered bad practice and incompatible with updates? Administration menus are considered to be some of the most nasty parts of code in WP and are hard to deal with. For some top level overview see Administration Menus in Codex, but for ...
Editing wordpress dashboard
wordpress
The following code is adapted from Jan Fabry's answer. stackexchange-url ("Mixing custom post type and taxonomy rewrite structures?") <code> &lt;?php add_filter('post_type_link', 'client_area_permalink', 10, 4); function client_area_permalink($post_link, $post, $leavename, $sample) { if ( false !== strpos( $post_link, ...
In order to avoid an error like this you'll have to check whether or not the value of $glossary_letter is an array or not. Since get_the_terms() returns false on failure, you can just check whether or not $glossary_letter is false and set it to an empty array in order to appease array_pop() without getting that error. ...
Custom Post Type and Taxonomy Rewrite Error
wordpress
What is the appropriate way to use jQuery toggle() function in a WordPress post to show/hide a Twitter "Tweet" button? The problem I am encountering is when I put the code in my content-post.php, the toggle feature and tweet functionality only work on the first (most recent) post in the stream. How would I go about put...
If the element that is being assigned the "click" event is "#social_trigger", you cannot have more than one of these elements per page. You are searching for an "id" of an element and by definition, you can only have one element of a particular id per page. You should change your elements to have a class of "social_tri...
Using jQuery toggle() in WordPress post to show/hide Tweet button?
wordpress
I searched on different Marketplaces so far, but haven't found anything that wouldn't take me hours or even days to make a wordpress theme from. Here's the list of things I need: 1. Slider or some photo gallery. Something fancy, eyecatching. 2. (Ajax?) Contact Form (minor issue - got some small plugin close to finished...
For 3 &amp; 4, try Booking Calendar: http://wordpress.org/extend/plugins/booking/ . I just installed it on a site and it seems to work ok on first impression. It comes with a widget that shows a little calendar that shows dates that are booked, dates that someone has requested, and open dates. It also ships with a requ...
Theme recommendation: Hotel/Hostel/Bed & Breakfast
wordpress
I'm having a small issue with one of my queries here. I cannot increase my wordpress memory limit as long as hostgator sets it to 64mb. I'm not sure if its possible to reduce the amount of memory used making some changes to my code, here is the code I'm using to query users from a specific role and displaying their nam...
In your example, you are getting all the fields in the get_users call, but you are only really using the ID and display_name fields. So you can save some memory by forcing get_users to only get the fields you need. <code> $users = get_users(array( 'role'=&gt;'s2member_level3', 'fields'=&gt;array('ID', 'display_name'), ...
Memory usage when querying users
wordpress
I'm doing a little bit of work on a theme I just inherited from another developer. The site just broke, and I'm trying to fix it. You can see the site here: www.bowlingventures.com What's happening is this. As you can see, the home page loads unstyled. All of the images are being pushed out using "bloginfo('template_di...
First thing I noticed is that your secondary pages link to images using a URL like: <code> http://www.bowlingventures.com/BVc_13/wp-content/themes/bowlingventures/images/m2u.jpg </code> whereas your home page uses: <code> http://www.bowlingventures.com/wp-content/themes/bowlingventures/images/m2u.jpg </code> Not sure t...
Inconsistent bloginfo information
wordpress
From few months I am digging into wordpress for multiple category search options, and finally came up with this. I just found that wordpress allows multiple tags, which means that if in your URL you type this <code> http://yourblog.com/tag/tag1+tag2 </code> then it will return all your posts with having tags, tag1 AND ...
The problem is that in a url the '+' sign is equivalent to a space so that's how PHP sees it. If you use an action on <code> parse_request </code> you can make this work like so: <code> add_action( 'parse_request', 'category_search_logic', 11 ); function category_search_logic( $query ) { if ( ! isset( $query-&gt;query_...
Wordpress Multiple Category Search
wordpress
I've been looking for a slider that can slide whatever kind of content that I want to enter. I tried out various Wordpress plugins, but most of them only can slide Wordpress posts or images only with a small caption. I'm looking for something like the WP Photo Slider 50 . Unfortunately this slider doesn't work in my th...
I use jQuery Scrollable for all my slider needs. It supports sliding of any type of content, and content can slide horizontally and vertically. JQuery Tools and JQuery Scrollable are free, open sourced, and well documented. The support forums can be very useful if you are having problems implementing scrollable.
Simple text and image slider
wordpress
Is there a way to query posts which do not have tags assigned to them? <code> query_posts('tag='tag_exmaple'&amp;posts_per_page=-1'); </code> Ty very much!
Either use the <code> tag_not_in </code> parameter if you have the tag id and if not then you can use <code> tax_query </code> parameter like so: <code> $tag_to_exclude = 'example_tag'; $args = array( 'posts_per_page' =&gt; -1, 'tax_query' =&gt; array( array( 'taxonomy' =&gt; 'post_tag', 'field' =&gt; 'slug', 'terms' =...
Query all posts which do not have tags assigned to them
wordpress
Do you guys know any way I could automatically pick up strings from .xml files and store them in a .po / .pot file, just like PoEdit does with the ones from .php files? The XML structure looks like this: <code> &lt;?xml version="1.0" encoding="iso-8859-1"?&gt; &lt;options&gt; &lt;page id="content" label="Content Option...
You should use a localized XML format like <code> XLIFF </code> or <code> TMX </code> , there is a tool to convert XLIFF to .po. If you cannot change the source XML you have a few options but it really depends how your outputting this XML info: Parse the XML ( for label) and create a .po with gettext output for these s...
Localizing text from XML files
wordpress
I have an odd issue with get_term_by(). It's working fine when I use it inside a template, but when I use it in functions.php it just returns false. <code> $term = get_term_by('slug', 'some-term', 'some-taxonomy'); var_dump($term); </code> Any explanation as to why this is happening would be greatly appreciated.
This is probably happening because the taxonomy you're trying to query is registered yet. Eg. The WordPress environment is loaded when a theme's functions.php file loads, but many plugins/themes/core functions don't register taxonomies until later. Try hooking into <code> init </code> with a really high priority number...
get_term_by not working when in functions.php
wordpress
I'm developing a theme settings panel for a new wordpress theme that have an option to exclude categories from being shown in the loop. I managed to get the main functionality to work, using a mutilselect box and saving the values as array ... <code> &lt;?php $cats = get_categories('hide_empty=0&amp;orderby=name'); ?&g...
I'm assuming your <code> $selected </code> variable contains an array of values for the currently selected items? You can't use selected in this case (with multi select boxes) because it only compares two strings. It won't test to see if the value is in an array. Instead, use a ternary statement and <code> in_array() <...
Make Selected Mutiselect Items "selected"
wordpress
I tried tplacing this: <code> &lt;?php $count = count($custom_posts); ?&gt; &lt;h2&gt;&lt;?php echo $count; ?&gt;&lt;/h2&gt; </code> at the end of the loop: <code> &lt;?php if ( bbp_get_forum_title() == 'Test Forum 1' ) : ?&gt; &lt;?php $custom_posts = new WP_Query(); ?&gt; &lt;?php $custom_posts-&gt;query('post_type=b...
Correct way of getting the total number of posts is: <code> &lt;?php $count = $custom_posts-&gt;post_count; ?&gt; </code> http://codex.wordpress.org/Class_Reference/WP_Query#Properties
Counting the posts of a custom Wordpress loop (WP_Query)?
wordpress
I run a music blog and I want to do a countdown of our top 50 tracks of 2011 so far. There's no way that I want to add 50+ images and Audio Players into just one post, and I don't want to break the post down into separate posts either. Is there some kind of plugin or function that will allow me to add pages to the post...
WordPress actually comes with pagination built in. I don't believe there's a button on the visual editor by default, but in HTML mode you should be able to insert <code> &lt;!--nextpage--&gt; </code> wherever you'd like a page break and it will work. Styling the pagination links would likely be the next step after that...
How do I create pages within a Wordpress post?
wordpress
* edit * - Pretty new to wordpress here and I've been working on getting post-thumbnails working using featured images...My goal is to quickly apply the featured image as a post thumbnail, regardless of which theme I am using....I've been editing the Twenty Eleven theme and it seems that the featured images only applie...
As mentioned by @Michael in his stackexchange-url ("answer") the theme has to support the Post Thumbnail functionality. All you need to do for it is to put this line into the theme's <code> function.php </code> file: <code> add_theme_support( 'post-thumbnails' ); </code> There's a good chance it's there already, so sea...
Featured images, am I missing something?
wordpress
I'm working on a project to allow a number of mini-sites within a WordPress multisite installation. Here's how it's supposed to function: The client has a large number of individual locations, each of which has their own website. All of these websites are sites within a large WordPress network to allow for centralized ...
Sounds to me like you are making it more complicated than it needs to be. You already have the author/user as the client - no need to create another concept to represent that. Requirements: wp network where each subsite has many users (clients) Each client wants to have a single page which they can edit and control. (O...
Mini-Site Strategy
wordpress
I have restricted to display 20 posts on index.php, but also I want to add a link to display all posts without restrictions. Any advices on how to achieve this? Thanks!
You could create a template called all-posts.php and place this code inside of it: <code> &lt;?php /* Template Name: All posts */ ?&gt; &lt;?php get_header(); ?&gt; &lt;div id="primary"&gt; &lt;div id="content" role="main"&gt; &lt;div class="entry"&gt; &lt;?php $args = array( 'numberposts' =&gt; -1 ); $lastposts = get_...
Is it posibble to have alink to display all posts on index.php?
wordpress
The script gets the first tag of a post and retrieves in a wordpress loop all other posts with the same tag. I can't seem to get it working:( Any ideeas? <code> $posttags = get_the_tags(); $count=0; if ($posttags) { foreach($posttags as $tag) { $count++; if (1 == $count) { $tag = $tag-&gt;name . ' '; } } } query_posts(...
the query expects the tag slug, not the tag name: <code> $tag = $tag-&gt;slug . ' '; </code> and there is an error in the query syntax; corrected: <code> query_posts('tag='.$tag.'&amp;posts_per_page=-1'); </code> edit: full code rearranged: <code> $posttags = get_the_tags(); if ($posttags) { foreach($posttags as $tag) ...
Script that gets the first tag of post and query all other posts with the same tag
wordpress
1) My site has posts, and 2 custom post types (news &amp; essays) 2) They all share normal categories like sports &amp; health (no custom taxanomy involved) 3) Using the generic category.php template, how do I make it so this template handles all categories while displaying all content falling under it regardless of co...
Take a look at the query_posts() function - your amigo for altering the main/default query. You want to call global <code> $wp_query </code> beforehand to alter the original query instead of replacing it. Something like this should do the trick for you. Put the first four lines in your <code> category.php </code> right...
How to display regular posts & custom post types that fall under a category using just the generic category template?
wordpress
How can i disable the comment form, if the user is already submitted a comment for the specified post? I am using this now, but this is only good for 1 post / user / website. <code> &lt;?php global $current_user; $args = array('user_id' =&gt; $current_user-&gt;ID); $usercomment = get_comments($args); if(count($usercomm...
Simply add the post_id parameter to the <code> get_comments </code> arguments array something like: <code> global $current_user,$post; $args = array('user_id' =&gt; $current_user-&gt;ID,'post_id' =&gt; $post-&gt;ID); $usercomment = get_comments($args); if(count($usercomment) &gt;= 1){ echo 'disabled'; } else { comment_...
One comment per user per post
wordpress
How do I call the current post's featured image in the sidebar? and if there is none, then a backup image?
I'm assuming you're going to be outputting this on a singular page (Post, Page, Attachment)? If so, the easiest thing to do is to put your post AND sidebar content inside the Loop, so that you have access to the <code> $post </code> global, and post-related template tags. Alternately, you could define a variable, insid...
Show current page featured image in sidebar
wordpress
According to:http://codex.wordpress.org/Function_Reference/query_posts To show all posts in a category: <code> query_posts( array ( 'category_name' =&gt; 'The Category Name', 'posts_per_page' =&gt; -1 ) ); </code> Works great, but if I want to show the posts ORDER BY ID DESC Anyone have any idea how to do that?
You need to use this to parameters <code> orderby </code> and <code> order </code> <code> &lt;?php query_posts( array( 'category_name' =&gt; 'my_category_slug', 'orderby' =&gt; 'ID', 'order' =&gt; 'DESC', 'posts_per_page' =&gt; -1 ) ); ?&gt; </code>
query_post order desc
wordpress
I created a custom post type which I'll use as landing page for PPC. Now on that custom post type I would like to remove all the filters which are adding the social media buttons for example. I tried already with the following code but that did also remove the shortcode filter which I would like to keep on that custom ...
Try re-adding the 'do_shortcode' filter like so: <code> function landingpage_remove_plugin_filters() { global $wp_filter; global $wp; if ($wp-&gt;query_vars["post_type"] == 'landingpage') { remove_all_filters('the_content', 'plugin_filters'); add_filter('the_content', 'do_shortcode'); } } add_action('wp','landingpage_r...
How can I remove filters from custom post types?
wordpress
I'm using Sidebar Generator in all my themes. The plugin works perfectly normal from "plugins" directory, but I want to embed it somehow to my themes, so it won't display on Installed Plugins list. I've just copied sidebar_generator.php (the whole code is luckily in one file) to mytheme/plugins and included it in funct...
It should work (and does when I test on a new WP install) with <code> __FILE__ </code> , though it's not recommended because it exposes the server path and is just generally an ugly URL. You can replace it with a unique identifier like 'sb-generator-options' or whatever really, as long as it's unique. the important par...
__FILE__ in WordPress plugins
wordpress
I am using MapPress Easy Google Map with the following code in my custom theme: <code> &lt;?php $mymap = new Mappress_Map(array("width" =&gt; 600,"height" =&gt; 300)); $mypoi_1 = new Mappress_Poi(array("title" =&gt; "DC", "body" =&gt; "Beautiful Washington, DC", "point" =&gt; array("lat" =&gt; 38.90279, "lng" =&gt; -77...
Using an IFrame inside the tab is an easy fix for this. I contacted the Mappress author and he is currently working on it and the next update will be working with jquery tabs (as he told me).
MapPress Easy Google Map in Jquery Tabs Problem
wordpress
Im currently trying to make my backend work with multiple languages. Im using qTranslate as my translation plugin. So far I have accomplished a custom option page with multi-language support. When you click on a different language (in qTranslate on the sidebar) you will get a new options page with prepared option-varia...
I don't know how qTraslate works, but you can pass filters to Widget Logic , you basically duplicate each widget, one for each language. I have used this technique with WPML to show widgets in separate languages that can sometimes be difficult ( such as when they make direct DB queries).
Separate backend "Widgets" page for each language
wordpress
I am trying to show all posts in each category. I've been searching around and it seems I need to have either the category <code> slug </code> or <code> term_id </code> to do so, like the code below. <code> &lt;?php query_posts('category_name=MyCategory&amp;showposts=9999'); ?&gt; </code> I'm currently editing the <cod...
to get the category slug of the category archive: <code> $cat_slug = get_category(get_query_var('cat'))-&gt;slug; </code> alternatively, to get the category ID of the category archive: <code> $cat_id = get_query_var('cat'); </code>
Show all posts in category
wordpress
I observed a difference between <code> twentyten </code> and <code> twentyeleven </code> themes. Let me explain with an example: <code> example.com/category/health-beauty/ </code> finds one post containing just a shortcode. If I use <code> twentyten </code> , nothing is displayed but in <code> twentyeleven </code> the ...
It looks like twenty ten displays the excerpt on category archives. If you're using manual excerpts, this is an easy fix. Just add this line of code to your theme's functions.php file. It tells wordpress to run the excerpt through the do_shortcode function/filter. <code> add_filter( 'the_excerpt', 'do_shortcode' ); </c...
do_shortcode() in twentyeleven theme
wordpress
My blog uses the <code> /?p=378 </code> permalink structure for some years. This isn't very helpful with Google Analytics, and I would like to change it to the <code> YEAR/MONTH/DAY/post-title </code> structure. Is there a way to do this without losing backward compatability, so that old link will work?
The old link (?p=378) will always work, and it will redirect to the "pretty" permalink.
Multiple permalinks
wordpress
Below there is a widget with a Wordpress loop inside. It works as expected. The only problem is this part: <code> 'post_parent' =&gt; $post-&gt;ID, </code> The widget is not getting the <code> post-&gt;ID </code> of the parent of the current <code> topic </code> custom post type (with is another custom post type called...
Don't use <code> query_posts </code> . As noted in the Codex : Not for Secondary Loops You should not use query_posts() to create secondary listings (for example, a list of related posts at the bottom of the page, or a list of links in a sidebar widget). You should use <code> WP_Query </code> instead. E.g. <code> $args...
How to get the post id (of the parent custom custom type) in a loop inside a widget?
wordpress
Does anyone use Aptana for WordPress plugin development? Is there a way to set-up WP code hinting with Aptana? Thank you.
Yes, im and other users use Aptana always for WP Development and worls very fine. You must only include your install of WP for Dev or Stable to the project of your plugin, thats all. Now you can use all functions, vars, class ... inside your plugin of the referenced WP install. If you start an new project; maybe an plu...
Aptana: WordPress Code Hinting
wordpress
I want to be able to add posts to a post parent in wordpress. Is there a way? There is such option for pages but I need it for posts to. Any ideeas? Ty!
Posts &amp; Pages are "built in" Custom Post Types. So something that was delivered as a pre-configuration when WP was installed. There's also other built in stuff like Tags &amp; Categories which are basically nothing other than custom taxonomies. And you're lucky: You can simply use the API and add your own , hierarc...
How to assign a post to a post parrent?
wordpress
I am not here to discuss the efficiency of using categories as the base for permalinks. I would like to know in what file and what line is the code to how Wordpress picks out a category for the permalink if the post is in multiple categories . I asked this on IRC a while ago and I can't find the code anymore. Thanks.
<code> get_permalink </code> in <code> /wp-includes/link-template.php </code> , line 80
how wordpress generates permalinks as /%category%/%post%/
wordpress
i don't know what the hell are these spam links on my friend's photo-blog posts! when i publish a post, this texts shown there! what should i do? (sorry for my very bad English) blog: http://www.bius87.com http://i.stack.imgur.com/YdSY3.jpg
You have malware, either by downloading a free theme with malware in it or someone exploited your site. stackexchange-url ("Verifying that I have fully removed a WordPress hack?") http://codex.wordpress.org/FAQ_My_site_was_hacked
Auto post Spams on my wordpress blog?
wordpress
I am looking for a way to create a custom field/metabox that allow to attach multiple and infinite images to a post. This would allow to create a custom post type for a portfolio and allow to attach images without pasting them inside the post textarea . Most plugins I've seen allow for only 1 image. I've got the inspir...
This cab be done very easy by custom code or using <code> Meta Box Script For WordPress </code> which makes my life a lot easier when it comes to creating custom meta boxes.
Is there a plugin or simple way to add a multiple images metabox to a post?
wordpress
I need a duplicate of <code> index.php </code> , but slightly modified. I added a "vote it up" plugin. So, I want the user to select how to display posts - by new or by popular. I know what to add to second <code> index.php </code> , but how to create a second <code> index.php </code> , thats the problem.
Elaborating on Rachel Baker's answer: Copy the index.php file and name it something like popular.php. At the very top, paste the following: <code> &lt;?php /* Template Name: Posts by Popular */ ?&gt; </code> Now, go in to the WordPress admin and create a new page, called something like "By Popular". On the right-hand s...
How to create a second index.php?
wordpress
I have been trying to write a reusable modular options class and I am stuck at this specific point. How do i define hooks within php classes? Try 1 : <code> class super_options { // .......................... function render_options_page () { //.................... $this-&gt;top_page_hook(); //.................... } //...
Hook can only be identified by string. So the only option to have dynamic hook is is use some variable(s) in its name: <code> do_action( $some_string_variable . '_top_page_hook' ); </code> Depending on what you are trying to do this can be something meaningful (like prefix, defined by configuration) or something random...
Defining hooks within (php)classes?
wordpress
Is there a built-in feature or plugin that allows you to attach a document to a post or page such that the actual attachment file is one thing (eg a PDF) but the thumbnail images are another (eg a JPEG)? CLARIFICATION: the thumbnail does not need to be automatically generated (it could be a separate upload) The use cas...
WP-Filebase ended up being the free plugin solution we went with. This is actually a pretty cool plugin with a lot of power under the hood, though the interface is far from slick. When you upload any kind of document, you have the option to go to an "Advanced" upload form, which allows you to upload a separate thumbnai...
Can I attach a document (eg: PDF) but have a JPEG as a thumbnail?
wordpress
I just heard somewhere that by using some javascript it is possible to load of a page after the entire page load completes, When I googled, I found LazyLoad , but it seems that latest browsers are not supporting it. My site has some images because of which sites becomes slow, is it possible to load images after the com...
I took a look at it on Github: https://github.com/tuupola/jquery_lazyload - it appears that there was some sort of fix that was merged in that helps, though I'm not sure if it really fixes the issue. It appears to work for me as expected in FF6, though my connection is probably not slow enough to really notice much of ...
Load images after page load
wordpress
I see plugins that somehow hook into the Wordpress file browser (so that users can either upload an image to the image library or choose an image from the image library) but I've been searching through the codex and can't seem to find a simple way to do this. I'd like to add the image browser/file upload to my options ...
Read this article: Using the WordPress Uploader in Your Plugin or Theme . I've successfully used this method to integrate the WP uploader with my own plugin.
Wordpress file browser
wordpress
Is it possible to set a different thumbnail size for different pages? For example, I want the thumbnails on my category, archive and tag view to be bigger than on my home.php. Right now I have the following code in my function.php: <code> add_theme_support( 'post-thumbnails' ); </code> set_post_thumbnail_size( 250, 165...
In your functions file you need to add image sizes: http://codex.wordpress.org/Function_Reference/add_image_size
Different thumbnail sizes
wordpress
I'm pretty sure I understand the roles and capabilities setup in WordPress: granular capabilities, grouped together in roles that can be assigned to users. Code should check the granular capabilities, not the roles (because the capabilities for particular roles can change). Roles are not necessarily hierarchical (thoug...
The lack of mutiple roles has irritated me for a long time since the underlying WP_User class supports multiple roles. I have even considered looking for an alternative software solution. @lpryor - after reading your post, I was re-motivated to implement it myself. It took a surprisingly short number of lines to do alt...
Groups of capabilities: users with multiple roles?
wordpress
I'm using 4 custom loops to display 3 posts on each one and every loop has its own pagination which works fine once the page loads up, the problem is that when I click on the 2nd page of the first loop it does show me the next 3 posts of that loop but it does the same for the other 3 loops, so if one of these loops has...
you might wanna try wp_reset_query(); at the end of your loops
Pagination problem with multiple loops on the same page
wordpress
So, i'm trying to find out a way to use two separate upload folders, being the default one <code> wp-content/uploads </code> for general media uploads, and another one say <code> wp-content/custom </code> for one specific type of attachments (PDF files attached to one specific post_type). It is important to keep'em sep...
I ended up solving it by completely bypassing the wp upload system, so this is how it looks now: <code> /* * Define new upload paths */ $uploadfolder = WP_CONTENT_DIR . '/exames'; // Determine the server path to upload files $uploadurl = content_url() . '/exames/'; // Determine the absolute url to upload files define(R...
Use a separate upload folder for custom post attachment upload
wordpress
Anyone know if I can make a checkbox-list with all terms from a taxonomy, and search for the posts belonging to the checked terms? Listing categories in the checkboxes also would be a bonus!
I built something similar for a client not too long ago. I believe your question is if it is possible -- I can definitely say yes there. How would you go about it? Well, as I don't have the code handy, I'll give you a brief run-down of the steps I went about. I made a custom page template and created a page to use this...
Checkboxed term search
wordpress
I've created a wordpress theme and new in wordpress development I want to create option page to take some values from user and I've little bit done with that but confused where and how to save that data I want to create user interface in short.
update: All the following code should go into your functions.php file Probably the best (and definitely the easiest) way to make a Theme Options Page is to use the Wordpress Settings API. One note... everywhere you see THEME_NAME in my code, just replace this with some unique phrase (I use my theme name). First we need...
How to create a theme option-menu page to save user values
wordpress
I'm modifying the plugin <code> Wordpress Frontend User </code> for my custom post type(s). What I need to edit is the custom taxonomy terms. In order to do this, I need to list my terms as labels and have checkboxes associated with the labels (in the end associated with the taxonomy when I send a post update). What I ...
Try this: <code> $jobsTerms = get_terms('jobtype',array( 'taxonomy' =&gt; 'jobtype' )); foreach($jobsTerms as $term){ $checked = (has_term($term-&gt;slug, 'jobtype', $post-&gt;ID)) ? 'checked="checked"' : ''; echo "&lt;label for='term-" . $term-&gt;slug . "'&gt;" . $term-&gt;name . "&lt;/label&gt;"; echo "&lt;input typ...
List taxonomy terms for post as checkboxes
wordpress
I know the_content has the handy dandy $strip_teaser argument that lets you set whether there is "continue reading" text. No such luck for the_excerpt... I would like to just get rid of it. I had previously tried to just shorten it to Read on but that didn't seem to work either. <code> function beernews_auto_excerpt_mo...
If you're using the Twenty Eleven theme I think you need to remove that theme's filter before you can define your own: remove_filter( 'excerpt_more', 'twentyeleven_auto_excerpt_more' ); edit building from t-p try this: <code> add_action( 'after_setup_theme', 'my_child_theme_setup' ); function my_child_theme_setup() { r...
How to remove "Read on" content in the_excerpt?
wordpress
If I check "Remember Me", and then log out, my login and password are not remembered. I've tested this on many WordPress sites running WP 3.2.1 on a server here in NZ and also on a completely different server hosted in the US. It doesn't appear to be a problem with just my browser, as quite a few people have tested thi...
Check your browser settings. You can change the settings for size and time to keep the cookies.
Why doesn't the "Remember Me" checkbox work for me on a live website? Only works on a local server environment
wordpress
Is it theoretically possible to have the following feature? Each post has a country code. When a visitor comes in, the system will determine the visitor's country code. Then when the page renders, only the post with that country code is displayed. This need to also affect the widgets/site search etc. I was asked to eva...
Thanks Sisir! It is pretty possible, at least I think I am 2/3 way there. By using <code> pre_get_post </code> action I filtered out posts successfully. This is action hook is more powerful than <code> add_filter(request,...) </code> . There are still things I need to fix such as filtering out recent comments links rel...
Display only certain posts based on visitor's country?
wordpress
I have custom template for my homepage. If i just put the_content(); to this template, nothing else, then it will display my text i entered in my admin panel in the editor. But if i have a different loop in my template, its display the content from an other post. <code> &lt;?php query_posts( array( 'post_type' =&gt; ar...
Try rewinding the Loop, via <code> rewind_posts() </code> , between the two loops? <code> &lt;?php if (have_posts()) : while (have_posts()) : the_post(); ?&gt; asd &lt;?php endwhile; endif; ?&gt; &lt;?php rewind_posts(); // REWIND THE LOOP! ?&gt; &lt;?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?&gt; &...
The_content display a different content from a previous loop
wordpress
I have just setup a new custom theme with little/no data and yet Wordpress has made an update notice about upgrading it to "1.0.1" and I cannot for the life of my work out why. I have stripped down the theme to the following files: I have a blank index.php and style.css: <code> /* Theme Name: Fresh Description: A custo...
In addition to having the same name, I think it checks the folder name first for updates. You should also change your folder name if you are planning to distribute publicly, or if this is private, you can exclude it from update checks: http://markjaquith.wordpress.com/2009/12/14/excluding-your-plugin-or-theme-from-upda...
Why is Wordpress asking me to update my new (virtually blank) theme?
wordpress
I have a permalink structure that looks like this, %category%/%postname% I have a category.php template coded up and and trying to pull of the post of a certain category, so for example my URL may look like this, /category/category1 I want all posts that are in category1 to be return however, when using the following c...
WordPress rewrites rules invisibly translate pretty permalinks to the non-pretty format internally, and set the appropriate variables and load the requested page, you don't need to do anything in your template to load posts from a category on a category page. The <code> cat </code> query var specifically will be set to...
get_query_var() and permalinks
wordpress
I'm trying to create a function to be placed in a template page to output the post's attached images. I would like to have the images display as the theme's specified thumbnail size and be linked to the full-size image so that I can give them a lightbox-triggering class (in this case thickbox). I currently can only get...
Thanks to @Rarst who led me in the right direction to answer this question! What do you get if you var_dump() return of what doesn't work, especially wp_get_attachment_img_src()? Do you have WP_DEBUG enabled? – Rarst <code> function product_images() { global $post; $attachments = get_posts( array( 'post_type' =&gt; 'at...
Output posts attached images as thumbnails linked to full-size with lightbox class
wordpress
Let's say I've already got the $post object through some earlier process of looping through an array of IDs and using get_post() on each one of them, storing the resulting object in some array. Later on, I want to loop through that array and do something with each post. I already have a $my_post object, so I could <cod...
Template tags rely on global <code> $post </code> (unless you explicitly provide something else to those that support it. So either: they get something from that variable (no reason to go for it in database) or they don't (then they fail because they have no clue what you want) Under most normal circumstances there is ...
Will I see a performance hit if I use native API calls like get_the_title() instead of $post-> post_title?
wordpress
Are there any good resources for building an e-commerce storefront? I am aware of the e-commerce plugins available but I am mainly interested in learning practices and techniques for the design and development of an e-commerce site for someone who has never built one before. Obviously, nothing is stopping me from just ...
Larry Ullman's book PHP 6 and MySQL 5 for Dynamic Web Sites: Visual QuickPro Guide has an excellent chapter on building an e-Commerce website. It has nothing to do with WordPress, but I found it to be an excellent introduction to the very basic e-Commerce concepts way back when I read it. I think it would be a great pl...
Getting started with e-commerce sites on WordPress
wordpress
I see plugins where users can override the plugin templates by creating files inside of their own theme folder, how does this work? Is this a built-in part of wordpress or does it have to be written in?
You have to write it yourself. Check out the way WP e-commerce does it: First, the function to "register" the theme files. <code> function wpsc_register_theme_file( $file_name ) { global $wpec_theme_files; if ( !in_array( $file_name, (array)$wpec_theme_files ) ) $wpec_theme_files[] = $file_name; } </code> And then the ...
Creating a wordpress plugin where users can override templates
wordpress
I'm having a big problem with Permalinks on our Wordpress installation. It's currently running Ubuntu 10.4 and when i add a page to the site, there are odd things happening: We get infinite loop and "too many redirect" warnings from different browsers Other links on the site get redirected to the newly created page For...
Ok, thanks everyone for helping out with this, but it looks like the issue was the canonical redirects in wordpress conflicting with the server. I fixed the problem by adding this to my functions.php file: <code> remove_filter('template_redirect', 'redirect_canonical'); </code> I've never ran into this issue before, bu...
Permalink issues with Ubuntu Server - Infinite loop & Wrong pages
wordpress
I have followed this tutorial from WordPress and managed to get everything to work. I have installed wordpress in a subfolder called /wordpress/. The problem that the images I uploaded show the /wordpress/ directory name in the URL. Can that be removed without moving the uploads folder?
SOLVED Fixed the problem <code> Go to Settings&gt;Media Enter the "Full URL path to files" according to the file structure on you server. </code>
WordPress in a sub directory but not images
wordpress
I wondered if it was possible to change the order in which a script is enqueued. I ask this because I wish to include the HTML5 enabling script but it needs to be included before any styles. Is there any way to change the order? I could obviously hard code it into the themes header, but I would prefer to enqueue it. Th...
You can change the order of the scripts but can't have one script load before anything else. The HTML 5 enabling script is IE conditional so you probably don't want to use <code> wp_enqueue_script </code> as it would load for all browser users which isn't necessary. It's ok to hard code it in your themes header. Even T...
Enqueuing a script before anything else
wordpress
As the title suggests, I'm building a custom front-end login page for users of my site. I'm using wp_signon to log the user in after their credentials have been validated, but I'm getting this error: <code> Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\wordpress\...
You have to hook earlier in the request to log someone in, you can't do it from a page template because, as the error says, headers have been sent to the browser already, so it's too late at that point. <code> &lt;?php add_action('template_redirect', 'my_check_login'); function my_check_login(){ if( is_page('my-login-p...
Custom Login Page -- wp_signon Headers Already Sent?
wordpress
I have a sidebar and would like to fill it like this: [Text] [Some other Widget] [Text] but I can add the Text widget only once to the Sidebar. What can I do to be able to add it more than once?
It should be as simple as dragging another text widget from the active widgets into the sidebar and copying the desired text in again. Unless you are having complications?
how to add the same Widget twice to a sidebar?
wordpress
I am developing a website that will allow multiple users to author short posts (Kind of like a job board) and I want to know how they can author or edit these posts from within the site template (Ie; without having to enter the dashboard). Any advice or points in the right direction would be great
Try the Font-End Editor . Or you can try some of these. 8 WordPress Plugins that Enable Posting and Editing From the Front-End I have never used any of these plugins, so I cannot say as to how well they will perform.
Creating / Editing a post from within site template
wordpress
I'm working on a custom theme using wp_nav_menu(). What I want to do is add a caret to menu items that have sub-menus. For example, If my menu looks like this: Menu Item 1 Menu Item 2 Menu Item 2a Menu Item 2b Menu Item 3 I want to be able to format it like this: List item Menu Item 1 Menu Item 2 > Menu Item 2a Menu It...
I do this using jQuery (since it doesn't necessarily need to be in the TEXT (for screen readers, etc.) - just another option...: <code> jQuery(document).ready(function() { jQuery('ul#nav li').has('ul').addClass('parentul'); }); </code> Then for that "parentul" class I put in a background image of an arrow and position ...
Add Caret to Menu Items with Sub-Menus in WordPress Theme
wordpress
I am wondering how most WP freelancers handle general maintenance for their non-technical clients. A small to medium sized business may have someone with technical knowledge who can handle upgrades, plugin installs, etc. For a one person shop where they have no experience with WordPress, or any CMS, how do you handle m...
As you have already pointed out there is no right answer to this but here is how I deal with WP sites after they are done. When building a WP site for a client, through the whole process we make them aware of our aftersales support. Our support has different levels with the levels giving better SLA's than the last one....
How to handle support for a non-technical client
wordpress
Well, I'm looking for source code of these two small containers (PHP backend, HTML frontend &amp; JS used to attach the image): I want to build a theme option based on Featured Image code, but I'm not able to find it. I'm pretty sure it is somewhere in wp-admin directory, but I've spent loong time there and found nothi...
Markup of that metabox is generated by <code> _wp_post_thumbnail_html() </code> function, contained in <code> wp-admin/includes/post.php </code> .
Where is Featured Image code stored in WP?
wordpress
I think this might be a really simple problem, but I just don't know exactly what and where to enter the specific code and before I mess up, I thought it's better to ask for help here. I was able to create multiple columns to display the latest posts. For that I created a category.php and tried it out there as I didn't...
The stackexchange-url ("sorting by taxonomies is strongly discouraged by design"). From your image I think that what you want is multiple secondary loops per category is what you want, and your code does have something like that - except that you are query_posts() </code> in a way it should not be used . Basically read...
Page view: Sorted by categories
wordpress
Is there a way to have pagination on multiple tabs? I have a page the has 5 tabs, each tab has filtered content from the same posts. For example: Tab 1 - All Posts. Tab 2 - Posts with Keyword One. Tab 3 - Posts with Keyword Two. etc... My problem is that I can't figure out how to use pagination on each tab and have the...
Use the following extension to the <code> WP_Query </code> class. The extension only takes your arguments as an array, rather than a string format. You'll to add individual values for "page_link" for each of your tabs. This should just be a string ("tab1", "tab2" etc etc) Then you'll need to use the <code> $my_query-&g...
Keep Pagination in Tabs
wordpress
<code> $wp_user_search = new WP_User_Query( array( 'role' =&gt; 'author' ) ); $author_list = $wp_user_search-&gt;get_results(); foreach($author_list as $author) { // author properties? } </code> Can you point me in the direction of the documentation of what properties <code> $author </code> has?
Either an array of row objects with properties the column names of the result of the SQL query - ie. the specified fields from the wp_users table or, if fields equals 'all_with_meta', an array of WP_User objects. The fields value defaults to 'all', which will return all the columns in the wp_users table , but can be ov...
What does the class look like that is returned from WP_User_Query?
wordpress
I have a page created (page ID <code> 235 </code> ) with a page template that will need to be passed a variable. I would like to pass this variable through the URL. My first attempt was to pass this with a GET variable, and that worked just fine. <code> URL: http://example.com/sok/events/?kategori=variablehere </code> ...
I think you just have to add <code> kategori </code> to the array of query vars: EDIT- after much iteration we've arrived at a solution. the original code seemed to be working, but only with specific permalink settings, as I was mistakenly routing to a post instead of a page. rather than <code> p= </code> , it should b...
Prettified page URL w/ query var redirects to prettified page URL w/o query var
wordpress
Right now my shortlink structure looks something like this: example.com/?p=451 I would prefer it to look more like this: example.com/abc123 Any ideas how I can alter the code to do just this?
Okay, so, as mentioned in my comment to you: altering core files is not a good idea. But here is a plugin solution. First we're going to create our own rewrite rules that rewrite <code> s/123 </code> (replace 123 with a post ID) to <code> index.php?short=123 </code> . We'll also have to filter the WordPress query varia...
How do I customize my WordPress shortlink structure in link-template.php without a plugin?
wordpress
It's really strange, but I've noticed that as I'm writing and publishing posts, the ids aren't incrementing by one, but rather by some arbitrary amount which I think is relative to the amount of times I hit preview. It's kind of annoying to have ids like 1, 11, 29, 37, etc. Is there a way to ensure that posts only incr...
Every revision or auto-draft that's saved is added to the database and given its own auto-incremented ID. So in theory, you could turn off post revisions ( adding the line <code> define('WP_POST_REVISIONS', false); </code> to your wp-config.php ), and be very careful to write your posts in exactly the order you want yo...
Post ids are incrementing by an unknown number?
wordpress
I'm using the plugin <code> Wordpress User Frontend </code> and editing the title and content of a post is nice (I managed to change it so I can edit custom post types), but there's no support for editing custom fields. So I have the following code below (not sure if it's too long to have to put on pastebin): <code> fu...
this line: <code> $post_cf = update_post_meta($post-&gt;ID,'location',$post_location); </code> <code> $post-&gt;ID </code> isn't set in this context, you want to pass <code> $_POST['post_id'] </code> I assume.
Wordpress User Frontend Editing Custom Fields
wordpress
Does anyone know why nextgen gallery doesn't support thumbnails with png transparency??? I'm working on this project http://decolabel.andresmijares.com/smaakvolle-etiketten/ And as you can see the slideshow work the image properly, however the thumbnails have a black background. I'd really appreciated any kind of help ...
since the site has a white background, a quick workaround could be to save the pngs as jpeg with white background? this thread mentions a possible solution: wordpress dot org/support/topic/plugin-nextgen-gallery-problems-with-png-transparency-thumbnails?replies=9 this has an unpdated solution: wordpress dot org/support...
next gen gallery thumbnail problem
wordpress
I have both regular blog posts and a custom post type in a blog. The page template shows the author posts link. If you click on that link for an author that has authored some posts, that page (blog/authors/mr-author) shows the expected bio information and a list of the author's posts. However, if you create a user that...
I believe the issue is that the default query only queries for <code> post </code> post-type. (stackexchange-url ("See related WPSE question here.")) So, you probably need to modify the query in your <code> author.php </code> template file, so that all relevant post-types are included in the query.
the_author_posts_link() for authors of custom post types
wordpress
I searched around and the URL below is all I could find on this problem. If I publish a custom post type's post without entering in a post title, it wipes the whole post's info and says "published". However, the post is nowhere to be seen. Looking into the database, I can see the post is created, but it's set to auto d...
The function that's in charge of saving posts on the database (wp_insert_post) requires at the minimum a title and content: http://codex.wordpress.org/Function_Reference/wp_insert_post Edit: I created a quick and dirty jquery solution. Input this in your functions file or in a plugin: <code> &lt;?php add_action('admin_...
Posts created in a Custom Post Type are lost if published without a title
wordpress
Are there any hooks for running plugin code after a core upgrade? Specifically, I'm running into issues that a users wp-admin column choice in the 'Screen Options' are modified after an upgrade - I believe if they choose "auto". After doing an svn sw I lost my "publish" box from the post/pages page. This is causing som...
Check the filter <code> update_feedback </code> , he works after the update and you can use for all stuff after an update. An exmple plugin can you find in this trunk .
Hooks to run after a core upgrade?
wordpress
I was hoping someone could clear the air for me when it comes to using transients with memcached. When running a plugin like w3-total-cache, are there any actual performance advantages to using transients to store large post queries? If we are running memcached, the queries will already be cached by memcached correct? ...
When and how to use transients or the object cache is a bit tricky and site-dependent. Here's the breakdown: When not using a persistent object cache (like memcached): Transients are stored in the database Objects in the object cache are only cached for the duration of the page request. When using a persistent object c...
Using transients in conjunction with memcached
wordpress
I am running wp subdomain multisite in combination with domain mapping. This means I can create a new subdomain site xyz.site.com and map the domain name 'xyz.com' to that site. The problem I have is someone clicks 'register' on the subdomain mapped site 'xyz.com' and they are sent to site.com to register. This is VERY...
What @petermolnar suggested also redirects your users to the main site if they want to register (I've tested this but feel free to make use of it. It's good practice). What you need is a registration/login/edit-profile plugin for the front end: http://www.cozmoslabs.com/1341-wordpress-profile-builder-a-front-end-user-r...
wordpress multisite, how to keep user on subdomain throughout registration process?
wordpress
Twenty Eleven Theme... On the home page, I have successfully filtered the loop to display just "Featured" posts with pagination functioning properly through nav links. I'm trying to display posts from all categories on another page called "Unfiltered." Why do the nav links disappear when used on this other page? edit: ...
<code> twentyeleven_content_nav() </code> uses the main query object, <code> $wp_query </code> . You'll need to use the <code> $wp_query </code> variable, rather than <code> $unfiltered_query </code> , then <code> wp_reset_query() </code> to restore the original <code> $wp_query </code> (which it'll find in <code> $wp_...
get_query_var( 'paged' ) not working outside of homepage
wordpress
I'm loading some javascript files in the parent theme. The path in the parent theme is "scripts" > "custom.js". In the child theme, I'm creating the same path (scripts > custom.js) and changing some of the jQuery inside the custom.js file. The problem is that the changes are not being applied. Is this the wrong way to ...
Child themes only override files in the main theme directory (like header.php) that are called in with functions like get_template_part or get_header, etc. The correct way to add scripts to WordPress is with wp_enqueue_script. If your parent theme uses this, you can override the JS files by using wp_dequeue_script and ...
How to override javascript files in child theme?
wordpress
I have several custom fields that I need my client to be able to edit at anytime. For the sake of convenience, I'd like them to be able to edit these custom fields from the Quick Edit. This way they don't have to open a bunch of new pages to go into each post. Is it possible to add editable custom fields to Quick Edit?...
Have a look here . It's a pretty detailed tutorial but can be quite involved, don't forget to check the comments area.
Show Custom Fields in Quick Edit
wordpress
Using WordPress version 3.2.1 I've noticed that when I use this filter: <code> add_action('the_content', 'myFunction', 0); </code> The content editor places the content written from "myFunction" within the last paragraph tag of the content. How can I force the WP to append the code after the last tag? For example, if m...
Your filter is being applied before <code> wpautop </code> , the filter which wraps all of the paragraphs in WordPress content with <code> &lt;p&gt; </code> tags. A value of zero for priority means that your filter will be applied first , before all other formatting filters. Try applying your filter later - with a prio...
WordPress appends the_content filtered text inside last paragraph tag of content (rather than after it)
wordpress
I'm wondering if anyone could offer advice on how to think about creating an A/B testing plugin for posts that: A) lets me assign unique URLs for each variant post * 1) and * B) is customizable on the frontend (i.e. new-post.php). There seems to be two ways I could go about doing this: The first way: Create three separ...
You could try our free MaxA/B plugin . It was made for split testing different URLs.
A/B testing of posts with unique URLs for each variant AND editing in custom fields
wordpress
I have a Wordpress 2.7.x setup that I would like to migrate to the latest version 3.2.1, however I need to make a stepped-upgrade as some plugins need an older version first (3.0.6 IIRC). However Wordpress is only offering me the latest and greatest version to upgrade to. Is there a way - prefereably within the admin -...
You can hook on <code> option_update_core </code> and edit the update url, as a plugin you can do something like this (Remember to disable the plugin after updating wordpress) <code> add_filter('option_update_core','wpse_26750'); add_filter('transient_update_core','wpse_26750'); function wpse_26750($options){ global $w...
Update to older wordpress version from admin?
wordpress
How to disable edit post option for post one day after publication?
Ok! @Kieran and @Rarst, here it is :) <code> function stoppostedition_filter( $capauser, $capask, $param){ global $wpdb; $post = get_post( $param[2] ); if( $post-&gt;post_status == 'publish' ){ // Disable post edit only for authore role if( $capauser['author'] == 1 ){ if( ( $param[0] == "edit_post") || ( $param[0] == "...
How to disable edit post option after period of time?
wordpress
A plugin I've released has a collaborator. So I put them into the readme.txt file and they show up on the plugin page and all that. Does doing this automagically give them access to the SVN repository for the plugin? Or is there some other process to go through to get them access? Or is only one user allowed per repo? ...
As long as you use a valid WordPress.org username in the <code> Contributors: </code> tag in <code> readme.txt </code> , then yes: once the <code> readme.txt </code> is parsed by Extend/SVN, then the specified username automagically has SVN-commit access to the Plugin. Note: I know that it works for the <code> Contribu...
Giving Multiple Authors Access to a Plugin's WP.org Repo
wordpress
Link: http://themeforward.com/demo2/2011/01/02/centered-and-captioned-image-longer-title/ I've tried this about 8 times and need some help. For the bread crumbs (navigation trail on the top of the page) I would like to add a span class only to the »'s that appear. If somebody could add this in the function below I woul...
change: <code> $delimiter = '&amp;raquo;'; </code> to: <code> $delimiter = '&lt;span class="myclass"&gt;&amp;raquo;&lt;/span&gt;'; </code>
Adding a Span Class in a Function
wordpress
I am currently in the process of starting my first blog. Currently, I am stumped. I have a homepage slider that refuses to work with me. The documentation for the theme I am currently using is located here . The problem I'm having is I can't figure out how or what the slider decides to use as an image and then the capt...
I was able to solve the problem by hard coding. The documentation was to vague and not properly detailed for me to figure out how to use the settings. Here is the code: <code> &lt;!-- BEGIN SLIDER --&gt; &lt;div id="slider"&gt; &lt;a href="http://ko....cat=4"&gt;&lt;img class="alignnone size-full wp-image-254" title="A...
Homepage slider not using correct images
wordpress
When a New User to register on my site ... I would like that in your login, the first letter always be capitalized. ( uppercase letter ) Forcibly. Does anyone have any idea how to do this?
You can possibly add a filter to <code> sanitize_user </code> and return <code> ucfirst($username); </code> , I haven't tried it though to verify if it will work.
By registering always make uppercase the first letter of the login
wordpress
I currently am getting this error: <code> Warning: explode() expects parameter 2 to be string, object given in D:\...\portfolio.php on line 12 </code> Here is my portofolio.php: <code> &lt;?php $current = get_the_category(); $current_id= $current[0] -&gt;cat_ID; $categs_list = get_category_parents($current_id); $pieces...
Let's start from the top: <code> $current = get_the_category(); </code> This returns an array of objects , one object for each category. <code> $current_id= $current[0] -&gt;cat_ID; </code> This returns an object , the first object in the previous array <code> $categs_list = get_category_parents($current_id); </code> T...
Explode() expects a string
wordpress
I'm writing new theme for my blog. And I want to make some kind of post rating using custom fields. There are two fields: 'good-post' and 'bad-post'. And after each post I placed two buttons. Yep, 'Good post' and 'Bad post'. On buttons I placed onclick event that calls this AJAX function: <code> function ajaxIncGoodPos...
First off, you should consider using using the building WordPress functionality rather than linking straight to a PHP file. Anyone could game that very easily and artificially vote up posts. To use the wordpress ajax functionality, send your ajax request to yoursite.com/wp-admin/admin-ajax.php, and use standard plugin ...
Post rating using Custom Field
wordpress
I'm using 'Meta Box Script for WordPress' to create custom meta boxes and everything is working great...except the following: We have a textarea that we want to act, basically as another WP the_content (It's for hidden content that is only shown once a link to show hidden content is clicked). My end-users want to be ab...
I finally found the answer to this and am posting it here in case someone else needs the answer. Just put the following in your theme file. <code> &lt;?php </code> <code> global $post; </code> <code> $variable_name = get_post_meta($post-&gt;ID, 'custom_metaBox', true); </code> <code> echo html_entity_decode( $variable_...
Linking text within textarea of custom meta box
wordpress