question
stringlengths
0
34.8k
answer
stringlengths
0
28.3k
title
stringlengths
7
150
forum_tag
stringclasses
12 values
I'm thinking about using WordPress as a content management system for a school. The frontend of WordPress itself would never be seen by the students, but the admin interface would be used by teachers to post bulletins and other messages and news items. Wordpress would then provide an RSS feed to integrate with the scho...
First, once you assign users to the role of Author or Editor they will see quite a few fewer menu items (Settings and Appearance goes away) - see Roles and Capabilities. Try creating a second account for yourself and seeing if that helps. You can then remove additional menu items using the Admin Menu Edtior which is a ...
Simplify the admin end
wordpress
I am creating a custom events page and I want to know how to create a custom meta box to save event dates. I don't want it to be a regular meta box because I will be using this to make a custom search bar so I am guessing I have to save it to MySQL no? I am lost, as to how I have to go about this. Any ideas? Thanks in ...
If you're in need of Meta Boxes for WordPress, check out the amazing code in github by jaredatch. https://github.com/jaredatch/Custom-Metaboxes-and-Fields-for-WordPress This allows you to add all sorts of metaboxes to your WP theme (or plugin). Date Picker, file upload, wysiwyg, text areas, text boxes...it's really ama...
How do I create a meta box for dates?
wordpress
I've recently switched from linux to windows hosting on IIS7. I have permalinks working fine, but for some reason when I try to view the site index (index.php) I get an internal wordpress 404. I can only assume this has something to do with the migration but am baffled as to the cause. My web.config contains this: <cod...
The problem is IIS rewriting. You actually need to do two things to make this work if using custom permalinks on IIS. In <code> Settings-Permalinks </code> select <code> Custom Structure </code> and enter <code> /%postname%/ </code> . In your web.config, use this as your rewrite section: <code> &lt;rewrite&gt; &lt;rule...
404 for index.php
wordpress
I operate several wordpress sites on Dreamhost. I have some automated scripts that I want to be able to automatically post to the wordpress blogs. I can do this via a command-line tool or via the XML-RPC. Unfortunately: I can't find a command line tool that will reliably post. (I have shell access on the computer on wh...
Since you have shell access, you could use wp-cli : <code> wp eval-file your-posting-script.php </code>
Automated posting to wordpress from commandline or XMLRPC API on Dreamhost
wordpress
I'm using a page as my blog archive, ie http://mysite.com/blog I'd like to list the posts under that url: http://mysite.com/blog/untitled/hello-world/ I've added Category base "blog" and now my categories appear correctly (http://mysite.com/blog/untitled/), but posts do not. The thing is that I have other custom post t...
In case someone else is interested: Removed Category base "blog" since it was conflicting with the actual "Blog" page slug. Changed the permalinks to <code> /blog/%category%/%postname%/ </code>
Custom Permalinks for Posts only
wordpress
Alright, so I want to see who can help me implement this idea I have. I just want one single Icon next to a post. If you click it, then you "Heart" it or "Love it". The post has a counter to see how many people "heart" it. Then I want to change the loop to show off "Trending" posts, "Hot Posts" or something along those...
The GD Star plugin implements this. It is thumbs up and thumbs down in their parlance but the image sets are configurable. http://www.gdstarrating.com/
Rating system and changing the loop
wordpress
I want to reorder stuff in a custom post. I got the meta box and editor working together, but currently the editor is above the meta box and I need it to be the other way around. This is the code for my meta box: <code> // adding the meta boxes add_action("admin_init", "tl_admin_init"); function tl_admin_init(){ add_me...
This will allow the post editor to be moved like the other sortable post boxes. <code> function move_posteditor( $hook ) { if ( $hook == 'post.php' OR $hook == 'post-new.php' ) { wp_enqueue_script( 'jquery' ); add_action('admin_print_footer_scripts', 'move_posteditor_scripts'); } } add_action( 'admin_enqueue_scripts', ...
Re Order Editor to be after meta box
wordpress
i'm new in Wordpress and I'm currently building my personal website where my works will be published and have a blog too. For the portfolio layout I've looked up this tutorial: http://net.tutsplus.com/tutorials/wordpress/create-a-multi-layout-portfolio-with-wordpress/ It gives me what I want, more or less. The point is...
Install the Custom Post Template plugin and create different templates for your project pages. This works like page templates . You may also consider a custom post type for your projects to use different taxonomies, meta data and templates.
Wordpress single.php different layouts projects / posts
wordpress
I realize that one can add custom links through the menu manager but is there a way to manually create such components through the functions.php file? More specifically, one example here relates to a situation I currently have where I created a custom post type for "events" meaning all associating posts show up like do...
When you made a custom post type, you might be have template file for it too, i.e. template-events.php. Then you could make a page titled events, with events slug and set the template to template-events. After you got an events page, there's must be an Events option on your menu manager.
Hard-coding custom menu elements for menu manager
wordpress
Is there some simple way which would allow one to add a page to a menu (through the menu manager interface) and be able to define if the inclusion of this item should automatically add all subpages up to a specific depth? Essentially, the logic I am trying to use here applies to a user adding a new page with content th...
There's a plugin for that: http://wordpress.org/extend/plugins/add-descendants-as-submenu-items/
Adding all sub-pages to the menu manager
wordpress
How can i get the <code> total </code> value from the following URL <code> http://tradephonein.com/checkout-swap/?total=$18.00&amp;broken=No&amp;water=%20No&amp;power=Yes,%20battery%20included&amp;lcd=No&amp;charger=&amp;manual=Owner%20Manual&amp;box=&amp;other= </code> I have this kind of a string query, you'll see th...
If those values are in your query then you can use the following <code> if( get_query_var('total') ) { $total_value = floatval( str_replace( '$', '', get_query_var('total') ) ); } </code> or else <code> if( isset( $_GET['total'] ) ) { $total_value = floatval( str_replace( '$', '', $_GET['total'] ) ); } </code>
Value of Query string
wordpress
I've been looking at schedulers and appointment maker plugins the last few days, but so far haven't found anything suitable. So thought I'd ask, Basically I just want to be able to list a loads of dates for scheduling games and practices in the admin section and then to display say the next 5 - 10 games and practices o...
http://wordpress.org/extend/plugins/events-calendar/screenshots/
Minimalistic schedular
wordpress
I installed the plugin and assigned it to the relevant page but the problem is that the custom fields display 'no image selected' after I have uploaded them and do not appear on the relevant page. Any ideas? For reference, I have set 'Page Template' as equal to 'Home' (the relevant page) on the custom fields rules. Thi...
Did you use the correct format in Advanced Custom Fields when you set up the field? It has an option to return the attachment ID or the image URL when you create the field. So to use it this way you'd have to be sure that it was outputting the image URL not the attachment ID.
Advanced Custom Fields Plugin - not displaying images
wordpress
According to: http://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters Default order is DESC and default orderby is date. In a custom plugin, plugin is applying the following pre_get_posts filter: <code> function custom_search_filter($query) { //echo '&lt;pre&gt;'; var_dump($_GET); echo '&lt;/pr...
Yes, I got it: <code> function custom_search_orderby($orderby) { global $wpdb; if ( is_search() ) { if ( isset($_GET['order']) ) { if ( $_GET['order'] == 'DESC' ) { $orderby = $wpdb-&gt;prefix . "posts.post_date DESC"; } else { $orderby = $wpdb-&gt;prefix . "posts.post_date ASC"; } } } return $orderby; } add_filter('po...
How to alter query order direction using $query-> set('order', 'ASC'); inside a pre_get_posts filter?
wordpress
I quite like the default WordPress Gallery, but i dont like how it plonks the images as thumbnails, with a link to the larger image. Is there anyway to make it display the images not in a thumbnail link, just as either the full size image or one chosen from the media uploader? Also in a an li list? So simply looks like...
Put this code in your functions.php and check. <code> function custom_gallery( $output, $attr ){ global $post, $wp_locale; static $instance = 0; $instance++; // We're trusting author input, so let's at least make sure it looks like a valid orderby statement if ( isset( $attr['orderby'] ) ) { $attr['orderby'] = sanitize...
Default Gallery Edit/Template Editable?
wordpress
I've tried a few plugins to add mime types including the PJW Mime Config plugin. And adding this to a themes <code> functions.php </code> file would work fine, too, for a non-WPMS site. But I need these to be allowable throughout the network. So I've written my own plugin to do the trick. After looking at info from the...
Figured it out! :D Here's the new code: <code> // Add the filter add_filter('upload_mimes', 'tqps_extended_mime_types'); // Function to add mime types function tqps_extended_mime_types ( $mime_types=array() ) { // add your extension &amp; app info to mime-types.txt in this format // doc,doct application/msword // pdf a...
Add mime types with plugin
wordpress
I'm creating a custom walker for my nav menu. The goal is to split the menu in to columns like so: I can easily determine where I am in the list by looking at <code> $item-&gt;menu_order </code> . What I don't know is how many items are in the menu total. How can I figure that out from inside the walker? Updated: I rea...
Call <code> wp_get_nav_menu_object </code> to get a menu object, which will give you the count of items for that menu. Example: <code> // Get menu object $my_menu = wp_get_nav_menu_object( 'your-menu-name-or-slug' ); // Echo count of items in menu echo $my_menu-&gt;count; </code> Hope that helps.
How to count nav menu items?
wordpress
I'm building a site which lets users to submit links using User Submitted Posts plugin. I want every post title to link to its URL something like reddit. Moreover, User Submitted Posts plugin add URL to each post in the posts meta table. How could I do that?
I just released a plugin that does pretty much that... you may want to take a look at the Recommended Links plugin and see how its done... or if this plugin works, try converting your links to the custom type I'm using and just install this plugin. My approach was to create a new custom post type for these links, add a...
Link Posts to External URL
wordpress
I am trying to use mod_rewrite and modify WordPress' URL handling to allow for passing variables to PHP from the URL while maintaining "pretty permalink" functionality. (on WP 3.2.1) Something like this: http:/epiclasers.com/hello-world (normal with permalinks set to /%postname%) http:/epiclasers.com/state/hello-world ...
I ended up solving this with a little bit of code (in the form of a plugin): <code> if(isset($_GET['state']) OR isset($_GET['city'])) { $url = explode("/", $_SERVER['REQUEST_URI']); $url = end($url); $_SERVER['REQUEST_URI'] = "/" . $url; } </code> This code in essence removes the "/arizona/" or "/arizona/phoenix/" from...
Modifying WP URL handing code?
wordpress
My site currently has regular posts (in a section called "Trend Watch"), as well as a Custom Taxonomy (called "Region"). My permalink settings have this Custom Structure: <code> /trend-watch/%year%/%monthnum%/%postname%/ </code> which gives me these urls: <code> /trend-watch/regions/ </code> (lists all terms in the Reg...
You need to set the 'with_front' parameter in the rewrite argument for the custom post type to false. <code> 'rewrite' =&gt; array('slug' =&gt; 'reports', 'with_front' =&gt; false) </code>
Remove unwanted part of permalink custom structure from CPT url?
wordpress
I have a suitable page, archives.php, located in the theme's root directory, but I cannot get it to show up as a page template. Is there something else I need to do so that it is recognized?
Archives.php is usually not a page template - it is a file used to display all the archived posts (usually some sort of list ...) It is usually triggered by a function that deals with archived posts like <code> &lt;?php wp_get_archives('type=monthly'); ?&gt; </code> Anyhow - A page template file has to have this code i...
How to make an archive page template using Wordpress 3
wordpress
Is there a plugin that when upload from url/web, it will also give an option to store the images locally and/or into the media library?
I am afraid the upload through url does not uploads the image on your site server but it just inserts it in to the post so it can not appear in the media library. Through a plugin You can use the Grab and save plugin to achieve what you want but i think you don't need a plugin for this read the instruction below and yo...
Store in media library image uploaded from url
wordpress
I've found similar questions here, however I can't modify the answers to get images only from a certain post type - as the post type in those examples are "attachment" and not the name of a custom post type. Is there a way to declare a custom post type argument as well? stackexchange-url ("Similar question"), stackexch...
Try this code in your template. <code> $query = new WP_Query( array( 'post_type' =&gt; 'custom-post', 'posts_per_page' =&gt; -1 ) ); if( $query-&gt;have_posts() ){ while($query-&gt;have_posts()){ $query-&gt;the_post(); $image_query = new WP_Query( array( 'post_type' =&gt; 'attachment', 'post_status' =&gt; 'inherit', 'p...
Gel all image from certain post type
wordpress
I have removed the edit profile page from WP admin as I don't want users to be able to edit their details as this is a closed intranet and their details are fed from AD. However I do want them to be able to publish their own user description (Biography). So I've set out to add a new admin page to give the user the abil...
<code> update_user_meta($current_user-&gt;ID, 'description', $_POST['user_description']); </code> in the form processing function will save the bio. I would keep the form action on the same admin page. As for data validation, I don't see what there is to validate in the first place. It's just a string - not an email, a...
How to save user meta on custom admin page
wordpress
I have a custom post type just for contacts, I want to create a metabox with the contacts birthday and have it notify the site admin when it comes up (Or a day/week/month before the date if possible).
WP doesn't have a real Cron Job System/APi, but it got the Schedule API , as you can see here . Other related functions can be found here in codex filed under " See Also ". That's the closest you will get with WP.
CPT Metabox with email notification
wordpress
I've got this inside my functions.php file. <code> function add_product_category_automatically($post_ID) { global $wpdb; if(!has_term('','product_relation',$post_ID)){ $cat = get_the_title($post_ID); wp_set_object_terms($post_ID, $cat, 'product_relation'); } } add_action('publish_product', 'add_product_category_automat...
There was some confusion in the original question with the terminology i used. I didn't find a way to do what i was after but it's to late for me to do it now.
I've got a function that auto creates taxonomy terms - Can it auto delete them as well?
wordpress
This WordPress-based website i just released is dead slow. I've optimised my theme a lot and get a pagespeed of 91/100 but the first time to byte is the culprit: it takes 8 up to 20 seconds. I've installed W3 Total Cache, memcache, APC, eAccelerator, xCache, but the site keeps being super slow. Server: CentOS 5.7 (x86_...
If possible get your PHP updated to the 5.4.x branch. Before you add your caching layer you need to determine whats slowing down MySql and PHP. You need to enable WP_Debug and eliminate any PHP errors. Look for undefined indexes, syntax errors and deprecated functions. That 20 second to first byte is all PHP, MySql and...
Website is slow: advice on optimization
wordpress
I am modifying the facebook comments plugin to my purposes. What I'd like to do is have it remove Wordpress native comments automatically if it is enabled- in fact what I'd really like it to do is use the Wordpress comments settings in the item itself and/or general settings to decide whether it should show or not. Dis...
Most themes used <code> comments_template </code> to include their comment areas. It's completely full of filters, one of which is the include file (usually comments.php) that you can hijack to include a file from your plugin that contains all the stuff for facebook comments (or nothing if you just want to disable comm...
disable defaault wordpress comments from a plugin
wordpress
When I insert an image into a post and link to that image, the link is sending me directly to the file rather than displaying the image via my image.php template. How can I solve this? I haven't been able to find the solution online. This is not a problem with my [gallery] shortcode, which is bringing me to image.php -...
While inserting the image into the post make sure the Link URL is set to Post URL.
Image.php Problem - Post Images Not Displaying In It
wordpress
I have created a template for gallery named image.php which allows me to create a news website style image gallery that can be embedded in posts. But I need two more things to make this complete. First, I want to know how to create a text link to the first image in a gallery , rather than displaying thumbnails for the ...
Attachments in a gallery are their own posts, with some special settings. To get a list of all the attachments for a given post, you basically just create a new query and specify the post parent and attachment type. <code> $gallery_images = new WP_Query(array( 'post_parent' =&gt; $post-&gt;ID, 'post_type' =&gt; 'attach...
The WordPress Gallery, Grabbing The Link and Images?
wordpress
In an author.php template, i count the author post in a custom post type with $wpdb-> get_var, <code> $post_author = $curauth-&gt;ID; //author id $count = $wpdb-&gt;get_var( "SELECT COUNT(*) FROM $wpdb-&gt;posts WHERE post_author = $post_author AND post_type IN ('ideas') and post_status = 'publish'" ); </code> is it po...
This wouldn't be possible unless you keep a log of users that have voted the Idea. You will have to create another hidden post_meta array which will store a list of all the users who have voted the Idea. In that way you could count the number of votes an author has given. Or better yet you could create and update the u...
wpdb-> get_var - count author posts, meta value
wordpress
One of my WP sites is using a lot of CPU, and I am wondering if this is caused because of the high number of spam comments it is getting. Can that be the case? Is there an easy way of checking that? Thank you.
Any time your traffic goes up your CPU usage will go up. Based on what you're saying it could be bot activity. I'm also assuming you're on a shared host that is overloading the server with 10 billion accounts. My suggestions include: Running a virus scan for WordPress via any number of available plugins Minimize the nu...
The effect of spam comments on hosting resource usage (CPU)
wordpress
Hi to the community!!! I need some help with pagination in author.php template. I have pagination working in all my loops except in authors.php that i get a 404 error. In my settings/reading i have set blog posts to show as 1. The first step was the author rewrite from author to artist, <code> function set_new_author_b...
i found a solution to my problem! <code> function custom_author_archive( &amp;$query ) { if ($query-&gt;is_author) $query-&gt;set( 'post_type', 'idea' ); } add_action( 'pre_get_posts', 'custom_author_archive' ); </code>
pagination in author.php template returns 404 error
wordpress
On my new worpress install, I have code that reads <code> &lt;img src="&lt;?php get_stylesheet_directory_uri(); ?&gt;/images/logo.jpg" /&gt; </code> This code worked, untill I started using a subdomain (went from example.com/dev to dev.example.com) and changed these urls in my general settings. Now the <code> get_style...
That would be because <code> get_stylesheet_directory_uri </code> only returns a value. If you want to echo it to to the screen you have to include echo or print. <code> &lt;img src="&lt;?php echo get_stylesheet_directory_uri(); ?&gt;/images/logo.jpg" /&gt; </code> <code> bloginfo </code> works fine as well, but when y...
what could cause get_stylesheet_directory_uri() to fail?
wordpress
I have a custom post type "event" which stores a custom meta as a timestamp ($event_date). The date is always in a dd-mm-yyyy format, so I can generate a unix timestamp from this key. The timestamp doesn't match the pubdate, it's just any date set in the future. I'd like to make a wp query to list all upcoming posts (e...
I recently did exactly the same, you'll have to use custom query: <code> $date = time()-86400; /* today */ $querystr = " SELECT $wpdb-&gt;posts.* FROM $wpdb-&gt;posts, $wpdb-&gt;postmeta WHERE $wpdb-&gt;posts.ID = $wpdb-&gt;postmeta.post_id AND $wpdb-&gt;posts.post_status = 'publish' AND $wpdb-&gt;postmeta.meta_key = '...
Display upcoming events in the next 30 days by querying posts with timestamp in custom meta
wordpress
I developed our wordpress site on a subdomain, so I did not disrupt our homepage while I got everything up and running with Wordpress (It was originally running under Orchard, and I needed tochange it). After the WP site was ready I changed the Wordpress Address general setting to the correct URL, and copied all the fi...
These two pages on the Wordpress codex give a good overview changing URLs: http://codex.wordpress.org/Changing_The_Site_URL http://codex.wordpress.org/Moving_WordPress However to cut a long story short, what I always do is the following: Back everything up Copy this handy little file to the root of your site: http://in...
How do I correctly transfer my site from one domain to another?
wordpress
I am working on a new plugin, and want to add my plugin menu to the Themes/Appearances section. <code> add_submenu_page('themes.php','Widget Area Manager','administrator','widget_area_manager','wm_area_manager_admin'); </code> However the menu get's added to the setting's section of the dashboard. What am I doing wrong...
Try this code. <code> function widget_area_mamanger(){ add_theme_page( 'Widget Area Manager', 'Widget Area Manager', 'administrator', 'widget_area_manager', 'wm_area_manager_admin' ); } add_action('admin_menu', 'widget_area_mamanger'); </code>
Using add_sub_menu to put into Appearance Section
wordpress
What are the possible causes for getting the "You do not have sufficient permissions to access this page." message when logged in as admin? I've done a lot of searching and found a lot of possible solutions, but in my case they haven't worked. In my case I've taken a copy of a database off our staging site (close enoug...
In my case it happend that the capability for user 1 somehow got wiped, so the SQL command: INSERT INTO wp_usermeta (user_id, meta_key, meta_value) VALUES(1,"wp_capabilities",'a:1:{s:13:"administrator";b:1;}'); did the trick.
Access denied error when logged in as admin
wordpress
I'm creating the search page for my wordpress site. The problem I'm having is that most of my articles have custom post types that display a featured image. The problem is that some do not. I am trying to figure out how I can tell my loop to include the custom post type if it exists but to ignore that section of code i...
No need to be that complex, you can use the has_post_thumbnail function <code> &lt;?php if(has_post_thumbnail()): ?&gt; &lt;a href="&lt;?php the_permalink(); ?&gt;"&gt;&lt;img src="&lt;?php bloginfo(url); ?&gt;&lt;?php echo get_post_meta($post-&gt;ID, 'featured-image-large', true); ?&gt;" title="&lt;?php echo get_post_...
How do I do this?: If custom post type exists, echo it, else do not
wordpress
I'm using some HTML5 functionality that only works on IE9 and I need to detect whether visitors are running on IE8 or below (mainly just IE8 or 7 of course). I've tried some plugins but the one that was working didn't seem to support IE9 (just up to 8). It's called PHP Browser Detection (http://wordpress.org/extend/plu...
I would suggest using that plugin, but slightly modifying it for your needs. For example, you can find the code block in php-browser-detection.php that does the IE7 check: <code> function is_IE7 (){ $browserInfo = php_browser_info(); if(isset($browserInfo['browser']) &amp;&amp; $browserInfo['browser']=='IE' &amp;&amp; ...
What is the best way to detect IE browsers 8 and below?
wordpress
When I register my custom post type, I set this: <code> 'hierarchical' =&gt; true, 'supports' =&gt; array( 'title','author', 'page-attributes' ), </code> So, I am supose to see 'order', 'templates', 'parents' in Attributes box when create new post. But, I don't see the 'templates' drop down showing up. Anything else I ...
You can't apply templates to custom post types in this manner. That will show up only if the post type is 'page' ( Check the wp-admin/includes/meta-boxes.php line 568 ). However if you want to style all your single custom post types in the same manner but different from other post types you could use the single-[postty...
How to get template drop down menu in page-attributes of custom post type?
wordpress
I'm having the common media upload problem where images will fail uploading and send the error. However, this problem seems to have popped up with a change I've made recently because my WordPress site had been running for a few weeks and had no previous trouble with uploading media. It just recently acted up on me and ...
Have a look at this comment -> http://wordpress.org/support/topic/missing-temporary-folder-phpini-not-accessible#post-1412215
Another "Sent Headers" Error w/ Missing Temporary Folder
wordpress
This looks like a great plugin. When creating a new feed, I check the appropriate ExactTarget list(s) in Step 1. Step 2 appears prompting me to select a Gravity Form, but when I choose a form nothing else happens. My browser inspector was showing the AJAX request to .../wp-admin/admin-ajax.php with a status of 200, but...
It appears that there are some SimpleXMLElement objects in the array that is to be serialized in stack trace above, and as the error says, 'Serialization of 'SimpleXMLElement' is not allowed.' Boo. I tried to figure out how to modify the response so it replaces all the SimpleXMLElement objects, but this was a pain. I e...
Gravity Forms ExactTarget Add-on Plugin: Nothing happens after step 2 when creating a new feed
wordpress
I'm looking to change the post created date to a modified date on my post template (single.php). Moreso, I'm looking to control when I update that date based on whether I make significant changes to the post. I'm thinking I might have to create a custom field as well as an option box in the edit post screen to set the ...
use this into the loop or if you want to change created date to modified date than replace that with below code. As I know this feature works from all version of wordpress after 2.1 <code> &lt;?php the_modified_date(); ?&gt; </code> More detail you can find here http://codex.wordpress.org/Template_Tags/the_modified_dat...
Change post_date to post_modified date on post template?
wordpress
Can someone tell, how to check whether it's empty? <code> &lt;?php bloginfo('description'); ?&gt; </code> Something like: <code> &lt;?php if (!empty bloginfo('description');) ?&gt; </code> Thanks a lot.
<code> if ( get_bloginfo( 'description' ) ) { //do something } </code> bloginfo echoes the description, get_bloginfo returns php variable
if not empty bloginfo('description')
wordpress
my theme currently uses the wp_update_user function to update a set of user metas. I created to some new user meta fields that I would like to include in the existing wp_update_user. The function updates the meta fields based on form elements, like this... <code> $_POST['form']['ID'] = $userdata-&gt;ID; $_POST['form'][...
I would use the update_user_meta function instead.
Uses for function: wp_update_user
wordpress
I have a WordPress site under local version control with Git. I deploy it to the production server using Capistrano. For the initial deployment, I manually import the SQL database to the production server, and change all the local references by hand. Any content changes are made on the production server from then on. T...
Not very well. There are issues with not only WordPress but plugins in general when moving databases on the fly, as for as I know, there is no seemless (or effortless) way to do this, it's hacky at best, for that reason most people still use database dumps. If you just care about preserving db urls, you can mimic the l...
Deploying Updated or New Plugins That Modify the wp_options Table
wordpress
We have a set of five health blogs which have been running for about six months. Other than using the same theme (styled slightly differently for each one), they are currently completely separate. We are now trying to figure out how best to combine them into a "network" of blogs. Note: this doesn't have to mean WPMU, t...
It would seem that option 2 is your best approach. This would allow the easiest way to share content. You could set up categories to determine where each post should go, this allows you to share content and keep it separate. Option 2 is epically a good choice if your blogs are similar in style, and just have some color...
Is there a way to share content amongst wordpress sites
wordpress
I solved the problem with the page, the correct answer is ptriek's comment below. Well I'm having a bit of an odd problem here, wp_nav_menu works on all pages EXCEPT my category pages (probably my archive page too but there's no links on the website to the archive pages so that's alright). Although there is archive.php...
This question was answered by ptriek, a shame he didn't post his answer so I could accept it, but for the sake of completeness I will answer it. The solution was found here: http://wordpress.org/support/topic/wp-nav-menu-dissapears-in-category-pages-1
wp_nav_menu not appearing for a couple pages
wordpress
With the following code, I do not get the result set ordered by titles. No matter what values I give to 'orderby' and 'order', I get the same ordering. The parameters seem to be ignored (or overridden?) by something else.. Any idea how I troubleshoot this one? Is there a specific filter I should be looking at, that som...
I noticed you have an extra quote after order in your args. That affecting it?
orderby ignored by wp_query
wordpress
I'm new to WordPress as I normally code my stuff by hand, I've been uploading some media to display links to within protected pages, which is great, however, anyone can access the direct url of the media. Does anybody have a suggestion how to stop this? I'm reluctant to just go hacking into .htaccess.
The first thing you need to do is disable direct access to the directories the files are stored in by uploading blank index.html files to wp-content/uploads/ and all of its subdirectories. That way no one can go browsing around your upload directories finding that media manually. In order to keep search engines from cr...
The best way to protect uploaded media in WordPress?
wordpress
As a web designer and developer, I'd love to simply point out my clients to some YouTube videos or articles that explain from the ground up what WordPress is without blowing their mind. Some of my clients are fairly well versed in internet, email and Word, but that's about their remit. Does anyone know of some good tut...
The obvious place to start are the Wordpress sites themselves. For Authors For using Wordpress as an author I would recommend the support site: http://en.support.wordpress.com/ I know this concerns the commercial, hosted, version of Wordpress, but the functionality is more or less the same. There's enough content here ...
What are some good resources for teaching end-users how to use WordPress?
wordpress
Wanted some opinions on a solution I'm trying to come up with: I have a fan/enthusiast plugin I'm working on for fans of TV shows. One of the custom post types attached to the plugin is a release type which stores data on dvd releases of a show. Some of the meta data that I weant stored is info from Amazon using their ...
I think I would write a wrapper function around custom fields, something like this: <code> function get_post_transient( $post_ID, $meta_key, $update_function ) { $current_value = get_post_meta( $post_ID, $meta_key, true ); if ( is_array( $current_value ) &amp;&amp; $current_value['expiration'] &lt; date('U') ) return $...
Transients vs CRON +Custom Fields: Caching Data Per Post
wordpress
I am looking to build my own WordPress theme to house my artwork. Can someone point me to the best tutorials for doing so and also give me some pointers on the best approach to building an image gallary? For example Should I build a custom gallery? Is there a suitable plugin that will simplify things? For background I ...
WP Theming The most important resource for wordpress developers is supplied by the wordpress community themselves: the codex . If you're about to start writing your own theme, the articles on Theme Development and The Loop are a must-read. Also, even though you're just developing for personal use, it might be a good id...
Rolling your own WordPress Themes
wordpress
This is probably a super simple question. But how do I echo the ID of a user on author.php? I've tried <code> the_author_meta('ID') </code> But it didn't seem to want to work. I want to echo it at the end of a URL, for example; http:///www.domain.com/author/sampleauthor-id Obviously, where "id" is that particular autho...
Try this code. <code> $author = get_user_by( 'slug', get_query_var( 'author_name' ) ); echo $author-&gt;ID; </code>
Echo author ID in author.php
wordpress
I've been hacking away at modifying the "Right Now" widget in the WordPress dashboard, and although there are some hooks/filters which apply to just that, they are sparsely documented or explained . Using the example given here , I've created a new row of information in the "Content" section of the widget... I also tri...
I believe the hook you are looking for is <code> right_now_discussion_table_end </code> Update: From your comment i see that i did not explain myself, WordPress closes the table and div just after <code> right_now_discussion_table_end </code> action hook so you can use <code> right_now_discussion_table_end </code> and ...
Add new section to "Right Now" widget
wordpress
What are the possible registration options in Wordpress (everybody can register, nobody can register, only some users can register)? More specifically: can Wordpress be setup so that only those users that are previously approved are registered? can registrations by users be prevented altogether so that all registration...
The "Settings > General" Screen has a checkbox for "anyone can register." This answers your second and third questions - it depends on how that setting is set. For your first question, that functionality is not built into WordPress. Perhaps a plugin like WP User Registration would suit your needs for this bit of functi...
Registration options and approvals
wordpress
Hi is this posible to use same custom cookies across all blogs?Can someone help me with this?
Came across this support topic which may be helpful. It indicates the following for your <code> wp-config.php </code> file: <code> define('ADMIN_COOKIE_PATH', '/'); define('COOKIE_DOMAIN', ''); define('COOKIEPATH', ''); define('SITECOOKIEPATH', ''); </code>
Wordpress multisite,use same cookies across all website?
wordpress
I have two sidebars using the <code> register_sidebars </code> function that display each widget as a list item with a class of <code> .box </code> : <code> &lt;?php if(function_exists('register_sidebars')){ register_sidebars(2, array( 'name'=&gt;'sidebar%d', 'id' =&gt;'sidebar', 'before_widget'=&gt;'&lt;li class="box"...
I coded my own answer together using a filter and <code> dynamic_sidebar_params </code> : <code> &lt;?php add_filter('dynamic_sidebar_params','io_blogroll_class'); function io_blogroll_class($params){ $params[0]['before_widget'] = '&lt;li class="'.$params[0]['widget_name'].' box"&gt;'; $params[0]['after_widget'] = '&lt...
Excluding specific widgets from default sidebar class
wordpress
I was wondering if someone could explain how to roughly code this into php: <code> if catergory = Cars &amp;&amp; user is unregistered &lt;my code&gt; else &lt;my code&gt; </code>
<code> &lt;?php $current_user = wp_get_current_user(); if ( is_category( 'Cars' ) &amp;&amp; 0 == $current_user-&gt;ID ) { ?&gt; &lt;!-- HTML markup here --&gt; &lt;?php } else { ?&gt; &lt;!-- other HTML markup here --&gt; &lt;?php } ?&gt; </code> ID will be 0 in the <code> $current_user </code> object, if the user isn...
If statement for catergories
wordpress
Is there any way to get Tumblr-like post types for WordPress? Ones where when you select a post type, it gives you different fields in the post editor for that type. For instance, if there was a link post type, I could enter the URL, the title, and an optional description of the link. Or, for a photo, I could enter a t...
Alex King made a plugin that creates a different admin UI for each Post Format type. More info here: http://alexking.org/blog/2011/10/25/wordpress-post-formats-admin-ui
Tumblr-like Post Types for WordPress
wordpress
I wonder if is it possible to have a shortcode inside another one? My scenario is this: I create a shortcodes to display content into columns so I can manage the layout of the page more easily. Now the problem comes, when I try to use for sample nextgen gallery into one of those shortcodes. For some reason it just gene...
I usually apply the_content filters to $content to do this. I think you can aslo use do_shortcode($content); <code> // Column ShortCode Description function column_scdescription($atts, $content="null") { return '&lt;div class="description"&gt;' .apply_filters('the_content', $content) . '&lt;/div&gt; &lt;!-- description...
shortcode inside another shortcode
wordpress
I have an older theme that is loading jQuery 'manually', and this conflicts with all plugins that are trying to use jQuery. The following lines are included in the theme header: <code> &lt;script type="text/javascript" src="&lt;?php bloginfo('template_url'); ?&gt;/js/jquery-1.3.2.min.js"&gt;&lt;/script&gt; &lt;script t...
Taking a stab at a general answer, since we don't (yet?) have access to the specific Theme. Note: all of these edits can - and perhaps should - be implemented via Child Theme. First, you need to remove ALL of those lines from <code> header.php </code> . Scripts should be enqueued , rather than hard-coded into the templ...
How to fix my old theme so it loads jQuery properly
wordpress
I wish to create a custom capability for accessing the interface of my plugin. Should the plugin manage adding this capability to all the administrator accounts on activation? If so: Does WordPress manage adding the capability to all administrators of sub blogs and super administrators in multisite installations, or do...
Remove what you add First, please make sure that everything you add on activation also gets removed on uninstall . I got stackexchange-url ("a short tutorial including example code") for you. Test with a small plugin: I really don't know much about MU, but as far as I can tell, the roles object is global across all blo...
How do I create a custom role capability?
wordpress
How can i change the content of the help section for all of my admin pages? I've removed a lot of the admin that won't be used, but i want to add information to the help section for the additional pages. Like the add new page for all my custom post types and different pages that are used in the plugins i'm using. So i ...
You can add this code in your functions.php file. <code> function example_contextual_help( $contextual_help, $screen_id, $screen ) { //echo 'Screen ID = '.$screen_id.'&lt;br /&gt;'; switch( $screen_id ) { case 'my_plugin_page_1' : $contextual_help .= '&lt;p&gt;'; $contextual_help = __( 'Your text here.' ); $contextual_...
Customizing contextual help for every page
wordpress
I tried http://astroclimatology.wordpress.com/wp-admin/options-discussion.php but it didn't work. I do want unregistered users to be able to comment. == What I dont want is email notifications like this: New trackback on your post "we also analyzed zonal wind too" Website: Quora (IP: 107.20.3.229 , ec2-107-20-3-229.com...
Go to your site's dashboard. Then navigate to Settings &raquo; Discussion and disable the "Allow link notifications from other blogs (pingbacks and trackbacks)" option:
How do I disable trackback notifications on a WordPress.com blog?
wordpress
Theres a way to use $query-> set('tax_query' in pre_get_posts filter? for example next code is not altering the query. Note that im building $taxonomies from and custom search. <code> function custom_search_filter($query) { ... // array('taxonomy' =&gt; 'category', 'field' =&gt; 'id', 'terms' =&gt; array( 41,42 ), 'ope...
The <code> $query </code> variable in the filter represents a <code> WP_Query </code> object, so you shouldn't be passing a new <code> WP_Query </code> object into the method for setting that object's properties. The stackexchange-url ("question you copied code from") was incorrectly using the filter, which i feel is t...
Theres a way to use $query-> set('tax_query' in pre_get_posts filter?
wordpress
I'm trying what I thought would be something really simple of masking my url but cannot seem to get it to work. I want to be able to link to images in my img tag without having to type in the full url. i.e. <code> Current url: http://server.com/wp-content/themes/standard/images/img.jpg or &lt;img src = "http://server.c...
Check out the Roots WordPress Theme . They seem to do exactly what you want with the URLs. Here's a snippet from their roots-htaccess.php file: <code> add_action('generate_rewrite_rules', 'roots_add_rewrites'); function roots_add_rewrites($content) { $theme_name = next(explode('/themes/', get_stylesheet_directory())); ...
Masking wp-content/themes/name/images to just images directory using htaccess
wordpress
My pagination links are failing for a custom post type here http://mjw.view-wireframes.com/about-us/press/ the page reloads http://mjw.view-wireframes.com/about-us/press/page/2/ but this has no effect on the displayed posts. Flushing the permalink structure has no effect so my guess is the problem is in the query. <cod...
The answer turned out to be using orderby date instead of post date!
Problems with pagination for a custom post type
wordpress
Morning all, I'm having a bit of trouble finding a function I can use to link to a post type from the admin area. I'm actually using something as simple as: <code> &lt;a href='edit.php?post_type=slides'&gt;Slides&lt;/a&gt; </code> in another area, but didn't know if there was a better way of handling it (since I'm stil...
The following should do the trick: <code> &lt;a href=" &lt;?php admin_url('edit.php?post_type=slides') ?&gt;"&gt;Slides&lt;/a&gt; </code> It's how it's done in the source code. The function <code> admin_url() </code> appends the proper admin address. The output of the url should be: <code> http://www.mysite.com/wp-admi...
Linking to Post Types from wp-admin
wordpress
How to achieve Wordpress members-only page functionality with a link in the primary menu visible only to members? Is there a plug-in for that? The Wordpress version is 3.2.1. It is self hosted.
http://wordpress.org/extend/plugins/wordpress-access-control/ seems to do what you need. You can probably also use http://wordpress.org/extend/plugins/role-scoper/ but it's sort of complicated.
Wordpress members-only page with link visible only to members
wordpress
I'm developing a Multisite where the root site is an agregator (using the mu-sitewide-tags plugin). I created a custom widget to show tags across all sites, but when I click on the tag page on the main blog, it loads like this: http://example.com/index.php/tag/name_of_the_tag/ I tried to remove it creating a custom per...
try to flush your permalink structure that might be the issue
How to remove index.php from a tag or archive page URL in the root blog?
wordpress
I am using Facebook Like Button plugin on pages that just contains a shortcode. When I Like the page and post to Facebook, it shows the shortcode without expanding it. I want to show the expanded contents in Facebook activity stream
If I understand the question correctly, it sounds like the content is being sent without using do_shortcode() , find the portion of the plugin that posts to facebook for you and ensure shortcodes are being executed.
Shortcode does not expand in Facebook like
wordpress
Whats the difference between these two code snippets, and which one should I use for a WordPress plugin? <code> require_once(dirname(__FILE__).'/inc/canagan_admin_functions.php'); require_once( '/inc/canagan_admin_functions.php' ); </code> Thanks, Matt
The first one is like saying... Include the file found in the <code> inc </code> directory, above the directory where this file is located. The second statement is saying... in the server root ( <code> / </code> ) look in the <code> inc </code> folder for <code> canagan_admin_functions.php </code> and include it. The f...
Using require_once in a Plugin?
wordpress
i have created a theme that i would want to set as a demo for people to try. I would like to have a menu that has options where one can set a color or option to test it. Therefore, if somebody wants to check the blue scheme, they would click on "Colors-> Blue" on the menu and the theme would turn to blue NOT GLOBALLY, ...
What exactly and better will be is to submit the dropdown and check which color is submitted. Based on that particular color chose your css file. e.g. you create 3 css files named as blue-bg.css, green-bg.css and black-bg.css then just put the related colors in those css files. e.g. <code> body { background-color: blue...
Present Color Schemes to Clients
wordpress
I have 40+ sites showing up in the "My Sites" page with more planned. Unfortunately WordPress doesn't sort them alphabetically, and that makes it a pain to move from site to site during routine updates and maintenance. I've tried adding <code> asort($blogs); </code> to wp-admin/my-sites.php, but that doesn't help eithe...
Easy one. <code> &lt;?php /* Plugin Name: Sort My-Sites Description: Sorts the My Sites listing on both the page and in the 3.3 admin bar dropdown Author: Otto */ add_filter('get_blogs_of_user','sort_my_sites'); function sort_my_sites($blogs) { $f = create_function('$a,$b','return strcasecmp($a-&gt;blogname,$b-&gt;blog...
Need help sorting "My Sites" Alphabetically
wordpress
Hello i have implemented a custom avatar upload from front-end in my wordpress theme. It is working. User can add and remove customa avatar. My problem is when user selects to remove his/her custom avatar, it is removing it from avatar meta but the uploaded avatar image files remains in the server. What i want to make ...
You just need to write a delete avatar function that gets the location of the file and deletes it using the php unlink function . The following code can be used as an example of how it's done. I use this to delete the old user avatars when a user uploads a new one. It is also used to replace default avatars that were o...
custom avatar removal
wordpress
I have a blog link . It was loading fine, but now when I open it. It redirects to error page.
there's a meta tag in your body, causing refresh: <code> &lt;meta http-equiv="REFRESH" content="0;url=error.htm"&gt; </code>
Blog automatically redirected to error page
wordpress
Explode not working as i expect inside add_shortcode() callback funciton. Here is the scenario: My implemented sortcode is like this: <code> [table] name1 = value1; name2 = value2; name3 = value3 [/table] </code> Which I make table using simple explode. Exploding <code> ; </code> to get each row then exploding <code> =...
Had to go with more complex characters for explode used <code> {@} </code> . As rarst said an using <code> ; </code> for exploding not a good idea because html encoded entities have <code> ; </code> on them.
Problem using explode inside add_shortcode() callback funciton
wordpress
So - at a client's request, I am in need of being able to resize an image not the standard WordPress way... but from an image pulled-in from a theme option. I can't simply use the custom_header area, as there will be two or three (I also have some options once the image is uploaded to let the user choose how the link s...
Re-size WordPress images on the fly using built-in WordPress functions. Use the <code> vt_resize </code> function to dynamically re-size WordPress images located in a custom field, featured image, uploads directory, NextGen Gallery WordPress plugin, or even an external link to an offsite image. It is very simple to use...
How to Dynamically Resize WordPress Image On-The-Fly (custom field/theme option)
wordpress
I have some wordpress websites on one server that I want to download. The problem is I don't know what url or what server I am moving it to. The problem is I do want the original to work. Suggestions on what I should do? This Wordpress Codex suggests I already know where I am moving the wordpress... Suggestions on what...
I wouldn't worry too much about it - just download all databases and files. And if you're uploading them to the new server, change the wp-config files and run the following queries on the databases: <code> UPDATE wp_options SET option_value = replace(option_value, 'http://www.example.com', 'http://www.newurl.com') WHER...
Moving wordpress to an unknown outlet
wordpress
I have a custom <code> WP_Query </code> that looks like this: <code> $this_page_id=$wp_query-&gt;post-&gt;ID; $images = new WP_Query( array( 'post_type' =&gt; 'menu-item', 'post_parent' =&gt; $this_page_id ) ); </code> My problem is that when using the <code> orderby </code> parameter (see here: http://codex.wordpress....
This query should work. <code> $images = new WP_Query( array( 'post_type' =&gt; 'menu-item', 'post_parent' =&gt; $this_page_id, 'orderby' =&gt; 'menu_order', 'order' =&gt; 'ASC' ) ); </code>
Changing WordPress sort order for returned child pages
wordpress
I have a custom taxonomy called <code> coauthor </code> . On the <code> edit.php </code> screen, I am trying filter and only show posts authored by the current user OR posts coauthored by the current user. I can get the posts authored by the current user: <code> function get_authored_posts($query) { global $user_ID; $q...
When I implemented something similar for a company that needed multiple authors, we did much the same with an author taxonomy. But in that case, we didn't use the original author field at all. Basically, it's not possible to create a standard WP_Query with author=X OR coauthor=Y using standard methods. You'd have to re...
pre_get_posts OR relation between taxonomy and author
wordpress
I run apache2 on Ubuntu, i'm sure there is a configuration or permission problem causing this. When I attempt to update plugins through the admin control panel, after I enter the FTP login/pass and click Proceed. I get the error "Unable to locate WordPress Content directory (wp-content)." And wp-content does exist and ...
I ended up using code from this post on WordPress.org http://wordpress.org/support/topic/upgrade-plugin-unable-to-locate-wordpress-content-directory-wp-content?replies=11#post-1329826 Place this into my wp-config.php file <code> if(is_admin()) { add_filter('filesystem_method', create_function('$a', 'return "direct";' )...
Error when updating plugins by FTP "Unable to locate WordPress Content directory (wp-content)."
wordpress
Hello I just started using wordpress (complete noob) but I need a bit of help. I have installed wordpress and on a linux/centos webserver and this works fine. However when I use another machine, open a web browser, type in the url, the site looks different from what it looks like on my server. (On my web server, there ...
"localhost" normally points to the webserver on the machine the request is made from. You installed wordpress on your server to run under "localhost". So if you open a browser whilst on the server and go to "localhost" it will look for the site on the server and find it. However, if you open a browser on your "dev mach...
Can't seem to see images on my machine but can on the server
wordpress
When I upload images via the standard media uploader I notice that it upload the original images with the same name but creates other cropped copies of the original one and rename them with originalname-150x150 or -340-120 and so on. I double checked the Media tab in the admin panel, but there are only dimensions for s...
WordPress crops the image proportional to the uploaded images dimensions, unless for the thumbnail size you specify to crop the thumbnail ( option provided only for thumbnails ). Hence the images being created are renamed to the size they are being cropped to. By default WordPress creates 4 images or less depending on ...
How wordpress handle upload images and how to use them in the code
wordpress
I'm working with the admin bar and trying to debug some of the menus and their priorities. I know several callbacks get bound to actions, such as this one: <code> add_action( 'admin_bar_menu', 'wp_admin_bar_wp_menu', 10 ); </code> How can I see what is lined up to be called when a hook like <code> admin_bar_menu </code...
You can see the detailed list of the hook using this snippet: <code> $hook_name = 'admin_bar_menu'; global $wp_filter; var_dump( $wp_filter[$hook_name] ); </code>
How can I see all the actions attached to an "add_action" hook?
wordpress
Edit: The Q narrowed down to the following: "How would I retrieve the screen IDs of all admin UI screens at one time?" Edit: I added a bunch of more plugin globals. Q is the following: Check which AdminUI submenu page/screen you're viewing and check this against some global var or some internal function . <code> // Thi...
Since we now have <code> get_current_screen() </code> , which returns a nice object, it's become fairly easy to just use that.
How to determin which admin screen/sub screen I'm currently viewing
wordpress
I'm currently on my own server (fredericpilon.com) with my own website. Wordpress being kind of a big shot of CMS, it may be targeted by hacks. Any tips and tricks on how to properly secure my Wordpress installation from said hackers and evil-doers?
Links: http://codex.wordpress.org/Hardening_WordPress http://perishablepress.com/press/tag/security/ (lots of great articles) http://www.wpsecure.net/secure-wordpress/
How to properly secure my Wordpress installation?
wordpress
I am using "basic magazine" wootheme, and for some reason my top menu navigation bar doesn't "open" when I hover the mouse above it: http://www.danceinisrael.com/ Is there some CSS problem there? How can I detect/fix the problem? Thank you.
Seems like the superfish menu plugin is not setting the CSS properties correctly when hovering over the menu item. You can fix this by updating the CSS in your styles.css file at line 155 from: <code> .nav2 li.sfHover ul, ul.nav2 li:hover ul { background: none repeat scroll 0 0 #B3B3B3; color: #FFFFFF; text-decoration:...
Menu items do not "open" when mouse hover over them?
wordpress
My website is ImASpy.com . If you click on the link, Findings, this takes you to my first Wordpress page. It appears to work fine until you click on comments, or you try to go to the about page, which is another Wordpress page. it stops working and usually gives a database error. Even worse, I cannot get into my Wordpr...
You probably messed up with the config on the DB I would like the dump of the config table please, that way i can see the paths to your wp install (i had a similar problem which i solved by manually correcting the fields in DB) EDIT Run this sql query and let me know : <code> UPDATE `wp_options` SET `option_value` = 'h...
Wordpress will not operate correctly
wordpress
The <code> $wpdb </code> query methods return all query results as strings. For example, an 'ID' column would return a string value like <code> '42' </code> instead of an integer <code> 42 </code> . Is there a way to configure the WP database class to make the database content types match to PHP types? Or do I need to ...
There is no way to automatically make wpdb do this. This is really a limitation of PHP that WordPress doesn't happen to address. wpdb doesn't have any hooks or actions that would help you either, so the best thing you can do is write your own wrapper function and run your queries through that so as to avoid repeating y...
Matching database content types to PHP types
wordpress
I'm trying to make my first plugin and I have a problem with firebug. When I use firebug console in WP Admin Panel doesn´t work correctly. For example when I use the selector $('#wpbody') the console return null value. The WP panel include jQuery library and I don´t know why firebug works wrong. Any advice or sugestion...
WordPress uses jQuery in <code> noConflict() </code> mode, so <code> $ </code> is not available for use in Firebug console. Just use <code> jQuery('#wpbody') </code> instead.
Firebug : Problem with jQuery in WordPress admin panel
wordpress
I'm new to WP and I must fetch pages/posts from a blog in another subdomain. I'm using ZF to do this. I've recently found out the <code> getPages </code> doesn't get me what I want (posts; duh!). I didn't see any "getPosts" rpc methods for WP, so I've tried <code> blogger.getRecentPosts </code> . That's better, but now...
Use the metaWeblog api instead: "metaWeblog.getRecentPosts". This includes the permalink information. See here: http://mindsharestrategy.com/2010/wp-xmlrpc-metaweblog/
Getting the Posts' permalinks from XLMRPC
wordpress
I think it's a good question, and my research don't come to a FINAL answer, so i turn to you WordPress community. here is the question I have about 300 email that i like to take from entourage to a catalog (contact database) WordPress seem fit to do that. After having a nice interface to get the first name, last name, ...
I'm Kim a dude working on Wysija, the plugin mentioned. Yes, we're very new. If we had a smell, it would be like the plastic of the inside of a new car. We're working hard on making our simple plugin more powerful. But the first version does what it's already meant to do: install, create and send in no time. Enough sai...
Newsletter, mailingList and contact management
wordpress
I've done created a lot of Wordpress themes and plugins, but I haven't done much with the Wordpress WooCommerce plugin from WooThemes. If someone asked me what general theme they should work with to learn about themes, I would suggest one of Wordpress' defaults, like <code> TwentyFourteen </code> However, for someone w...
if you are going for a e-commerce website here are some really good themes, plugins, and trickes that you will find really helpfull Themes Sommerce Shop : http://themeforest.net/item/sommerce-shop-a-versatile-ecommerce-theme/542001 Demo : http://www.yithemes.com/live/?theme=sommerce wordpress theme Mojo Theme: http://s...
What are WooCommerce starter themes?
wordpress
I am trying to add outbound link tracking for links within my posts. But only for links that do not have an img as a child. My code is below but does not add my class to any links in my posts: <code> jQuery(document).ready(function(){ //outbound post links //var outbound_post_name = jQuery(this).find('h2.title').text()...
Have a look at this article -> http://www.optimum7.com/internet-marketing/web-development/dynamic-google-analytics-event-tracking-for-wordpress.html Also to get the post title of the particular page. You could use the following jQuery ( Assuming you post title is wrapped in tag ). <code> outbound_post_name = jQuery('h1...
adding google event tracking to links in posts
wordpress
I am using a few jQuery plugins such as validate.js, but they all load BEFORE the Jquery library which is loaded automatically by WordPress and my theme. I need the plugins to load after - so is there a way to make Jquery load first in functions.php - so that I can use it frontend and admin. I am currently loading the ...
If you look at the <code> wp_enqueue_script </code> Codex Documentation, you'll see one of the options is <code> $deps </code> , this would mean that your script is dependent upon another script, simply add jquery as a dependancy and your scripts will load in the correct place. If you set a handle for the other scripts...
Make jQuery library load before plugin files
wordpress
I'm using the plugin WP UI on my custom post type to display the content in tabs. I'm doing this in the template for the custom post type not using the shortcode provided by the plugin. I'm also using Advanced Custom Fields for the fields on the custom post type. However sometimes there won't be any content for the cus...
I have no experience with WP UI, but the following code might do the trick: <code> &lt;!-- Videos Tab --&gt; &lt;h3 class="wp-tab-title"&gt;Videos&lt;/h3&gt; &lt;?php if (get_field('videos') &amp;&amp; get_field('videos') != "") { ?&gt; &lt;div class="wp-tab-content"&gt; &lt;?php the_field('videos'); ?&gt; &lt;/div&gt;...
Don't display html if custom field is empty
wordpress
I have built a custom options panel which allows site owners to enter their social profiles. I then use the second code to make the links appear in the theme. When no link is entered in the options panel, I would like there to be no link called on the page where the code is being called. Currently, it provides me with ...
Check if get_option returns a value and if it is not blank, then output the links. This should work for you: <code> &lt;?php if(get_option('to_facebook') &amp;&amp; get_option('to_facebook') != '') { ?&gt; &lt;a href="&lt;?php echo get_option('to_facebook'); ?&gt;"&gt;&lt;/a&gt; &lt;?php } if(get_option('to_google_plus...
Theme Options: If There is No Input, Don't Display?
wordpress