Forum Replies Created

Viewing 15 replies - 1 through 15 (of 151 total)
  • Thread Starter Rebecca O'Brien

    (@rjmastey)

    I just tested it again. It’s working properly.

    I had deactivated the Publicize feature entirely – simply resetting the WP -> FB link before hadn’t worked. Either something changed on your end, or disabling/enabling Publicize did the trick. =)

    Thread Starter Rebecca O'Brien

    (@rjmastey)

    https://emergencygearguide.com (mapped subdomain)
    https://variablesquirrel.com (multisite installation)

    I’m having a similar problem, except with multisite. The links work (usually), but it displays the wrong url.

    Thread Starter Rebecca O'Brien

    (@rjmastey)

    Just to follow-up. The only box checked on the Domain Mapping Settings is Permanent Redirect. The rest are unchecked.

    The Twitter module appears to be respecting the mapped permalinks, but the Facebook one is not. Is this a problem with Jetpack or a DM setting?

    Citified.com/USA/IL/Chicago won’t work in a basic MU install. You’d need some customization.

    Why do you need MU? Will each country/state/city have its own admin panel?

    You say county/state/city. How do you want your URLs to look?

    If someone wants to see info for Chicago, will they be going to
    citysite.com/USA/IL/Chicago

    Or just citysite.com/Chicago

    If it’s the former, I’d need more info to know if MU is the right choice.

    If it’s the latter, all you need to decide is do you want users to see chicago.citysite.com (subdomain) or citysite.com/chicago (subdirectory).

    Your superadmin, in a properly set-up MU environment, will appear in the upper left. My Sites -> Network Admin

    Thread Starter Rebecca O'Brien

    (@rjmastey)

    I gave up and took the nuclear option. Exported the posts/pages, downloaded uploads/themes/plugins, cleared the existing site and reinstalled.

    Works like a charm now. =)

    Thread Starter Rebecca O'Brien

    (@rjmastey)

    It was a collision with a function. I’d kind of screwed around with making it work before realizing I’d missed an obvious solution, so my code was…messy.

    New problem: RSS links don’t work with that rewrite rule.

    I’ve edited it to this

    add_rewrite_rule('([^feed/]*)/category/([^/]*)/([^/]*)/?',
    	'index.php?category_name=$matches[2]&post_type=$matches[3]',
    	'top');
    add_rewrite_rule('feed/([^/]*)/category/([^/]*)/([^/]*)/?',
    	'index.php?feed=$matches[1]&category_name=$matches[2]&post_type=$matches[3]',
    	'top');

    In the hopes it would work, but, alas. Nothing. I’m going to try using rewrite endpoints and just appending the CPTs to that.

    Ideally, the permalink structure would look like this
    site.com
    site.com/cpt/
    site.com/cpt/feed/rss2/ (here is where everything stops working)
    site.com/cpt/category/category-slug/
    site.com/cpt/category/category-slug/feed/rss2/

    Thread Starter Rebecca O'Brien

    (@rjmastey)

    Thanks for the input, bc. I think you’re right. I’d tried adding higher priority to my rule, and it broke all the archives.

    I finally got it to work by appending the CPT to the end of the category rewrite.

    add_rewrite_rule('category/([^/]*)/([^/]*)/?',
    	'index.php?category_name=$matches[1]&post_type=$matches[2]',
    	'top');

    The only drawback here is now, within the categories, the post type must be identified by name rather than slug. Some of them have custom slugs – ice_cream may have the slug delicious_frozen_goodness, for example. (Personally not too happy about this, it was a cosmetic change requested halfway into the project.) The archive for the CPT will be accessed directly
    site.com/delicious_frozen_goodness/

    But the archive for the category/CPT combo needs to be accessed as
    site.com/category/new_treats/ice_cream/

    Any thoughts on the rewrite there? I’m guessing it’s something extremely obvious that I’m missing.

    I’m also experiencing a few ancillary issues now, including the global conditional statements not always working. For example, is_front_page(), is_home(), is_single(), etc aren’t operating as expected. I’m going to venture a guess that this is because of previous code I still have active that muddied up the system, so a code clean-up is in order.

    Thanks again!

    Forum: Hacks
    In reply to: Sort Oder of Dropdown

    Merry Christmas. =) Basic dropdown with a list of all user display names, sorted by last name.

    function userDropDownByLastName($echo = true) {
        $args	= array('who' => 'all_with_meta');
        $results	= new WP_User_Query($args);
        if(!$results) { return false; }
        $users	= array();
        foreach($results->results AS $user) {
    	$users[$user->last_name] = $user->data;
        }
        ksort($users);
    
        $return	= '';
        $return .= "<select>
    		    <option></option>";
        foreach($users AS $lastName => $value) {
    	$return .= "<option value='{$value->display_name}'>{$value->display_name}</option>";
        }
        $return .= "</select>";
        if($echo) {
    	echo($return);
        }
        return $return;
    }
    userDropDownByLastName();
    Forum: Hacks
    In reply to: Posting from a plugin

    That link should give you a pretty good start.

    I do agree with the idea of creating a new user role. That may offer some more flexibility that simply editing an existing one.

    Creating an entirely new panel rather than custom post types, though, I’m not so sure. If you’re doing a List style post, for example, you can add all list element to a serialized array and store them as a single post option.

    Forum: Hacks
    In reply to: Sort Oder of Dropdown

    From the documentation, it looks like you can’t order by last night. You can sort by ID, nicename or display name. last_name is stored as a meta value, so you may either need to use a custom query or simply retrieve all users and sort via PHP – in both cases, creating your own dropdown.

    Forum: Hacks
    In reply to: Posting from a plugin

    It may be easier to use a plugin to display how the editor appears to certain users – e.g., give all the users who would fill out this form the “author” role and customize what capabilities that role has in your installation. It would use the same post screen, but wouldn’t display all the options. You can also control the ability to publish posts, so someone with a higher capability (editor/admin) could review. Take a look at add_cap() and remove_cap().

    Alternatively, if you’re going for a more streamlined content system (like eHow) have you considered using custom post types for the various content types. After rerereading your post, I’m pretty positive this would be the best option (probably in tandem with the user capabilities).

    What he said.

    If you’re converting a standard site into WP, you need to remove the header/footer areas and just input the content, probably as a Page. If you put the entire page in, you’ll have more than a few bugs.

    Yes, definitely. The only benefit of a child theme is that your edits won’t be destroyed if the main theme has an update. So go ahead and edit to your heart’s content – I’d just suggest editing the theme title at the top of style.css to avoid an inadvertent update and loss of all edits.

    I haven’t used Twenty Twelve much, but I’m inclined to say you want to edit content.php here

    <header class="entry-header">
    	<?php the_post_thumbnail(); ?>
    	<?php if ( is_single() ) : ?>
    	    <h1 class="entry-title"><?php the_title(); ?></h1>
    	<?php else : ?>
    	    <h1 class="entry-title">
    	      <a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentytwelve' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php the_title(); ?></a>
    	    </h1>
    	<?php endif; // is_single() ?>
Viewing 15 replies - 1 through 15 (of 151 total)