Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
snagger
Aug 14, 2004
Help computer

Due to circumstances beyond my control (namely, idiotic former employee who set up WP) I have multiple custom post types that I'd like to have appear on my homepage, including:
post, articles, questions, resources.

Accordingly, my query_posts is written in loop.php as follows:
code:
<?php query_posts( array( 'post_type' => array( 'post', 'articles', 'questions', 'resources' ))); ?>
Yet, only posts of type articles are appearing on index.html.

I've walked into a company that runs a zillion odd plugins and the Open theme, so I suspect there's a config issue that I haven't tracked down.

Where are some more places I could look to resolve the issue?

Adbot
ADBOT LOVES YOU

snagger
Aug 14, 2004
Edit: Dumb question, I'll go get some plugins.

snagger fucked around with this message at 20:29 on Sep 23, 2011

snagger
Aug 14, 2004

Chris! posted:

I'm editing a site made by someone else. The site currently uses the Events Manager plugin, which the customer is very happy with. However, they want to set up a second type of event on the site. For example, at the moment the site lists "Music Events", with a few different categories of events, like Rock, Jazz etc. They want to make another page, which lists "Training Events".

I can't see any way to create or separate events in this way? I can't actually see where in the template the existing Events page has been called from, there's nowhere I can see that calls the events in PHP, to allow specification of different categories etc.

Anyone have experience with this?

This isn't a fully-informed perspective, but it looks like Events can be called up using a set of Attributes. This will be conceptually familiar to any dev who's worked on the standard Wordpress Loop:
http://wp-events-plugin.com/documentation/event-search-attributes/

Scroll down to Event Attributes and you'll see the ability to give arguments for 'category' or 'tag', allowing you to filter specifically for Training Events (or not Training Events).

snagger
Aug 14, 2004

thegasman2000 posted:

Need a plugin if anyone knows one that fits...
I need to be able to add data to a database, with related data. So a phone name and then some notes regarding that name. Then other registered users can search and add more data. Anything out there?
Sounds like you need to add custom meta fields to your posts. Google that and you'll find some plugins that at least get you started.

quote:

Also whats the go to paid registration plugin nowerdays? Looking at a monthly subscription for the whole site.
I switched from Paid Memberships Pro to the WooCommerce solution (which is a combination of WooCommerce, Groups, Groups for WooCommerce, and Subscriptions). It costs about $300 for the set of plugins but is *far* more flexible and standards-friendly than PMP. Woo also happily sells compatible themes, if that matters.

snagger
Aug 14, 2004

Chris! posted:

Anyone familiar with WP Engine for hosting Wordpress sites? A (UK based) company I work with is thinking of switching to them. They'll need to move their existing portfolio of a few hundred WP sites, some of which get a fair amount of traffic. Moving from current host due to downtimes becoming more frequent and support times becoming slower.

Anyone have anything much to say about them?

Your sites probably won't go down.

snagger
Aug 14, 2004

Chris! posted:

Thanks for your reply! Have you any experience of their tech support?

I only briefly used WP Engine before trying Heroku and landing with Flywheel (a WP Engine competitor), but in my brief experience the support was as good as one could hope for. My impression is that they're getting paid like it's a serious business, and they treat customers accordingly.

Again, a very brief impression.

snagger
Aug 14, 2004

samglover posted:

What's the best way to get share counts for a post? I want to be able to display share counts on the front page a la Mashable or something. I know Jetpack (which we use) tracks share counts for each network you show. Can I hook into the API and add those up, or something? Or is there an easier way to do it (I'm not afraid of functions.php or just building my own plugin)?

If you're just looking for counts by network there's almost certainly a plugin out there for that. If you need to do math on the fly like adding up across various networks you might need to roll your own - you'd need to hook into each API, grab the number, and add it to the total; on each pageview. Or maybe that already exists out there; I dunno. But it feels like something you'd need to write.

snagger
Aug 14, 2004

Gyshall posted:

Sounds like your install and possibly DB has been compromised. I'd start building from scratch to be honest.

I know +1 posts are frowned upon but I think this case warrants it. Nuke from orbit, only way to be sure, etc.

