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
awesomeolion
Nov 5, 2007

"Hi, I'm awesomeolion."

(cross posting from web design/dev mega thread)

I am an incompetent inexperienced web dev and in Wordpress I'm trying to basically take wp-admin/widgets.php and smoosh it into a Plugin options page so that my client can:

1. Go to /wp-admin
2. Click the Super Admin tab on the left
3. Drag and drop widgets and change their order (like in Customize -> Widgets but the front-page is one big sidebar area)
4. Edit Sass code corresponding to each widget in a little box with the other widget options

Right now I've got my options page nicely setup but I'm having trouble getting wp_list_widget_controls to spawn the nice form like it does in widgets.php



Page Builder is a sidebar registered in functions.php like so:
code:
register_sidebar( array(
		'name'          => esc_html__( 'Page Builder', 'project-name' ),
		'id'            => 'page-builder',
		'description'   => '',
		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
		'after_widget'  => '</aside>',
		'before_title'  => '<h2 class="widget-title">',
		'after_title'   => '</h2>',
	) );
And in the options page <?php wp_list_widget_controls( 'page-builder', 'Page Builder' ); ?> spits out nothing.

I've messed with var_dumping wp_get_sidebars_widgets() and $GLOBALS['wp_registered_sidebars'] and so I can get the sidebars and widgets but I'm thinking there must be a way to re-use most of the code in wp-admin/widgets.php right? The goal being for the options page to populate a sidebar and for the front-page.php template to just full screen shoot out that sidebar. Each widget is 100% width and they will simply stack on top of each other.

I will keep tinkering but any guidance you might have would be much appreciated :)

I found this tutorial which explicitly defines a function "webitect_widget_control()" where the widget is registered. But clearly my widget (Lone Image in the example above) already has controls right? Since they're working in Appearance -> Widgets?

EDIT -- I SOLVED IT. I just needed to throw in a little bit of
code:
require_once(ABSPATH . 'wp-admin/includes/widgets.php');
Love and then when I call functions in wp-admin/widgets.php they work instead of failing because they can't rely on the other functions in includes/widgets.php

awesomeolion fucked around with this message at 04:25 on May 17, 2016

Adbot
ADBOT LOVES YOU

awesomeolion
Nov 5, 2007

"Hi, I'm awesomeolion."

A day spent wrestling with wp_editor in a widget :sadfan:

Here we go in wp-admin/widgets.php everything looks sooo good right.


Now let's save this


Oh no..... Buttons are gone and the visual tab no longer works


When I look at the HTML it appears as though after updating TinyMCE just decides it doesn't need to load any buttons... Any ideas?

Edit -- Some plugin code for good measure

code:
add_action('widgets_init', 'string_example_name_init');

function string_example_name_init()
{
    register_widget('string_example_name');
}

class string_example_name extends WP_Widget
{
    public function __construct()
    {
        $widget_details = array(
            'classname' => 'string_example_name',
            'description' => 'String Example Name'
        );

        parent::__construct('string_example_name', 'String Example Name', $widget_details);
    }

    public function form($instance)
    {
        $textcontent = '';
        if( !empty( $instance['textcontent'] ) ) {
            $textcontent = $instance['textcontent'];
        }

        ?>

        <div class="string-arena-gods" id="texxxt">
            <?php
            $rand    = rand( 0, 999 );
            $ed_id   = $this->get_field_id( 'wp_editor_' . $rand );
            $ed_name = $this->get_field_name( 'wp_editor_' . $rand );

            printf(
                '<input type="hidden" id="%s" name="%s" value="%d" />',
                $this->get_field_id( 'the_random_number' ),
                $this->get_field_name( 'the_random_number' ),
                $rand
            );


            $content   = 'Hello World!';
            $editor_id = $ed_id;

            $settings = array(
                'media_buttons' => false,
                'textarea_rows' => 3,
                'textarea_name' => $ed_name,
                'teeny'         => true,
            );


            wp_editor( $content, $editor_id, $settings );
            ?>
        </div>

        <div class='mfc-text'>

        </div>

        <?php

        echo $args['after_widget'];
    }

