Forum Replies Created

Viewing 15 replies - 16 through 30 (of 69 total)
  • Thread Starter GATEKeeper

    (@gatekeeper)

    I take it back.

    I had an older (3-year-old) server and it wouldn’t work on it, but some module that must be required is on my new server, so it works fine there.

    Wish I could tell you what that module is, but it wasn’t anything I saw listed in the install directions.

    Sorry, I may have spoken too soon. My resources on the server are getting chewed up by the admin-ajax.php file, but it looks like it’s happening because a lot of users are triggering the file from pages of the site.

    What would cause that to happen? Why would a normal visitor trigger and admin file?

    Something is definitely wrong. I’ve seen forum responses that the activity is caused within the server by users, but I’ve seen activity to the file when I’m not connected (and I’m the only user), and I have the IPs from where they’re connecting from, which definitely aren’t local.

    Someone out there is trying to exploit something.

    Thread Starter GATEKeeper

    (@gatekeeper)

    My solution is to go back to what I did before–I’m embedding the social media sharing tools directly. I barely used a fifth of the options available before.

    Yeah, there doesn’t appear to be any information about what goes there, if size is important and so on.

    Thread Starter GATEKeeper

    (@gatekeeper)

    Okay, I’ll take a look and see what I can do. I think it may be a case of the SEO plugin just not being compatible with the Events Calendar main page.

    Good news, I’ve found the specific reason this is happening.

    The answer is that if you’re uploading images with metadata, and that data includes curly quotes, WordPress screws up and can’t read the size of the graphic because it’s getting stuck on those non-web friendly characters.

    A good example: I had a press photo from Warner Bros. for a new movie, which had the metadata description that included two sets of curly quotes. I went in through Bridge, changed those curly quotes to regular ones and re-uploaded the image and it worked fine.

    If you can’t fix the metadata, the other solution is to resave the file with a program that doesn’t save the metadata. That said, it would be nice if WordPress had a built-in solution.

    Something is definitely wrong in WordPress, or it seems like it to me. I’m getting random issues with some images as well. Not all images, just a few here and there – but when they upload the size is set to 0x0. If you look at the preview, the image is fine, and the large version is there, but you can’t edit the image in WordPress and posting it comes out full size.

    How can we test to explain the issue?

    Forum: Plugins
    In reply to: Post Formats

    Eureka, I found the final piece of this.

    The key for me is to add at the end:

    'operator' => 'NOT IN',

    so it looks for posts that aren’t in the image post format. Or I have to add an array of terms to the terms line.

    Forum: Plugins
    In reply to: Post Formats

    Wait, never mind. I solved it now that I had the right code.

    I still need to test it more, but this should work in my specific context:

    <?php
    $args = array(
      'post__not_in' => $ids,
      'showposts' => 10,
      'cat' => '-4,-1866,-27',
      'tax_query' => array(
        array(
          'taxonomy' => 'post_format',
          'field' => 'slug',
          'terms' => 'post-format-image'
        )
      )
    );
    	query_posts( $args ); ?>
    <!-- Look Stuff -->
        <?php endwhile; ?>

    My final, remaining question though is how I query for standard post formats? post-format-standard does not work.

    Forum: Plugins
    In reply to: Post Formats

    Interesting. The final code they posted does work for me – the key thing to note is that it’s post_format, not post-format:

    $args = array(
      'tax_query' => array(
        array(
          'taxonomy' => 'post_format',
          'field' => 'slug',
          'terms' => 'post-format-quote'
        )
      )
    );
    query_posts( $args );

    But I still can’t get that to work within the context of my query:

    <?php
    	query_posts( array( 'post__not_in' => $ids, 'showposts' => 10, 'cat' => '-4' ) ); ?>
        <?php while (have_posts()) : the_post(); ?>
    <!-- Loop Stuff -->
        <?php endwhile; ?>
    Forum: Plugins
    In reply to: Post Formats

    There don’t seem to be a lot of experts yet for any of this. I’ve been trying to find an answer to a question about querying post formats myself, but I’m in the same boat as you.

    Thread Starter GATEKeeper

    (@gatekeeper)

    Anyone have any ideas? This can’t be that difficult, is it?

    Thread Starter GATEKeeper

    (@gatekeeper)

    Thanks. That does explain this a lot more, but I still can’t get it to work (I’m only somewhat literate in coding).

    Perhaps it’s worth noting that my index page starts with the query:

    <?php query_posts('showposts=1&meta_key=featured&meta_value=1');
       $ids = array();
       while (have_posts()) : the_post();
       $ids[] = get_the_ID(); ?>

    Then my second area on that page queries with:

    <?php query_posts( array( 'post__not_in' => $ids, 'showposts' => 4, 'cat' => 4 ) ); ?>'
    THE LOOP

    Followed by the last section:

    <?php query_posts( array( 'post__not_in' => $ids, 'showposts' => 10, 'cat' => '-4,-1866,-27' ) ); ?>
    THE LOOP

    Does that change anything?

    Thread Starter GATEKeeper

    (@gatekeeper)

    Eureka! I’ve got it.

    Okay, so there may be cleaner ways of doing it, but I messed around until I finally figured it out – I had no idea that $tag was actually something I could use.

    Basically, for the tag page, it checks to see if there’s an image with the tag slug in the specified folder and then outputs that image, or displays a default image.

    <?php
    $image = "$tag.jpg";
    $url = "https://URL TO FOLDER";
    if(file_exists("$url/$image"))
    {
    echo "<img src=\"$url/$image\" alt=\"$tag\" />";
    }
    // if no, give an alternative image
    else
    {
    echo "<img src=\"$url/tag.jpg\" alt=\"$tag\" />";
    }
    ?>
Viewing 15 replies - 16 through 30 (of 69 total)