If you have an existing site, you'll want to download all of those files and then create your git repo. If you have an existing repo and and existing live site (both the same project), you're in for some fun since the live site will have some new/updated files, but so will your repo.
Cool idea, I like it. As a developer, I'd like to see what some of the previous tasks were and their prices. I'd think the same as if I was going to list a task - what's the going rate.
Check to see if your theme or any plugins are modifying the gallery shortcode. I've come across more than one theme since 3.5 that has modified the gallery shortcode and it no longer works correctly.
function montyburns_search_pages_only($query) {
if ( $query->is_search && !is_admin() ) {
$query->set('post_type', 'page');
}
return $query;
}
add_filter('pre_get_posts','montyburns_search_pages_only');
This is a little better than timoo's post since it modifies the main query before it runs the query. Timoo's will use the main query, and then query again with the parameters (which will get you the correct results).
In your functions file, you should hook into pre_get_posts to limit posts_per_page on the front page to 8. If you're doing that right, the default prex/next should work just fine and show only 8 posts. Once you know that works, insert the wp_pagenavi code (to confirm where the issue is - pre_get_posts or wp_pagenavi).
In addition to this, check out paginate_links instead of wp_pagenavi - just use the example at the bottom.
It really surprises my how many other answers are here but are all incorrect. They might work, but they aren't the correct way to do it. This is, well done.
I recently saw a WordCamp video that was very similar to this with an awesome site, but less code.
With that said, some of the comments here are just stupid. It's about simplifying the CMS for your client. Links, comments, tools are usually not needed - of course if they are then don't hide them. Why add more crap that can confuse the admin when they will never use it?
It's also not about hiding the fact you used WordPress. We customize the admin for our clients, but we're very clear that we use WordPress. It's much better giving them an admin interface that looks customized for them (when really you just changed the logo), than one you give to everyone. The footer link about WordPress is still there, plus all the credits.
You could use XML-RPC. Creation is easy, but really both sites need to communicate to each other for updating posts. That's definitely possible (set post meta for ID on other site), but not a one step process.
You have deactivated all other plugins and your plugin worked fine? In addition to that, you aren't deregistering and registering jQuery - aka only using WP version (which is best, otherwise use this)?
If so, then one of the other 3 plugins are probably the problem. Your best is probably to fix the faulty plugin and change the version to 999. This way the plugin won't update since WP sees your version as higher. Then submit the fix to the author and hope for an update to be released. Depending on the author, it may or may not happen.
You can generate files (images, PDFs, etc) dynamically based on user input with PHP (which I'm sure you're aware of). Once you have this setup, it wouldn't be hard to hook into GravityForms to generate it after form submission.
Both of these are good options, but I don't care for Mutliedit personally. Another good option is metaboxes as someone suggested. If you're using a lot of metaboxes, check out the Meta Box classes. Widget areas are another option, but I don't like a lot of them.
I run into this a lot, and my thought it do what is most intuitive for the user. If they're trying to edit a page and don't know how to edit something, you coded it poorly. If for some reason you can't make it more intuitive, add instructions for them where ever you expect them to run into problems (ex. a certain page, a custom post type, etc).
Cool, makes a little more sense. All of that could still go in functions.php though and it work work nearly the same. If you want to keep your functions file lean, include the file with all of that. I would go even further to copy the css into the style.css to keep the site a little more lean, same with JS if used.
There's a few reasons why I prefer them in the template file if I'm working on a whole site. One of the main one is I want to limit the requests. At the minimum you're going to be adding CSS, but possibly JS too, why add 2 files per CPT when I can just throw it in the template files? Not hard to also copy/paste the code already created into functions.php too.
Just two different approaches I guess. Can you share benefits to your approach? I've done both in the past, but don't see many reasons for the plugin approach if I'm developing a whole site.
Then you probably haven't done much with custom post types.
I work at an agency that does almost solely WP projects, every site we do has at least a few CPTs since they usually aren't small projects. I work with them all the time.
When you says "looking back at the projects this was an issue", it sounds like you're the developer of the site. In our case, we every site gets their own custom theme, and all of the CPT are made in functions.php. Since we're the site developer, we don't experience any of the plugin issues needing to hijack templates.
This would also confuse users and get frustrating if plugins started hijacking templates.
Make it easier? Ecommerce and others like I describe are easy. Install the plugin, add your items to the CPT, and add the shortcode. What, the one step of the shortcode is the problem? Really?
One large thing to note is while I've made plenty of plugins, but I mainly am the site developer thus not trying to distribute plugins on the SVN. ie This all may be because I'm not a plugin developer, I've never came across this as an issue while working with WP.
You can do this easily with jQuery Cycle. You'll have to build the WP side yourself (no plugin), but it's not bad at all. There are also a few CodeCanyon plugins that may work for you: this, this, or this.
I understand what you're saying, but I'm with andrewry. Ecommerce systems would fall under what you described, but they don't have any problem. You think they would, but using shortcodes works fine. Developers can easily overwrite the styles, and as the plugin author you could provide what you mentioned if they really wanted. But right now, I don't see much of a problem.
Here's a few more, not listing any mentioned already: Sidebar Generator, Conditional Widgets, Widget Wrangler, Dynamic Widgets, Section Widget. I've used a couple, but only limited and smaller sites.
Those extra two characters are a lot to type, I understand. We know each other IRL though, but mostly online.
If you have an existing site, you'll want to download all of those files and then create your git repo. If you have an existing repo and and existing live site (both the same project), you're in for some fun since the live site will have some new/updated files, but so will your repo.
Cool idea, I like it. As a developer, I'd like to see what some of the previous tasks were and their prices. I'd think the same as if I was going to list a task - what's the going rate.
+1 for this. Also check out DX Plugin Base
Check to see if your theme or any plugins are modifying the gallery shortcode. I've come across more than one theme since 3.5 that has modified the gallery shortcode and it no longer works correctly.
Yep, put that in functions.php and leave search.php alone.
This is a little better than timoo's post since it modifies the main query before it runs the query. Timoo's will use the main query, and then query again with the parameters (which will get you the correct results).
In your functions file, you should hook into pre_get_posts to limit posts_per_page on the front page to 8. If you're doing that right, the default prex/next should work just fine and show only 8 posts. Once you know that works, insert the wp_pagenavi code (to confirm where the issue is - pre_get_posts or wp_pagenavi).
In addition to this, check out paginate_links instead of wp_pagenavi - just use the example at the bottom.
Now you can use any WordPress functions and classes. get_option get_post_meta, etc
A better option is to use metaboxes, and only show the meta boxes on the page defined as the home page.
It really surprises my how many other answers are here but are all incorrect. They might work, but they aren't the correct way to do it. This is, well done.
I recently saw a WordCamp video that was very similar to this with an awesome site, but less code.
With that said, some of the comments here are just stupid. It's about simplifying the CMS for your client. Links, comments, tools are usually not needed - of course if they are then don't hide them. Why add more crap that can confuse the admin when they will never use it?
It's also not about hiding the fact you used WordPress. We customize the admin for our clients, but we're very clear that we use WordPress. It's much better giving them an admin interface that looks customized for them (when really you just changed the logo), than one you give to everyone. The footer link about WordPress is still there, plus all the credits.
Try this or install the plugin called "redirection".
Create a parent page with the slug 123 and redirect it just in case.
You could use XML-RPC. Creation is easy, but really both sites need to communicate to each other for updating posts. That's definitely possible (set post meta for ID on other site), but not a one step process.
You have deactivated all other plugins and your plugin worked fine? In addition to that, you aren't deregistering and registering jQuery - aka only using WP version (which is best, otherwise use this)?
If so, then one of the other 3 plugins are probably the problem. Your best is probably to fix the faulty plugin and change the version to 999. This way the plugin won't update since WP sees your version as higher. Then submit the fix to the author and hope for an update to be released. Depending on the author, it may or may not happen.
You can generate files (images, PDFs, etc) dynamically based on user input with PHP (which I'm sure you're aware of). Once you have this setup, it wouldn't be hard to hook into GravityForms to generate it after form submission.
Both of these are good options, but I don't care for Mutliedit personally. Another good option is metaboxes as someone suggested. If you're using a lot of metaboxes, check out the Meta Box classes. Widget areas are another option, but I don't like a lot of them.
I run into this a lot, and my thought it do what is most intuitive for the user. If they're trying to edit a page and don't know how to edit something, you coded it poorly. If for some reason you can't make it more intuitive, add instructions for them where ever you expect them to run into problems (ex. a certain page, a custom post type, etc).
I see. Too each his own, thanks for the chat.
Cool, makes a little more sense. All of that could still go in functions.php though and it work work nearly the same. If you want to keep your functions file lean, include the file with all of that. I would go even further to copy the css into the style.css to keep the site a little more lean, same with JS if used.
Check out the WordPress template hierarchy. You need to create a file named singe-$posttype.php and you'll be good to go.
There's a few reasons why I prefer them in the template file if I'm working on a whole site. One of the main one is I want to limit the requests. At the minimum you're going to be adding CSS, but possibly JS too, why add 2 files per CPT when I can just throw it in the template files? Not hard to also copy/paste the code already created into functions.php too.
Just two different approaches I guess. Can you share benefits to your approach? I've done both in the past, but don't see many reasons for the plugin approach if I'm developing a whole site.
I work at an agency that does almost solely WP projects, every site we do has at least a few CPTs since they usually aren't small projects. I work with them all the time.
When you says "looking back at the projects this was an issue", it sounds like you're the developer of the site. In our case, we every site gets their own custom theme, and all of the CPT are made in functions.php. Since we're the site developer, we don't experience any of the plugin issues needing to hijack templates.
This would also confuse users and get frustrating if plugins started hijacking templates.
Make it easier? Ecommerce and others like I describe are easy. Install the plugin, add your items to the CPT, and add the shortcode. What, the one step of the shortcode is the problem? Really?
One large thing to note is while I've made plenty of plugins, but I mainly am the site developer thus not trying to distribute plugins on the SVN. ie This all may be because I'm not a plugin developer, I've never came across this as an issue while working with WP.
You can do this easily with jQuery Cycle. You'll have to build the WP side yourself (no plugin), but it's not bad at all. There are also a few CodeCanyon plugins that may work for you: this, this, or this.
I understand what you're saying, but I'm with andrewry. Ecommerce systems would fall under what you described, but they don't have any problem. You think they would, but using shortcodes works fine. Developers can easily overwrite the styles, and as the plugin author you could provide what you mentioned if they really wanted. But right now, I don't see much of a problem.
Here's a few more, not listing any mentioned already: Sidebar Generator, Conditional Widgets, Widget Wrangler, Dynamic Widgets, Section Widget. I've used a couple, but only limited and smaller sites.
Those extra two characters are a lot to type, I understand. We know each other IRL though, but mostly online.