    public function update( $new_instance, $old_instance ) {
        $rand = (int) $new_instance['the_random_number'];
        $editor_content = $new_instance[ 'wp_editor_' . $rand ];
        $new_instance['wp_editor_' . $rand] = $editor_content;
        return $new_instance;
    }

    public function widget( $args, $instance ) {
        extract( $args );
        $textcontent = apply_filters( 'textcontent', $instance['textcontent'] );
        ?>

        <div class="string widget flex">
            <?php


            ?>
        </div>
        <?php
    }
}

awesomeolion fucked around with this message at 17:11 on May 19, 2016

karms
Jan 22, 2006

by Nyc_Tattoo
Yam Slacker
I havee no clue how any of that should work, but does the console show any js errors?

v1nce
Sep 19, 2004

Plant your brassicas in may and cover them in mulch.

awesomeolion posted:

A day spent wrestling with wp_editor in a widget :sadfan:

code:
            $rand    = rand( 0, 999 );
            $ed_id   = $this->get_field_id( 'wp_editor_' . $rand );
            $ed_name = $this->get_field_name( 'wp_editor_' . $rand );

            printf(
                '<input type="hidden" id="%s" name="%s" value="%d" />',
                $this->get_field_id( 'the_random_number' ),
                $this->get_field_name( 'the_random_number' ),
                $rand
            );

            $content   = 'Hello World!';
            $editor_id = $ed_id;

            $settings = array(
                'media_buttons' => false,
                'textarea_rows' => 3,
                'textarea_name' => $ed_name,
                'teeny'         => true,
            );

            wp_editor($content, $editor_id, $settings );
            ?>
    // ...

You've been reading this post, right? http://wordpress.stackexchange.com/questions/82670/why-cant-wp-editor-be-used-in-a-custom-widget

The documentation for wp_editor says:
"Once instantiated, the WYSIWYG editor cannot be moved around in the DOM. What this means in practical terms, is that you cannot put it in meta-boxes that can be dragged and placed elsewhere on the page. Instead use 'edit_page_form' (for pages) or 'edit_form_advanced' (for other post types):"

I'm guessing the reason for that restriction is because there's JS events and other things attached to the editor, so shifting it around the DOM can cause the JS to be lost, and it to become dumb html.

One of the less voted for answers on that StackOverflow page also says:
"The reason why simply calling wp_editor() doesn't work in widget form is that form markup is asynchronously delivered using AJAX."

So here's the thing; when you load the page initially the editor has been attached to the widget and everything is fine. When you save the widget the HTML for that widget is reloaded via an AJAX Response.
Chances are that the AJAX response doesn't include anything to re-attach the editor back onto the editor instance in the widget, such as script tags and the required JS.

Check it out by hitting F12, going to the Network tab, and flicking on the XHR filter. Clear the Network tab, hit save, and check the response out of the POST request. My money is on the HTML mentioning the editor, but there being no scripts to actually attach it.
If the scripts are there, try running them in the JS console. Do you get errors? Does the logic make sense?

awesomeolion
Nov 5, 2007

"Hi, I'm awesomeolion."

v1nce posted:

Wonderful advice

Thank you so much! Your post got me on the right track :arnie: I can now call:

code:
tinyMCE.EditorManager.execCommand('mceRemoveEditor',true, editor_id);
and then

code:
tinyMCE.EditorManager.execCommand('mceAddEditor',true, editor_id);
And the editor comes back! Thanks again you are the best. Much appreciated. :mmmhmm: :mmmhmm:

Scaramouche
Mar 26, 2001

SPACE FACE! SPACE FACE!

Unlike some people who like to make everyone look dumb by making their fancy shmancy ground up custom plugins and themes some of us like to start simpler.

For me I made my first custom shortcodes. I inherited a bunch of PDF files when transitioning from OpenCart to WordPressWoo that are all out of date, but people on forums/fixit guides/blogs/etc. all link to kind of as a resource. It'd be dumb to let so many good organic links fade away, but at the same time, gently caress hand-building pages and organizing a million PDFs all split into folders and crap. So I made a way to preserve the original link structure (user_manuals/x/y/z) while maintaining a navigable hierarchical interface. Here's a quick rundown on how to do it for all the lurkers who are too afraid to post.

