gulliver
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: How can I add a timestamp to a WP export?Thanks…
Sorry, poorly-worded question… I want to get the datestamp that forms part of the filename to also include the time (rather than just the year/month/day).
Forum: Fixing WordPress
In reply to: Why might wptexturize have become re-enabled?@sterndata… thanks.
Further checking shows it was indeed a plugin which was causing this issue.
Updating it removes the issue, so I can’t try adding a priority although I’d still like to find a reliable way to globally disable wptexturize.
Forum: Fixing WordPress
In reply to: Post to Twitter@tara… thanks, but that’s not what I wanted. I don’t want to spend more time trying various plugins which may/may not do what’s required.
That’s why I’m asking for a suggestion of something which will do what’s required.
Forum: Fixing WordPress
In reply to: Can I add a ‘show all pages’ link to wp link pages?Thanks.
Hoping to do it more simply, I’m since found a different solution.
Forum: Fixing WordPress
In reply to: How can I include private pages in a page list?UPDATE… in the code from @psaju, using ‘publish’ rather than ‘published’ works.
Forum: Fixing WordPress
In reply to: How can I include private pages in a page list?Thanks.
That’s returning nothing – blank.Forum: Fixing WordPress
In reply to: List pages and templatesThanks.
That’s better.
This is useful to have a on a private page, so that if I’m tempted to rename templates I can see which pages I then need to resave with the correct template.Your help’s appreciated. 😉
Forum: Fixing WordPress
In reply to: List pages and templatesThanks.
That’s a lot cleaner and more useful…
Array ( [Notes] => default )If I can find a way to lose the ‘Array’ and the ‘()’ I’ll be happier – and also the square brackets.
I don’t know if str_replace or preg replace will do it.
Forum: Fixing WordPress
In reply to: How can I show the content of all pages on a single page?@cedcommerce…Thanks. 🙂
- This reply was modified 9 years, 9 months ago by gulliver.
Forum: Fixing WordPress
In reply to: How can I remove image from feed?UPDATE…
I’ll add this in the hope it might be useful for others.
Rather than trying preg replace – about which I don’t know enough – I used a function…
function remove_images( $the_excerpt_rss ) { $postOutput = preg_replace('/<img[^>]+./','', $the_excerpt_rss); return $postOutput; } add_filter( 'the_excerpt_rss', 'remove_images', 100 );Forum: Fixing WordPress
In reply to: How can I remove image from feed?@danhgilmore… Thanks. Yes, and various other stuff.
I don’t understand enough about preg replace to use it.
Forum: Fixing WordPress
In reply to: Using 2 modified feed templates.FURTHER UPDATE…
I’ll add this in case it’s of use to someone.
It seems to work ok with…
// This delivers valid feeds, with the correct templates. remove_all_actions( 'do_feed_rss2' ); add_action( 'do_feed_rss2', function() { $rss_template = get_template_directory() . '/feeds/item-feed.php'; $rss_template2 = get_template_directory() . '/feeds/notes-feed.php'; //if ( $post_type = 'item' ) if( get_query_var( 'post_type' ) == 'item' and file_exists( $rss_template ) ) load_template($rss_template); elseif ( $post_type = 'post' ) load_template($rss_template2); else do_feed_rss2(); // Call default function }, 10, 1 );This enables use of a custom template for the feed of normal posts, and use of a different custom template for the feed of the CPT ‘item’.
The feeds differ in channel title/link/description.
Forum: Fixing WordPress
In reply to: Using 2 modified feed templates.UPDATE…
With relatively little php knowledge, I’m wondering if I can use this…
remove_all_actions( 'do_feed_rss2' ); add_action( 'do_feed_rss2', 'item_feed_rss2', 10, 1 ); function item_feed_rss2() { $rss_template = get_template_directory() . '/feeds/item-feed.php'; $rss_template_notes = get_template_directory() . '/feeds/notes-feed.php'; if( get_query_var( 'post_type' ) == 'item' and file_exists( $rss_template ) ) load_template( $rss_template ); elseif( get_query_var( 'post' ) and file_exists( $rss_template_notes ) ) load_template( $rss_template_notes ); else do_feed_rss2(); // Call default function }Forum: Fixing WordPress
In reply to: Use custom feedUPDATE: Seems the code in my functions was the issue – even though it was a direct cut/paste of that working on in another install. Strange.
Forum: Fixing WordPress
In reply to: Auto-assign post to category on publish.Thanks.
‘Oh, the joys of not understanding what you cut/paste.’ 😉