|
Gyshall posted:I have no idea but that code BBC formatting 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?
|
# ? Jan 20, 2015 20:26 |
|
|
# ? May 9, 2024 07:25 |
|
Yeah I think you'll have to create a new action/filter in a new function to do that. I know I've done it before but can't find poo poo in my documentation =\
|
# ? Jan 20, 2015 20:56 |
|
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?
|
# ? Jan 20, 2015 22:58 |
|
Make sure you're not copy/pasting the functions. Each function should only exist once, but have two corresponding action hooks, like so:php:<? add_filter( 'manage_edit-post_columns', 'aco_last_modified_admin_column' ); add_filter( 'manage_edit-page_columns', 'aco_last_modified_admin_column' ); // Create the last modified column function aco_last_modified_admin_column( $columns ) { $columns['modified-last'] =__( 'Last Updated', 'aco' ); return $columns; } ?>
|
# ? Jan 21, 2015 03:38 |
|
Anyone using HyperDB? I'm having issues with it not failing over as I'd expect, but I might just have unrealistic expectations. I've got two database servers (masterdb and slavedb) in a boring standard master/slave configuration. HyperDB's db-config.php adds the master as read/write, and the slave as read-only. As long as both servers are up, everything is fine, writes go to the master, reads are split between the master and slave. It's not really necessary, but it's fine that way. (I'm going for resilience, not speed.) But as soon as I power down the masterdb, the site just stops responding. What I'd expect, is for the site still to be readable, just not allowing new comments/pages/posts/et cetera. Does HyperDB not work that way, and/or does WordPress not like it when there are no writable databases?
|
# ? Feb 3, 2015 16:49 |
|
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 |
# ? Feb 12, 2015 21:57 |
|
edit:Nothing to see here!
iwannabebobdylan fucked around with this message at 07:11 on Feb 13, 2015 |
# ? Feb 13, 2015 06:30 |
|
How busy does a site have to be before caching and minifying plugins like W3 Total Cache are worth it? Sometimes I work on sites that I know are only getting like 20 visitors a day, but they have these elaborate caching systems set up that make them a total hassle to work with. Is it legit to tell them to get rid of them?
|
# ? Feb 13, 2015 16:39 |
|
fuf posted:How busy does a site have to be before caching and minifying plugins like W3 Total Cache are worth it? Sometimes I work on sites that I know are only getting like 20 visitors a day, but they have these elaborate caching systems set up that make them a total hassle to work with. Is it legit to tell them to get rid of them? A side benefit for plugins like W3 Total Cache is that they put less strain on a server. If these sites are on a crappy shared host and if they're doing lots of crazy PHP nonsense on every page load, W3 can speed things up a bit. However you can probably make a good case for disabling them while you're working, at the very least.
|
# ? Feb 13, 2015 16:45 |
|
oh ok, yeah I guess it could make a difference even on really small sites. I was getting pissed today because errors that I had fixed were reappearing when I re-enabled W3 Total Cache, even though I'd cleared all the caches. I had to delete the actual cache directory and reinstall the plugin in the end.
|
# ? Feb 13, 2015 18:51 |
|
fuf posted:oh ok, yeah I guess it could make a difference even on really small sites. Also, even if the site only has 20 visitors, properly using caching and minification etc will give those 20 people a better and faster experience, and if the site's in your portfolio you'll look better to future potential clients
|
# ? Feb 14, 2015 00:44 |
|
I'm having some problems with some php code. I got a paid theme for my business website. https://www.bearsdenpizza.net Everything is fine except that the Live Music page is backwards in order and I can't figure out how to correct it and the creator of the theme can't figure it out either. At first when I got the theme, the slider showed everything in backwards order and showed expired events (just like this). I was able to glue together some php (I don't have any experience with it) that ended up working. The theme takes posts and sorts them by the publish date to spoof a calendar. As in, to make a future "event", I just set a future publish date and the theme grabs that and puts it on the main page calendar. Well, I want a page for the live music only, so I made a page that's just the Live Music category. But, it lists everything backwards and even lists expired events. Wouldn't altering code in my page.php or page-calendar.php maybe fix this? Here's the page.php: quote:<?php Here's the page-calendar.php: quote:<?php /*
|
# ? Feb 21, 2015 00:54 |
|
fuf posted:oh ok, yeah I guess it could make a difference even on really small sites. I would also look at other caching software as well. I've had some serious headaches before with W3 on my busy sites and switching to something a bit simpler like QuickCache seemed to ease a lot of that pain.
|
# ? Feb 21, 2015 03:30 |
|
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).
|
# ? Feb 23, 2015 20:01 |
|
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?
|
# ? Feb 24, 2015 00:35 |
|
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 Is there a way to either: A) Have the About page within the About custom post type accessible by hitting foobar.com/about? I thought about doing some wp_query magic in the archive-about.php template, but worry that this wouldn't be a sustainable solution if the client wanted to add new sections. B) Use ACF to give the admins the ability to edit content in one spot I can pull into the archive-about.php template? I know an options page would work for this, but I'd like to keep everything within the About section if I can.
|
# ? Feb 25, 2015 00:42 |
|
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.
|
# ? Feb 25, 2015 19:06 |
|
kedo posted:Custom post type / Advanced Custom Fields question. Why isn't the About section a single page?
|
# ? Feb 25, 2015 19:07 |
|
snagger posted:Why isn't the About section a single page? Because there are multiple sub pages.
|
# ? Feb 25, 2015 22:10 |
|
Is there an easy way to disable the sidebar for mobile? I have a responsive theme but I don't like the way that the sidebar becomes stacked under the main page when viewed in mobile. Would look a lot cleaner without the sidebar present.
|
# ? Feb 26, 2015 18:31 |
|
It would depend on your theme. If you can work out how your theme's CSS handles media queries then you might be able to just add an extra rule to the narrow screen section like:code:
|
# ? Feb 26, 2015 18:37 |
|
Any liveblog recommendations besides Automattic's plugin or 24LiveBlog? The Automattic plugin ate our liveblogs the last time we used it, and 24LiveBlog has become a crashy mess since the last update.
|
# ? Mar 4, 2015 04:19 |
|
I'm looking for some guidance in how to proceed with my current project - I'm creating a conference schedule that uses a custom post type where each event is a post, and displays all the posts/events in a grid that shows the event title, presenter name, description, time, etc. I want to implement the ability for users to be able to "favorite" any individual event, which is then added to a dynamic list of their favorites. So they can look at the agenda grid, click a "favorite" button on an event, and then view their personalized list of favorites, which they can opt to save and view later at their leisure. I am frankly pretty clueless on how to do this. Is it even possible without having to have people create accounts and be logged in? I don't know if the lists of favorites would have to be stored server-side, or if they could be stored in the user's browser cache, or what. Anything to point me in the right direction would be greatly appreciated, or feel free to let me know if I'm dumb and this isn't possible. Thanks!
|
# ? Mar 12, 2015 22:55 |
|
How in the world do professional WordPress dev shops keep a consistent development methodology? 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?
|
# ? Mar 12, 2015 23:31 |
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? Generally I keep a copy of the database in .sql form in the rep somewhere and update it every time I update the repo
|
|
# ? Mar 12, 2015 23:41 |
|
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.
|
# ? Mar 12, 2015 23:43 |
|
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. Came here to post this. My friendly neighborhood goon host (lithium) already emailed me about it.
|
# ? Mar 13, 2015 00:07 |
|
down with slavery posted:Generally I keep a copy of the database in .sql form in the rep somewhere and update it every time I update the repo But that seems nuts when the work is split between a whole team. Who has to pore through the db dumps to make sure a merge is correct?
|
# ? Mar 13, 2015 00:17 |
Blinkz0rz posted:But that seems nuts when the work is split between a whole team. Who has to pore through the db dumps to make sure a merge is correct? Well yeah, if you have a bunch of dev instances you're going to be in for a rough time. Most of the WP sites we work on have a single developer.
|
|
# ? Mar 13, 2015 00:25 |
|
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.
|
# ? Mar 13, 2015 15:06 |
|
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!
|
# ? Mar 13, 2015 15:08 |
|
Is there an established, obvious solution for testing a local dev WP site on different devices across a local network? I run multiple sites so I've set up virtualhosts in Apache for each one. I've found xip.io, which aims to solve my exact problem. It's a way to point to a site alias from any computer on your network and be able to access the correct site. The URL you use looks like this: http://dev-site-alias.xxx.xxx.x.xxx.xip.io where the xs are my local IP. It works as advertised, but Wordpress creates a setback; Since Wordpress loves its absolute URLs, all of the resources on the page ignore the xip.io URL and don't load. I've worked around this by setting the "Wordpress Address URL" and "Site Address URL" to the full xip.io URL. Voila, it works. But I don't like this solution. It relies on a dynamically changing IP address, and it just feels messy and verbose. Are there any simpler methods for this, or have I solved it as well as possible?
|
# ? Mar 13, 2015 15:42 |
|
caiman posted:Is there an established, obvious solution for testing a local dev WP site on different devices across a local network? I run multiple sites so I've set up virtualhosts in Apache for each one. I've found xip.io, which aims to solve my exact problem. It's a way to point to a site alias from any computer on your network and be able to access the correct site. The URL you use looks like this: http://dev-site-alias.xxx.xxx.x.xxx.xip.io where the xs are my local IP. Depending on how DNS works on your local network could you just set up certain domains to resolve to your local IP? I do this with the hosts file on my local machine to avoid having to the change the absolute URLs in the WP db. If the site is ultimately going to be hosted at foobar.com then you can add a line like: code:
Just don't forget to remove the line when you're done otherwise you'll think you're checking the live site and actually load the dev version instead.
|
# ? Mar 13, 2015 16:16 |
|
If I'm understanding correctly, wouldn't that require the hosts file to be configured on each individual computer/device from which I want to test? That's something I'd like to avoid (do mobile devices even have hosts files?)
|
# ? Mar 13, 2015 16:35 |
|
Yeah it would, unless you can do it centrally from your router or something.
|
# ? Mar 13, 2015 16:46 |
|
Ah. Resolving a URL to my local IP is actually exactly what xip.io is for. It points to an external custom DNS thus eliminating the need to edit local hosts files. But it doesn't eliminate WP's absolute URL problem.
|
# ? Mar 13, 2015 17:01 |
|
Is anyone familiar with whether or not it's possible to assign a Wordpress virtual subfolder URL as an Apache subdomain? Ex: making blog.website.com point to website.com/blog
|
# ? Mar 17, 2015 20:08 |
|
Not totally sure what you mean but can't you just set the DocumentRoot for the subdomain to the location of the site files? e.g, in your apache virtual host: code:
|
# ? Mar 17, 2015 22:44 |
|
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?
|
# ? Mar 18, 2015 13:02 |
|
|
# ? May 9, 2024 07:25 |
|
Alfalfa posted:I'm in the process of tweaking/over hauling my gym's website - http://www.genesisstrength.com/ 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?
|
# ? Mar 18, 2015 14:54 |