Created a file called custom-shortcodes.php in my theme root, that has two functions in it. One to accept params from the file lister shortcode instantiation and then output a string of files in the specified folder. The other to list child pages of the current page (to allow for hierarchical browsing):
code:
<?php
	function userfunc_get_file_links($params = array()) {
	// default parameters
		extract(shortcode_atts(array(
			'title' => 'Buttes Fartes & Son Part Diagrams',
			'folder' => 'user_manuals/ButtesFartes
	), $params));
                // get only image/pdf/display files and not say, wp-config.php
	        $scanned_directory = array_diff(glob($folder."/*.{jpg,pdf,png,gif}", GLOB_BRACE), array('..','.'));
	        $partsdiagram .= "<ul>";
	        foreach ($scanned_directory as $key => $value) {
                    // don't use relative paths idiot
	            $partsdiagram .= "<li><a href='../../".$value."'>".$value."</a></li>";
	        }
	        $partsdiagram .=  "</ul>";
return($partsdiagram);
}
// register shortcode for use in Page editor
add_shortcode('partsdiagram', 'userfunc_get_file_links');

function list_child_pages() {
global $post;
 
if ( is_page() && $post->post_parent )
    $childpages = wp_list_pages( 'sort_column=post_title&title_li=&child_of=' . $post->post_parent . '&echo=0' );
else
    $childpages = wp_list_pages( 'sort_column=post_title&title_li=&child_of=' . $post->ID . '&echo=0' );
if ( $childpages ) {
    $string = '<ul>' . $childpages . '</ul>';
}
    return $string;
}
add_shortcode('childpages', 'list_child_pages');
?>
Then in your theme functions.php include your custom-shortcode:
code:
include('custom-shortcodes.php');
Then make a template to display your cool new page, again in the root of the theme. This isn't super necessary. You can mostly just copy the base page.php one:
code:
<?php
/*
Template Name: File Lister Thingy Page
 */
get_header(); ?>
<?php if( has_excerpt() ) { ?>
<div class="page-header">
<?php the_excerpt(); ?>
</div>
<?php } ?>
<div  class="page-wrapper">
<div class="row">
<div id="content"" class="large-12 columns" role="main">
<h3><?php echo apply_filters ('the_content', $post->post_title); ?></h2>
<?php
echo apply_filters ('the_content', $post->post_content);
?>
</div><!-- #content -->
</div><!-- .row -->
</div><!-- .page-wrapper -->
<?php get_footer(); ?>"
Lastly, create a Wordpress Page that uses the Shortcodes (remember to attach the template you've just created). This is the entire 'parent' page that contains all of the sub-folders for each manufacturer:
code:
<strong>List of all Diagram Files by manufacturer:</strong>
[childpages]
I could have made it iterate through every folder in the manuals directory, but I wanted to explicitly control which folders were presented or not. Because of that you also have to make a child Page attached to the one above with the specific folder you want listed with just the shortcode in it:
code:
[partsdiagram title="Buttes Fartes & Son Diagrams" folder="user_manuals/Buttes_Fartes"]
Another reason to have the child pages is so that they "live" in the wordpress permalink structure instead of existing solely inside the file structure, which I did mostly for sitemap/seo reasons.

After looking at it like this, it's actually a pretty ugly hack to accomplish something pretty basic. I could have written a php-only solution in half the time, but it is kind of neat to integrate it with WordPress. And thanks to how simple shortcodes generally are, I can hand this off to the repair guys who maintain the diagrams and it'll be easy enough for them to manage.

lil pissbitch
Mar 8, 2015
I've been trying to launch a finished site for like a week and I'm about at my wits end. I unfortunately discovered Multisite functionality a bit late in the game, and while I think it's absolutely the setup I need in the long run, it caused me to have to do a lot of futzing around in Cpanel and WHM, to the point where I finally just decided to uninstall and reinstall WP on the Multisite and the subsite (the one I've been trying to launch for a week)