snagger
Aug 14, 2004

streetlamp posted:

A big WP problem is just the amount of loving terribly written plugins that are installed without hesitation. I recommend avoiding plugins like the plague they are.

It helps to be very selective when looking at plugins. I like Tidy Repo because it reviews purpose-built plugins and endorses good ones.

Be willing to pay for quality, as you're usually paying for code quality, ongoing updates, support access, and security patches. I've spent over $500 with the good people of Woo recently... as opposed to tens of thousands reproducing the same features in the Rails site I used to run.

snagger
Aug 14, 2004

Omits-Bagels posted:

Sorry for the lame question... but I'm trying to speed up my WP site. I've gone through and made sure most of my images are optimized. I ran a test on pingdom and it looks like a custom .css file is adding to my loading time.

http://fpt.pingdom.com#!/VuPlo/http://thesavvybackpacker.com

How would I go about fixing this? I'd really like to get my load time to under 1sec if possible so any other suggestions would also be super helpful.

The breakdown of the time spent on that file shows that it's all wait time, as opposed to DNS, server response, or file size. Which makes sense, considering that file is tiny.

I'd guess at first glance that you've got render-blocking JavaScript files contributing to the wait time. Try Google's PageSpeed Insights for more specific diagnosis and advice.

snagger
Aug 14, 2004

Omits-Bagels posted:

Awesome. I'll have to look into all this. Maybe I can learn something along the way!

Not to knock v1nce's advice, but this is a long way to go for a novice trying to boost performance. I wanted to PM you but you don't have it. Email me if you'd like me and some staff to give you bang-for-buck performance. blake at musivu dot com

snagger
Aug 14, 2004

I work at a WP shop and we use Bones as a base too.

e: Don't be like me and work off of the Bootstrap-based themes. That was always painful.

snagger
Aug 14, 2004
For first-time WP hackers who aren't at the cheatsheet level yet, here's what I did:

-Start by buying and reading Smashing Wordpress to understand how WP works under the hood, in plain English.
-Google for small code snippets, based on what you want to do. Adding 'wp' to a query works very very well.
-For larger stuff you'll need the WP Codex as reference for what functions and arguments to use.

With those 3 you'll be ready to write themes and plugins, and presto, you're a WP dev!

snagger
Aug 14, 2004

Bearnt! posted:

I thought that too because it made sense but it actually works on the pages section with $post_id as well after testing (not sure there is a $page_id variable in the codex). No custom theme, I'm able to get it working in multiple themes on different WP installs. Changing 'manage_edit-post_columns', 'manage_edit-post_sortable_columns', 'manage_posts_custom_column' all to page where post is gets it working on the pages section. I just can't simply duplicate the code and have one with post and one with page and have it work in both sections because it breaks the site. So I'm constrained with this code to only having it work on posts or pages and not both together. I'm guessing because the functions, actions and filters are named the same?

So changing your existing code's references from 'post' to 'page' works, but copying the functions and running both simultaneously breaks the site? What's the error from the PHP log?

snagger
Aug 14, 2004
Anyone have a favorite modal/popup plugin? I'm looking for something very powerful - something that can pop up different modals based on different conditions (certain pages, is WooCommerce purchaser, etc.) and send users toward a variety of actions (email harvester, link to product X, etc.). Some built-in creatives are a plus. Would happily pay.

e: this is almost certainly OptinMonster; feel free to talk me out of it

snagger fucked around with this message at 21:59 on Feb 12, 2015

snagger
Aug 14, 2004

89 posted:

events are backwards

For the page that lists your events, you'll need to use WP_query (http://codex.wordpress.org/Class_Reference/WP_Query) to construct a custom query that selects your desired posts and orders by the parameter and direction you want (http://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters).

snagger
Aug 14, 2004

TheOtherContraGuy posted:

I've been tasked with adding user account functionality to my company website, which is powered by WordPress. A user should be able to update their settings to manage which posts they will see. I have very little experience with WordPress so I'm really sure where to start. Does anyone have recommended plugins that would help with something like that?

There was a discussion earlier in the thread about users viewing multiple tags, something like:
http://www.myblog.com/tags/bluetag+greentag+redtag

