gulliver
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Custom Post Type archive.Thanks.
Struggling to understand this after too many hours staring at a screen, how do I ‘set child_of to the current page’?
I assume it begins with ‘ ‘child_of’ =>’ but I can’t even guess the rest.
Forum: Fixing WordPress
In reply to: Enqueue scripts.Excellent. Thanks. 🙂
It’s interesting – now you’ve shown me, I can better understand the Codex info about it.
Thanks again.
Forum: Fixing WordPress
In reply to: Can't change dashicons on some CPTsUPDATE: Brain-fade was the cause… using a plugin to create them, having then exported the code to a functions file I’d forgotten to then deactivate the plugin before editing that functions file.
Forum: Fixing WordPress
In reply to: Custom sort order?Thanks. 🙂
Forum: Fixing WordPress
In reply to: Custom sort order?Thanks, Nisha.
Sweet plugin – but my cpts are hierarchical, so it won’t work.
Forum: Fixing WordPress
In reply to: CPT archive display@ Suyogya Shukla…
I’m trying to add code to a WP archive template.
Forum: Fixing WordPress
In reply to: CPT archive display@ Suyogya Shukla…
Thanks.
Sorry, I poorly explained – although it helps refresh my memory on manually compiling a list, I’m trying to add code to a template rather than add it to a post.Forum: Fixing WordPress
In reply to: Includes and 'get_template_part'.Thanks.
Forum: Fixing WordPress
In reply to: Includes and 'get_template_part'.Thanks.
I’m also in the habit of ‘grabbing an existing…’ – although often with no real understanding of what I’m doing – hence my regular appearances here asking for help.
🙂Forum: Fixing WordPress
In reply to: Includes and 'get_template_part'.@dartiss… thanks.
I updated the initial post since your reply.
I think I now understand, and can use:
<?php get_template_part( 'part', 'view-all-posts' ); ?>At least I now know how to use it, although I’m still unsure if this is sensible way… my template files have various part-page elements for which the name begins with ‘part-‘.
Forum: Fixing WordPress
In reply to: CPT titles.Thanks.
Having read a lot, I’m ok-ish with the slug/permalink thing (unless I missed something – quite likely)… I hadn’t explained clearly – the slug isn’t removed, but modified to a different url path which shouldn’t conflict.
It was the title that was troubling me… but if I change the conditional to ‘elseif (is_singular(‘post’))’ things seem to be ok. (I hadn’t realized that ‘is single’ also applied to CPTs.)
Forum: Fixing WordPress
In reply to: What does this code mean?Thanks. Appreciated.
Forum: Fixing WordPress
In reply to: Since switching to title-tag, page numbers no longer in titleUPDATE: Page numbers are added to paginated posts, but not pages.
Before switching to title-tag support, I’d used conditional page titles with this code to add page numbers topaginated posts/pages:
if ($paged >= 2 || $page >= 2 ) echo ' ' . sprintf( __('(page %s)'), max($paged, $page) );General-template.php in core includes the line below, which seems to add the numbering to posts – but not pages.
// Add a page number if necessary. if ( ( $paged >= 2 || $page >= 2 ) && ! is_404() ) { $title['page'] = sprintf( __( 'page %s' ), max( $paged, $page ) ); }Forum: Plugins
In reply to: [ShareThis: Free Sharing Buttons and Tools] switchTo5xThanks, Brandon.
I try to understand whatever I cut-and-paste.
Forum: Fixing WordPress
In reply to: Can't rename page permalink.UPDATE: The cause of the problem is that as part of removing usused stuff, in functions I removed the slug metabox.
There’s a Trac ticket for this.
Restoring the metabox, and then hiding in page options solves the issue.