Long story short, I now have a saved backup of the site, but it's not installed on the subdomain (not exactly sure how to get it back up, but at least I have the .zip file with all of the elements intact). I guess at this point I'm wondering if there's anyone out there I can hire hourly to look through all of these platforms alongside me to unfuck everything I've hosed, and hopefully also restore my already built site as well. Anybody know of any good WP consulting services, or possibly even willing to offer their own? Trying to get this resolved within the next 24 hours...

I'd be happy to go into more detail re: my issues, but I'm pretty far over my head at this point and I don't even know if I could adequately explain everything I've done to get to the point where I am. That being said, I imagine anyone with a basic-to-intermediate knowledge of WP can make this work. My problem was trying to rush through this, and trying things on semi-live sites when I should have been using dummy demo sites and poo poo.

fuf
Sep 12, 2004

haha
Anyone got a reliable way of stopping Contact Form 7 spam? Contact Form 7 Honeypot doesn't seem to help much. I guess I have to add a captcha?


lil pissbitch posted:

I've been trying to launch a finished site for like a week and I'm about at my wits end.

Still need help? I'm busy for the next few days but could maybe help you out next week. Or just post a bit more about your issue and maybe we can help.

lil pissbitch
Mar 8, 2015

fuf posted:

Still need help? I'm busy for the next few days but could maybe help you out next week. Or just post a bit more about your issue and maybe we can help.

I've been trying to pay someone to help me ASAP, so hopefully that comes through before next week...hate the thought of waiting even longer to get this ball rolling.

For backstory, I'm starting a digital marketing company, and my partner's contracting company is our first client. So fortunately everything is happening in-house, but every other aspect of the business is ready to go; just waiting on me to replace his old site with the new one I've built. I'm using Headway Themes to build the sites which has been working beautifully.

I have a dummy domain, let's call it demo.com. My plan was to create a subsite for each new client's website that we build, aka contractors.demo.com. Once the site is finished, I need to replace the client's old site at contractors.com with the one on contractors.demo.com, but it needs to still show contractors.com as the primary domain in the address bar. The main reason I went down the Multisite road is because I was trying to install the Domain Mapping plugin (the popular, free one), and it only works in a Multisite setup. Also, it turns out Multisite just makes a ton of sense for what I'm trying to do. I followed every instruction for the Domain Mapping plugin installation down to a T, (modify wp-config and .htaccess, move sunrise.php, all that poo poo) and now Domain Mapping and Domains are both available options under the Settings of the Network Admin in demo.com. However, no matter what I do, even after a fresh install of Wordpress, I can't get the Domain Mapping option to appear under Tools of any of the Subsites, specifically contractors.demo.com in this instance.

I've checked all the pitfalls of people with the same issue online:
- Network Activated Domain Mapping in the Network Admin
- Made sure I had the appropriate box checked under Domain Mapping in the Network Admin to allow individual users to map domains via each subsite
- Made sure the multisite and subsites both share the same root
- Parked each domain in CPanel and pointed the DNS to my server's IP
- Made sure Wildcard Domains are set up in WHM

Nothing doing. No idea why Domain Mapping isn't showing up. And now, since I did the reinstall, I can't quite get my old, completed website restored. I used Duplicator to back everything up as a zip, and I recognize all of the files inside (the structure looks similar to when I check the File Directory in CPanel at least). I don't feel like I could just do some sort of uniform upload, because what if I reinstall one of the original mistakes that was preventing me from setting up Domain Mapping in the first place? But the last thing I want to do is rebuild the site from scratch, god that would suck.

Okay, I've rambled on a bit about my issue...if anyone needs more info let me know and I'll be happy to provide. I'm also looking to pay someone to fix all of this for me, but I'd love to know why it's not working so I can avoid whatever I did (or didn't do) in the future.

lil pissbitch
Mar 8, 2015

lil pissbitch posted:

Domain Mapping Issue