I bet a user profile plugin could relatively easily save the collection of tags to the user's profile and default their home page to that feed of selected tags.

There may be a plugin out there that already does all this at once, but I didn't see it in a cursory Google search and Tidy Repo check.

snagger
Aug 14, 2004

kedo posted:

Custom post type / Advanced Custom Fields question.

For ease of editing, I'm using custom post types for each of the main content sections on a site I'm working on. Most of the sections are collections of pages (eg. "About Us" type stuff) instead of collections of posts (eg. "News"). So for example, I'd like to make the content on the landing page for the About section easily editable by the client. Right now I just have a sub page in the About section named "About," but when someone accesses it the URL looks idiotic: foobar.com/about/about

Why isn't the About section a single page?

snagger
Aug 14, 2004

Blinkz0rz posted:

If they're building a site for a client with multiple developers how do they keep everything in version control given WordPress's predilection for storing lots of stuff in the database?

The shop I work for also puts .sql files in the repo, but in a separate folder from WP, and only updates the file occasionally. I'd like to see us using WP Migrate DB Pro, but so far it just seems like we have peons make content changes on dev and live manually.

snagger
Aug 14, 2004

Gyshall posted:

Yo just a heads up to my homies in the Wordpress thread - the Yoast SEO plugin has a major vulnerability and you should update immediately if you are using it.

I logged in to my Plugins page to find the secure version (1.7.4) already in place. Thanks, Flywheel!

snagger
Aug 14, 2004

Alfalfa posted:

I'm in the process of tweaking/over hauling my gym's website - http://www.genesisstrength.com/

It currently uses the Avada theme and everything works well.

The only thing I can't figure out how to change/where to change is the responsive menu when loaded on cell phone.

It just has some random options in there and I have no clue where they were populated from or where I need to go to change it.

Any suggestions?

Avada appears to have a MegaMenu builder in it that isn't part of the normal WP menu stuff, perhaps the mystery menu was built using that?

snagger
Aug 14, 2004

Power Ambient posted:

Yeah, I've thought about this and it could work, but it also defeats the purpose of using a subdomain that is transparent (and apparently good for SEO, according to the marketing director).

What about creating a second Wordpress specifically for the blog? Can this be linked to the same database as the "main" site database? What sorts of pitfalls exist? Two installs with identical DBs could maybe solve it but it seems like that could get complicated.

I think you guys are way, way overthinking this. Do it with 301s instead of Apache config or WP config.

