andy14
Forum Replies Created
-
Forum: Plugins
In reply to: [Keyring] Error loggingThanks @beaulebens, that did the trick!
Forum: Plugins
In reply to: [Eventbrite API] No update after adding, deleting or editing Events@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?
Forum: Plugins
In reply to: [Eventbrite API] No update after adding, deleting or editing EventsThe 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.
Forum: Plugins
In reply to: A little plugin to override default gallery cssI’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.
Forum: Fixing WordPress
In reply to: Divider after certain dateJust 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++; ?>
Forum: Fixing WordPress
In reply to: WP function on php pageMaybe 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.
Forum: Fixing WordPress
In reply to: WP function on php pageThanks 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.
Forum: Fixing WordPress
In reply to: WP function on php pageThat 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).
Forum: Fixing WordPress
In reply to: How Image with post On Front Page.I created a custom field called “icon”, and then in my post template, called that field where I wanted the image to show up.
Forum: Fixing WordPress
In reply to: Posts for specific datesJust edit the timestamp when posting.