UPDATE: I can hardly believe this, but I think I fixed it...Domain Mapping now appears as an option under Tools in all of my subsites. After I did the reinstall, I forgot to enter the multisite's IP address, so it wasn't displaying. Jesus, thank god that's fixed. Still working on restoring the site, just paid a fellow to sort all of that out for me.

Sorry if you read that whole post above this one. lol

Scaramouche
Mar 26, 2001

SPACE FACE! SPACE FACE!

Does anyone here use W3 Total Cache? I tried using it years ago and it was a godawful mess (I even got into a little internet slapfight with Frederic Townes over it) that took my site down and nearly hosed my install. Has it improved since 2013-ish or so? I ask because I'm doing some speed optimization stuff, but kind of nailing them down one by one when I know that W3TC, if working as advertised, can solve them all at once.

EDIT-ahahah installed it and enabled one feature (minification). CSS is hosed, JS is hosed. Never change Frederick. I hope uninstalling it doesn't destroy your site anymore.

EDIT EDIT-good lord it wrecked some of the serialized arrays in wp_options and wp_postmeta

Scaramouche fucked around with this message at 01:00 on Jun 3, 2016

Scaramouche
Mar 26, 2001

SPACE FACE! SPACE FACE!

Jesus fucknutting christ. New post because of how stupid this is.

WooCommerce has its own Product Category system separate from WordPress categories. You can attach an image, give it a dedicated description, and fill out something called Top Content and Footer Content, which let you put custom header/footers on a category page. It stores this extra info as a serialized array in the wp_termmeta table. W3 Total Cache does an initial spin through when Minify is enabled to find HTML/CSS in your various Posts/Pages/etc. in Wordpress so it can minify them. Starting to see the problem yet?

W3 Total Cache went through and "minified" the HTML I had on my category (and other pages) that was inside a serialized array in the wordpress database. This means changing the length of the string in the array. When doing this, W3 Total Cache does not update the length value of the serialized array. Which means it is now completely broken and cannot be parsed by wordpress. And this is only the one I found first, I can't imagine how many more arrays are affected.

EDIT-Wacked my brands too.

Scaramouche fucked around with this message at 01:33 on Jun 3, 2016

PT6A
Jan 5, 2006

Public school teachers are callous dictators who won't lift a finger to stop children from peeing in my plane
I've still got to assign most of the blame to Wordpress's loving retarded database structure there, with an assist to the godawful plugin. It's layers upon layers of incompetence and bad code, which is further exacerbated by Wordpress's terrible permissions system and lack of built-in version control.

Scaramouche
Mar 26, 2001

SPACE FACE! SPACE FACE!

I'd assign most of the blame to me for being an idiot for installing a janky-rear end plugin that is way too loving promiscuous for anything that isn't a simple Recipe blog. Other than that though this is my hierarchy of shittiness:
1. Wordpress using serialized arrays AT ALL for things that aren't simple key->value pairs, and even for some of those
2. WooCommerce for storing presentation layer data in them
3. W3 Total Cache for having an automated process that destructively changes data in the database without warning or prompt, and Wordpress for allowing it

EDIT-My data was never in any danger for those watching at home, backups backups backups people!

LifeLynx
Feb 27, 2001

Dang so this is like looking over his shoulder in real-time
Grimey Drawer
I built a site for a client on Wordpress with the idea that he'd charge a monthly recurring fee for customers to give them access to certain services. BuddyPress + s2Member seemed like the perfect solution. But now he wants it work where customers buy "credits" to spend on individual services, and also to have a spot on the site where the customer can check how many credits they have. Is there a good Wordpress plugin that will do something like this?

Scaramouche
Mar 26, 2001

SPACE FACE! SPACE FACE!

I >think< what you're looking for is a Points or Loyalty Rewards system:
https://wordpress.org/plugins/mycred/

I haven't worked with any of them in the past. They're meant to work like AirMiles points or the like, but you could probably adapt them to the use case you mention. That one specifically mentions BuddyPress compatibility though I'm not sure what you're using it for.