I do /exactly/ the same redirect (blog.domain.com/* -> domain.com/blog/*) using a CloudFlare page rule. If you're OK with using CloudFlare for DNS (I can't recommend it enough, they're lightning fast and you're already set up with them in case of DDOS), you can start with 3 page rules for free.

A good 301 plugin for WP (there's one on Tidy Repo, go check) can probably do the job just as well; just set the blog subdomain as a CNAME to point to the real blog.

snagger
Aug 14, 2004

Primpod posted:

I'm looking for something that a non-techincal user will be able to use to write articles and put them on a web page for a friend of a friends new business idea. It's really just an email newsletter people click on the links to the articles mentioned in the newsletter, then go to this website. But the key thing is that certain parts of the ui (images, colours, probably page headers), need to change depending on the url that the page has been linked to from. So if client XXX, click on the link, they'll see the article in their colours, with their logo at the top. I'm assuming this would be done though a request variable, though if it has any kind of url routing ability, that'd be nice also. Can wordpress do all of this without a lot of tweaking, or would I be best off looking somewhere else?

I am a web dev, so I can help him set this up in the first place, so that's not really a problem, it's more that I don't want him to have to contact me every time he has to add a new client or article.

Apologies if this is the wrong place by the way. I couldn't see any kind of generic cms thread. I've at least had a quick play with wordpress before, so if it can do it, it'd probably end up being the one I recommend.

You could use the personalization features in an A/B testing tool like Optimizely or WVO to accomplish this.

snagger
Aug 14, 2004

jackpot posted:

How easy would it be for me to install a wordpress theme in a subfolder of my own site, set everything up the way I want it, then move that whole site to another site? Is that basically a matter of creating a backup of the site once I'm done, then importing that backup once I've installed the theme on the other domain? It's been years since I've had to do anything with wordpress.

It can be challenging on the first try, but pro WP developers deal with this on a daily basis (they'll do their development work on their own machine then push everything to the 'production' or live server). You need to worry about 3 separate factors:

-The database contents - databases are stored locally, and everything on a WP site lives in the database (like the contents of your pages/posts and theme configuration). There are plugins to help you quickly move contents from one database to another.
-The database connection - the location, name, and login details for the databases may be different. Most devs run a find/replace on wp-config.php to swap between one server and the other.
-The file content (WP may look in the wrong folders for certain things) - not a frequent issue, but could be a problem on the first go.

Is there a reason you're doing it this way as opposed to just settings things up the first time on the other server?

snagger
Aug 14, 2004

fuf posted:

Any tips on a good "Live Chat" plugin? (ugh)

I'm keeping eyes out myself. Zopim works, even on the free tier. I want to experiment with intercom.io, and there's a plugin, but their live chat feature is new enough to where the plugin hasn't been updated to support it. Could install it manually, of course.

snagger
Aug 14, 2004

Disharmony posted:

How do I make the "Read More" button appear only for posts with more than 120 words?

This plugin looks like it could help: https://wordpress.org/plugins/advanced-excerpt/screenshots/

snagger
Aug 14, 2004

kedo posted:

I've been working with WordPress for ages but am relatively new to plugin writing. As a learning exercise, I'm in the process of writing a simple plugin that returns certain post data in a custom format after a user clicks a button on the edit screen.

Currently I have the button on the edit screen sending folks to /plugindirectory/foo.php?id=[the post id]. My question is this – how the heck do I retrieve post data in foo.php? I'm assuming I need to require some PHP in there in order to be able to get_post() or what have you, but I'm novice enough that I'm not sure where to start.

Can anyone point me in the right direction?

Your objective comes in two chunks:
1. Retrieving a custom post. You'll probably need to run a query on the custom post type and then construct a loop: https://codex.wordpress.org/Post_Types#Querying_by_Post_Type
2. Output your post data as form field default values, rather than as plain old HTML.

snagger
Aug 14, 2004

Dr. Fishopolis posted:

I'm building a subscription e-learning site with basically the same feature set as something like http://fizzle.co

I've been using WPMUDEV stuff because at first it seemed like they have all the plugins I would need to accomplish it, but they don't really have integration between their own plugins and most of their stuff is either abandoned or a cobbled-together beta. Nothing I would use for a production site anyway, so I'm back to the drawing board.

Any thoughts on LMS software? Sensei vs LearnDash vs WP Courseware?

I know everyone uses WooCommerce, but I don't like that Stripe support costs 78 bucks a year by itself, and that is a vital piece for me as I never use Paypal for anything if I can help it. Paid Memberships Pro seems like a solid alternative?

The final piece of the puzzle for me is forums, and it seems like bbpress is the "good enough" standard option. Anyone use anything better?

I have a learning site that runs profitably on WooCommerce/Sensei. Stripe may be $78 out of the box but subsequent year licenses only cost 50%. If $39/year is an expense that greatly concerns you, you may want to reconsider your business plan.

The Woo stack is easy to use for end users, easy to install and operate, and easily has the best support. We actually started with Paid Memberships Pro and migrated everything to WooCommerce because PMPro is basically one giant collection of awful short-term hacks and poor front-end work (see: non-responsive HTML tables on checkout page). Any time you want to make a modification (new currency? changing the trial mechanism?) you have to navigate their forums and deal with their staff. Woo's support is much, much better and the plugin ecosystem is far more established.

Giving WooCommerce $500 or so to get going on their stack was one of the better moves we made.

snagger
Aug 14, 2004

YO MAMA HEAD posted:

I work full-stack for a tiny web development firm that mostly works in support of academic/grant projects. We're working on our first WP site (hopefully of many—I think it solves some problems for which CodeIgniter/Laravel are overkill) for a client and I'm trying to think through how a CMS works with our fledgling deployment process. Does a solution like Bamboo make sense next to Wordpress? Should local and staging servers share a database with only production being separate? Once the site is stable in production, should plugin/core/theme upgrades be done on the production server or at the beginning of the Bamboo flow? Thanks!

Bamboo wouldn't be overkill if you were doing the kind of heavy development work that called for CI. But most WP work isn't /that/ heavy.

Last time I worked as full-stack on Wordpress (up to start of 2015) our shop ran Beanstalk, which is basically a nice interface for Git and FTP deployment. 99.9% of the WP world still works off FTP. If you're running on top of PaaS/IaaS (think Heroku/DigitalOcean/AWS), then you have an opportunity to use big boy automated deployment tools but honestly it's probably more challenging/time consuming/harder to hire for than raw FTP.

Integration testing + WP is a thing that's possible, but it's not exactly pretty. I'd expect to have to record my own Selenium scripts and then translate those into headless code. Someone correct me if I'm wrong, but a big part of that work would be getting something close to an ephemeral database (but my entire understanding of CI/automated testing comes from Rails). Maybe Vagrant is doing good things here (edit: enabling good things). I dunno.

Databases are a different monster entirely. In short, use a good database migration plugin and move stuff from local -> staging -> production. Staging can be a good chance for client review of content, if that's necessary. Pull production down (ie use the same plugin but point from production -> local) when upgrading versions, if necessary.

Plugin/core/theme upgrades (again pulling from my Rails experience here) should be treated like a Rails core or gem component update. Do earlier in the flow and then ship it properly. If you're using source control in your flow it makes for an easy rollback if you or your tests miss something.

snagger
Aug 14, 2004

well why not posted:

The 'export' function in WP's admin will let you export all content. You can also export the DB from say, phpMyAdmin if you have access.

My work is thinking of switching up workflow, was wondering if anyone had any suggestions on workflow for really fast WP theme development? We have an in-house framework theme, which is very nice, but I'm not sure the path we're leaning towards is ideal.

Lead has suggested installing locally (probably using vagrant/scotchbox) and developing the theme locally. Grunt will compile LESS files, autoprefix etc and push a repo. Once the aesthetics of the site are complete, we install WP on the actual remote server and sync the theme from the repo. This is to make sure that the entire theme of the site is a hosted repo and that we're not pushing up entire sites on our office's extremely poo poo internet. It kind of feels like overkill for the amount of smaller, cheaper sites we do. What would you guys suggest?

Seems fine to me. If you haven't started using that flow already, start it and see if there's stuff that you want to change about it. There's nothing wrong with applying good practice to "smaller, cheaper sites." If anything, that's probably good - you don't want to get lazy with cheap sites and then get stuck manually making changes to each of them should something go wrong. It's bad enough to do repetitive manual work, but it's still more demoralizing when it's on small/cheap sites. Really bad ROI activity, that.

snagger
Aug 14, 2004

slothzilla posted:

Anyone have a preferred managed Wordpress host? Doing some micro sites for my company using Wordpress and the IT types require managed hosting.

If you're not quite at the Enterprise Level scale that Pantheon is good for, getflywheel.com has been great to me for like 2 years now. The hosting and support level have been excellent, and SSL is available with a $25/month plan, which is also great for small ecommerce projects.

snagger
Aug 14, 2004

Scaramouche posted:

Gah. Woocommerce doesn't support tracking number emails out of the box. The solution? Yet Another Plugin, only $49!!! Jesus christ guys. It's like 4 lines of code.

$49 to have a feature added to your site instantly and in a supported manner is a pretty good deal for you, and a pretty good deal for the guy who wrote the $49 plugin.

Adbot
ADBOT LOVES YOU

snagger
Aug 14, 2004
Is there a plugin that can assign an editable meta field per user?

For example, suppose every user has a "dashboard" page (on the website itself, not in the WP admin area) that can show that user's assigned support rep: "Your support contact is Joe", where another user's rep might be named Ryan. "Joe" or "Ryan" would just be a static string that is set by an admin on the Edit User page.

snagger fucked around with this message at 21:04 on Jun 27, 2016

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply