Forum Replies Created

Viewing 10 replies - 1 through 10 (of 10 total)
  • Forum: Plugins
    In reply to: [Keyring] Error logging
    Thread Starter andy14

    (@andy14)

    Thanks @beaulebens, that did the trick!

    @jholliday: you could set the cache to 0, but you’d need to be aware of hitting the API limit (and your page speed).

    @christians1972: could you elaborate further about how it’s not working as you expect?

    The default cache length is 24 hours. Disconnecting and connecting again would have forced a new API request.

    You can change the frequency of API requests, or alternatively set up a webhook to notify your WordPress site of changes and use that to bust the cache.

    I’m not experienced with writing plugins, but you could always define the style(s) in your theme’s stylesheet so that it overrides the core file CSS. I had the same issue: everytime I’d upgrade WP the gallery CSS would revert to its default state.

    .gallery img { border: 3px solid #151515 ! important; }

    … and so on for any of the other styles you wish to change.

    Thread Starter andy14

    (@andy14)

    Just an update. I thought I’d post my working code. I’m no coder – but this was my idea (based on including content after x amount of posts).

    At the top of index.php
    <?php $count == the_time('F j'); ?>

    Then after the post:

    <?php if ($count != the_time('F j')) : ?>
    That concludes the posts for today! Rest of the posts are below:
    <?php endif; $count++; ?>

    Thread Starter andy14

    (@andy14)

    Maybe so ?? I want to include the five latest posts in my header file which is dynamically included on every page of my site, including my WP template. The code above works on every page except the gallery pages, which also include the header file.

    Thread Starter andy14

    (@andy14)

    Thanks for the help Scooby!

    That code works, too, on just a normal page which isn’t part of the WP installation.

    That code is:

    <?php
    define('WP_USE_THEMES', false);
    require('/path/wp-blog-header.php');
    wp_title(' ');
    ?>

    However, I get the same error when using that code in another script (Coppermine gallery). Perhaps it’s not possible due to the scripts somehow clashing.

    I’m ultimately trying to include the latest 5 posts from WP on my Coppermine gallery script. I’m just using wp_title as a really basic example to make sure I can include info from WP on another page. Again, it works fine on a regular page outside the WP installation, but not in the Coppermine script.

    The path is correct, too.

    Thread Starter andy14

    (@andy14)

    That works a charm on a regular PHP page of text. However, it breaks when the page I’m calling it on belongs to another script.

    I’m trying to display the blog name (and, ultimately, some other wp functions) on a page called displayimage.php which belongs to a another script called Coppermine gallery. Unfortunately, when I visit the displayimage.php page I get an error “Call to a member function on a non-object in “path/wp-includes/functions.php”.

    I’m no programmer, but I’m guessing it’s something to do with the WP config file clashing with the Coppermine files/functions. I’m not sure if it is possible, but is there someway to say “connect to the wp config file, pull the blog name, and then stop any connection to wordpress”?

    The code I’m currently using to display the name is:

    <?php include "/full/path/to/file/wp-config.php"; wp_title(' '); ?>

    Works fine on a regular non-WP page, through breaks when used on another PHP script (Coppermine).

    I created a custom field called “icon”, and then in my post template, called that field where I wanted the image to show up.

    Just edit the timestamp when posting.

Viewing 10 replies - 1 through 10 (of 10 total)