You could probably hack together something with one of the Gift Card plugins, but I'm guessing the whole viewing the balance thing would have to be hand-rolled, and it assumes $1 = 1 credit, or some other relationship.

PS-You probably know this, but forcing people into putting money up front into paying for "credits" that can only be redeemed on a site is kind of shady. E.g. what if the site goes out of business? Does everyone get their credits refunded? What happens if the exchange ratio on a credit changes from $1 to 1 credit to $0.50 to 1 credit? Does everyone get rebalanced?

LifeLynx
Feb 27, 2001

Dang so this is like looking over his shoulder in real-time
Grimey Drawer

Scaramouche posted:

I >think< what you're looking for is a Points or Loyalty Rewards system:
https://wordpress.org/plugins/mycred/

I haven't worked with any of them in the past. They're meant to work like AirMiles points or the like, but you could probably adapt them to the use case you mention. That one specifically mentions BuddyPress compatibility though I'm not sure what you're using it for.

You could probably hack together something with one of the Gift Card plugins, but I'm guessing the whole viewing the balance thing would have to be hand-rolled, and it assumes $1 = 1 credit, or some other relationship.

PS-You probably know this, but forcing people into putting money up front into paying for "credits" that can only be redeemed on a site is kind of shady. E.g. what if the site goes out of business? Does everyone get their credits refunded? What happens if the exchange ratio on a credit changes from $1 to 1 credit to $0.50 to 1 credit? Does everyone get rebalanced?

MyCred looks perfect, thanks!

And yeah, I had the same concerns as you. My biggest concern was that people wouldn't sign up for things if there was an additional step (buying points) between registering and paying. Which of course isn't really my concern, so I'll be implementing it.

teen phone cutie
Jun 18, 2012

last year i rewrote something awful from scratch because i hate myself
I'm a recent college grad with no experience with any CMS but much experience with the front end and I'm pretty decent with the back-end as well. And I'm just now realizing that every loving employer requires knowledge of Wordpress or Drupal.

I'm pretty good at hard coding, and I really like responsive design, which is why I think learning to develop with WP shouldn't be too difficult, but I'm having trouble finding a starting point. What should I do first when developing for Wordpress? I've just installed it to my website, but I want to throw myself fully into it. Should I develop a theme? Just make a couple of pages? I'm starting to read the documentation, but I really don't know what I'm doing right now.

fuf
Sep 12, 2004

haha

Grump posted:

What should I do first when developing for Wordpress? I've just installed it to my website, but I want to throw myself fully into it. Should I develop a theme? Just make a couple of pages? I'm starting to read the documentation, but I really don't know what I'm doing right now.

It all depends how deep you wanna go really. There are a bunch of Wordpress "developers" who just rely on premium themes for everything and never touch a theme file directly (I was one for ages haha). If you know your way around the back end (adding menus, widgets, etc.) and how to install a theme then that's probably enough to claim you have WP knowledge and experience.

If you want to go a bit deeper then yeah I reckon build a theme. Learn how the template hierarchy works and which files get used to render different pages. Maybe add a custom page with a custom loop. Learn about hooks and actions.

kedo
Nov 27, 2007

Definitely build a theme (or at least spend some time picking one apart so you understand how they work) and definitely become intimately familiar with Gravity Forms and Advanced Custom Fields. With the two of those and a good knowledge of WordPress you can create a pretty wide array of functionality on both the front and backend.

Assuming you understand HTML and PHP, WordPress isn't some impossible thing to learn. It's incredibly well documented as well, so you can google virtually any problem and find dozens of different and working solutions.

fuf
Sep 12, 2004

haha

kedo posted:

become intimately familiar with Gravity Forms and Advanced Custom Fields.

Oh yeah definitely this.

kedo posted:

you can google virtually any problem and find dozens of different and working solutions.

The only issue I have with this is how often super old Wordpress forum threads show up as the top result for Wordpress searches. Quite often I'll google a problem and the first page is full of irrelevant discussions from like 2008.

kedo
Nov 27, 2007

fuf posted:

