Forum Replies Created

Viewing 15 replies - 1 through 15 (of 32 total)
  • Thread Starter chrismichaels84

    (@chrismichaels84)

    Yeah, I just did the same with three other posts. The only thing changing in the rows are the post_modified columns.

    And here’s a fun wrinkle. If you go to my site and view almost any post, you will see strange question mark characters. I had thought that was a fot problem, but it turns out that when I re-update the posts, it gets rid of those characters. So, there must have been some kind of corruption in my importing/exporting that added characters. Those characters must be breaking the editor somehow?

    In any case, I’m done for the night. If anyone has any ideas about what’s happening, or ideas on how to automate updating 200 posts, I’d appreciate it 🙂

    Thread Starter chrismichaels84

    (@chrismichaels84)

    I’ve double checked wp_options
    My wp-config has no url of any kind
    Neither does my .htaccess

    So, I just now copied the data from the phpmyadmin cell directly into the blank wordpress editor and updated the changes. That solved the problem for that single post, but I can’t see anything that changed in the database.

    I guess that is a workable solution. I shouldn’t have to edit posts often, but I’d still like to know what’s going on.

    Thanks for you thoughts Digico Paris. Any other ideas, let me know.

    Thread Starter chrismichaels84

    (@chrismichaels84)

    Yes, wp_options seems up to date as well.

    Thread Starter chrismichaels84

    (@chrismichaels84)

    I think so, let me check.

    Yeah, I don’t know what the deal is with those question mark characters. One problem at a time, I guess.

    Thread Starter chrismichaels84

    (@chrismichaels84)

    I have also looked at it in Firefox and Chrome with the same results. The javascript consoles are clear so it doesn’t seem to be a frontend problem.

    Thread Starter chrismichaels84

    (@chrismichaels84)

    Using phpmyadmin, I see what I would expect. A lot lot of rows (2000 or so). The post_content all seems appropriate, and all the urls seem to point to ‘.com’ and not ‘.dev’

    I could do a couple screenshots, but I’m not sure how to post them.

    Thread Starter chrismichaels84

    (@chrismichaels84)

    Thank you, I’ll keep an eye on it. Right now there are only 5 cpts. The reason I opted for cpts was so I could do individual templates for each cpt single and archive. But, I guess I could do the same thing with conditional tags.

    Great discussion. I always enjoy hearing how others do thing.

    Thread Starter chrismichaels84

    (@chrismichaels84)

    Thanks for the info. I hadn’t considered capabilities. Is there a “no one can do this” capability? Or, since I’m the only super admin, I could set it to that.

    I always welcome questions about design strategy. I am a design nerd anyway. Here is what I am ultimately accomplishing.

    I have a publishing company with several stories (books) out there. So, my master CPT is “Stories” with its own tags and a couple taxonomies (genres, market, etc).

    On the site, I also want a few slave cpts like reviews, news, and authors. The idea is that there may be one Author (a post) that is attached to multiple stories. Same for news and reviews. I want to be able to query like so “get a list of authors that are attached to the story “Phantom Hearts” (post id 76).

    To do this, I have a system that creates a cpt “Stories” and calls it master. Then it creates whatever “slaves.” It also creates various taxonomies for each post type as needed. Then, it makes a “stories_master” hierarchical taxonomy that is shared between all the slaves (reviews, authors, news). Every time a new post is created under Stories, a new category item is created under “stories_master” thus allowing a new Author post to be assigned to the category “Phantom Hearts” which is identical to the post title “Phantom Hearts” under the stories CPT.

    Wow, that sounds complicated, but its only 400 lines of code, heavily commented. I only had a week to get this going (in my spare time) so I don’t know if I thought it through correctly. I’m not really a wordpress ninja (more of a symphony components/composer guy), so I’d love to know any feedback on how I may have done this more efficiently.

    In any case, I got it working 🙂 Thank you.

    Thread Starter chrismichaels84

    (@chrismichaels84)

    I create a custom taxonomy when I create a custom post type. The two are linked. However, my plugin needs to create the custom taxonomy items, not the user.

    I want the plugin to create the taxonomy (category) items in very specific instances and I don’t want the user to have any control over created or deleting these items. They still have control over all other taxonomies.

    I ended up removing the menu items, and hooking into the edit-tags page to die() with an error if they try to edit that taxonomy. Still, I feel like there has to be a much less clumsy solution.

    What I have works. If anyone wants, I’d be happy to post the entire script to github if it would help anyone. Currently it creates as many cpts as you like based on an array, builds whatever custom taxonomies for that cpt, and even links some cpts as “masters” to others.

    Thread Starter chrismichaels84

    (@chrismichaels84)

    Yeah, its just for the one subdomain. Really, I’m fixing my short sightedness when I first created the system by moving it. In anycase, I thought about .htaccess, but I didn’t know I could redirect, only rewrite urls. I’ll look into that. Thanks!

    Thread Starter chrismichaels84

    (@chrismichaels84)

    That is perfect. I’m attaching capabilities to earned badges and have the system set up to automatically assign the badges. I can attach the capabilities to that action easily enough.

    Cheers!

    Thanks for the info. Why not use auto upgrade?

    When you log in, doesn’t wordpress say “there is an update available?”

    If not, you can do it manually.

    But this can be tricky, BE SURE TO BACK EVERYTHING UP FIRST. And while you are upgrading there will be a short time when the site is not live, so do it when you have little traffic.

    That will only take care of the hacks in WordPress core files, if there is any malicious code. I recommend a security plugin to help clean up your site after a hack.

    Wordfence will check your plugins against the repository to make sure the code is clean. It has a lot of other great features. This is the one I recommend.

    Bullet Proof Security, All In One WP Security & Firewall, and Better WP Security are all great ways to go as well.

    Let us know how it goes.

    Forum: Hacks
    In reply to: How add external data file

    For that, you use WP Chron. The API is pretty simple: http://codex.wordpress.org/Function_Reference/wp_schedule_event

    But you can only go up to daily, not monthly. If that’s a problem, then the other option is to create a simple plugin that adds a link under an admin menu to execute the update and download. Then YOU fire it once a month.

    Almost, its a little backwards. What I would do is move the wordpress folder from the zip into your site root so you have:
    http://www.example.com/
    – /wordpress/
    – index.php
    – wp-config.php
    – wp-blog-header.php
    – and all the rest.

    Then go to http://www.example.com/wordpress and go through the Famous 5 minute wordpress install to set up your admin and database and all that.

    Now, log into your admin and go to settings -> permalinks and choose whichever you like (you can change it later, just pick anything except the default. This will create the .htaccess file for you). Save the changes.

    Go to Settings -> General and make the site address http://www.example.com while the wordpress address is example.com/wordpress

    Save those changes.

    Copy (NOT MOVE!) the index.php and .htaccess files from the WordPress directory into the root directory of your site (Blog address). The .htaccess file is invisible, so you may have to set your FTP client to show hidden files.

    Open your root directory’s index.php file in a text editor
    Change the following and save the file. Change the line that says:
    require('./wp-blog-header.php') to
    require('./wordpress/wp-blog-header.php');

    Now wordpress lives (invisibly) under /wordpress/ and the site works from example .com.

    Now, open up /wordpress/wp-config.php and add

    /* Multisite */
    define( 'WP_ALLOW_MULTISITE', true );

    Then when you login next, under tools you will have Network setup that will get you going.

    A couple notes: you can only use subdirectory multisite like this:
    http://www.example.com/site1
    http://www.example.com/site2 and so on

    Always change the security keys in your wp-config file early on.

    The folder doesn’t have to be /wordpress/ it could be /im-just-that-awesome/ for all wordpress cares. Just make the appropriate changes in wp-config and your Settings->General tab.

    Lemme know how it works for you.

Viewing 15 replies - 1 through 15 (of 32 total)