The only issue I have with this is how often super old Wordpress forum threads show up as the top result for Wordpress searches. Quite often I'll google a problem and the first page is full of irrelevant discussions from like 2008.

Very true. I find that generally those sorts of discussions will at least point you in the direction of a solution, but you're right in that they're not always a silver bullet.

Scaramouche
Mar 26, 2001

SPACE FACE! SPACE FACE!

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.

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.

my bony fealty
Oct 1, 2008

Question about custom post types: is there any significant advantage to using Advanced Custom Fields (other than ease of use) instead of just defining post meta boxes without the plugin? As far as I can tell they achieve the same result, the former just has a spiffy GUI.

vv thanks! that's the kinda stuff I was looking for, both of those are real cool.

my bony fealty fucked around with this message at 20:49 on Jun 26, 2016

kedo
Nov 27, 2007

my bony fealty posted:

Question about custom post types: is there any significant advantage to using Advanced Custom Fields (other than ease of use) instead of just defining post meta boxes without the plugin? As far as I can tell they achieve the same result, the former just has a spiffy GUI.

ACF has some complex options that would be extremely time consuming to set up if you were to define them by hand. See flexible content field, repeaters, etc.

torrid love affair
Feb 13, 2006

Based on a true story
Cmb2 is also really nice for metaboxes. I usually include the git version which doesn't have a GUI (but is still powerful). However I think there's a plugin version if you're more comfortable with that.

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

torrid love affair
Feb 13, 2006

Based on a true story
Cmb2 could handle that as well. Here's how https://github.com/WebDevStudios/CMB2/wiki/Adding-metaboxes-to-user-profile

torrid love affair fucked around with this message at 22:21 on Jun 27, 2016

awesomeolion
Nov 5, 2007

"Hi, I'm awesomeolion."

I'm working on a small game integrated into a Wordpress site for a client where users are paired, chat, and make decisions together. It currently uses individual AJAX requests for everything which is not scaling very well (surprise). So I'm looking at either long polling (keeping one request open rather than firing a bunch from one user) or a more fundamental shift to WebSocket and different hosting. The end goal is over 350 concurrent users which make me think I need to go the WebSocket route. Am I right?

As well, my understanding is GoDaddy (current host) typically doesn't support WebSocket and I'd need a VPS. Is this true? If so, how much should a decent VPS cost roughly? It definitely needs to stay Wordpress/PHP/JS/Jquery based but other than that I would really appreciate some guidance / ideas :) Thank you!

fuf
Sep 12, 2004

haha

awesomeolion posted:

I'm working on a small game integrated into a Wordpress site for a client where users are paired, chat, and make decisions together. It currently uses individual AJAX requests for everything which is not scaling very well (surprise). So I'm looking at either long polling (keeping one request open rather than firing a bunch from one user) or a more fundamental shift to WebSocket and different hosting. The end goal is over 350 concurrent users which make me think I need to go the WebSocket route. Am I right?

As well, my understanding is GoDaddy (current host) typically doesn't support WebSocket and I'd need a VPS. Is this true? If so, how much should a decent VPS cost roughly? It definitely needs to stay Wordpress/PHP/JS/Jquery based but other than that I would really appreciate some guidance / ideas :) Thank you!

Not sure about your first issue but check out https://www.digitalocean.com/ and https://www.vultr.com/ for decent and cheap VPSs. You could start with the cheapest and then just scale up if and when you need to.

awesomeolion
Nov 5, 2007

"Hi, I'm awesomeolion."

Thanks fuf. My client has consulted with a fancy Silicon Valley Man who suggested using Pusher so I guess we are going that way :gary:

White Light
Dec 19, 2012

Anyone know if there's a rock solid video tutorial for the Avada template?

awesomeolion
Nov 5, 2007

"Hi, I'm awesomeolion."

Parrotine posted:

Anyone know if there's a rock solid video tutorial for the Avada template?

When I was figuring out the Avada theme I didn't find any useful videos, but two things I can recommend:

1. Do a fresh Wordpress install, add the Avada theme, and load up each sample site/content (like the Gym one, and the other ones) and poke around to see how they're set up
2. Note the Fusion Slider on each sample site. I found this most annoying and unintuitive so you might want to give it some special attention (as well as the slides or however the heck they set it up)

Scaramouche
Mar 26, 2001

SPACE FACE! SPACE FACE!

Just bumping this thread in general to say that a good, free theme I've found is Customizr. It's a bit daunting at first because it does everything in the Customizer with a ton of options, but it falls together really quick. I redid a site someone did in GoDaddy Page Builder with it last night in about 2 hours, when the original site probably took far longer than that.

EDIT-Huh, and for stuff it doesn't do it falls back to bootstrap. So you can use btn-primary, panel-body, etc etc. Handy

Scaramouche fucked around with this message at 20:09 on Jul 14, 2016

frogbs
May 5, 2004
Well well well
So we have about 20 Wordpress sites that we manage for local businesses. Currently we have them hosted on a few Hostmonster accounts (I know...). Recently we've seen performance decrease drastically with no changes being made by us. We think they've just oversold the servers, when we ask them they just tell us we need to 're-optimize our sites' with no other explanation.

Can any of you recommend a reasonably priced Wordpress host that has some small amount of credibility?

The other thing i've been considering is setting up EC2 instances for each Wordpress site using the Bitnami Wordpress image mentioned in this Amazon guide. Is this a bad idea for any specific reason? https://aws.amazon.com/getting-started/tutorials/launch-a-wordpress-website/

PT6A
Jan 5, 2006

Public school teachers are callous dictators who won't lift a finger to stop children from peeing in my plane

frogbs posted:

So we have about 20 Wordpress sites that we manage for local businesses. Currently we have them hosted on a few Hostmonster accounts (I know...). Recently we've seen performance decrease drastically with no changes being made by us. We think they've just oversold the servers, when we ask them they just tell us we need to 're-optimize our sites' with no other explanation.

Can any of you recommend a reasonably priced Wordpress host that has some small amount of credibility?

The other thing i've been considering is setting up EC2 instances for each Wordpress site using the Bitnami Wordpress image mentioned in this Amazon guide. Is this a bad idea for any specific reason? https://aws.amazon.com/getting-started/tutorials/launch-a-wordpress-website/

Amazon is probably going to be expensive overkill for WordPress hosting.

I'll recommend goon-run apisnetworks.com, which now I think has a one-click installer for WordPress. They've always been great to deal with and I have no complaints about reliability or speed. It's slightly more expensive than some cut-rate alternatives, but I think it's well worth the price.

diremonk
Jun 17, 2008

I've been having issues with one of my wordpress sites for the last couple of months. While I'm in the admin area, it will randomly throw a type 500 error. The site isn't under any type of serious load and I don't have a crazy amount of plugins.





I cropped the middle image a bit too much, but all those errors are tied into xmlrpc.php. But only one of the errors is for the site I'm talking about right now. I'm thinking it may be a bad .htaccess file, but I don't see it in either the root directory for the site or even the root for my hosting account. Any ideas on where I should start looking?

fuf
Sep 12, 2004

haha
You can just delete/rename xmlrpc.php and see if that helps. Unless you have some kind of app that is posting to your WordPress site then you don't need it for anything.

Adbot
ADBOT LOVES YOU

Dr. Fishopolis
Aug 31, 2004

ROBOT

PT6A posted:

Amazon is probably going to be expensive overkill for WordPress hosting.

I'll recommend goon-run apisnetworks.com, which now I think has a one-click installer for WordPress. They've always been great to deal with and I have no complaints about reliability or speed. It's slightly more expensive than some cut-rate alternatives, but I think it's well worth the price.

I can second Apis for sure.

I also have a bunch of VMs with vnucleus, also goon-run, and have nothing but great things to say. They answered my support ticket, even though I didn't submit it correctly, within 2 hours on a saturday night. I've never gotten better support from any company for anything.

http://forums.somethingawful.com/showthread.php?threadid=3508988

Dr. Fishopolis fucked around with this message at 20:45 on Aug 15, 2016

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