The tag has no usage guidance.

learn more… | top users | synonyms

0
votes
0answers
14 views

Want to display individual media file image link from get children array

In the code you can see I retrieve all the image attachments successfully, but now I want to create a link that points just to the individual attachment image and not the blogg post. Iv'e tried ...
0
votes
0answers
13 views

Trying to get the link to the media file image attachment to display in a lightbox

Tried many variations including wp_list_pluck with no luck. Not sure how to proceed. <?php $attachments = get_children( array( 'post_parent' => get_the_ID(), // $pageChild->ID, $post->...
3
votes
2answers
84 views

Child terms from multiple parents?

I'm using isotope to filter a custom post type. But I only want the child taxonomies of 2 particular parents. I have it working nicely for one parent, but I'm not sure how to modify the array to ...
1
vote
1answer
43 views

Need help with category listing!

I'm trying to solve this for a while, but I couldn't get a satisfactory way to get what I want. Maybe it's very simple and I'm just too inexperienced. I need a way to display all the article titles ...
0
votes
0answers
29 views

How to display child pages with in a limited child content?

I have a php snippet that will displayed child pages. And now, I want to displayed only the featured image with the 55 characters of content only (except the title) and put some button. Like this http:...
0
votes
1answer
171 views

Get gallery images from page ID

I have a page within WordPress called 'Gallery', the page ID is 128, and I need to display only the gallery images from that page on a different page with a different ID. The images were uploaded ...
0
votes
0answers
31 views

get_children() show deleted attachments of the post

I have a problem with the attachments in a post :( If I upload an image into a post and after I delete it, Wordpress show the image as still attached to that post. This is my code to retrive the ...
0
votes
1answer
36 views

How to show the view more on my display of pages shortcode

I want to show the list of childpages under a certain parent page & set how many childpages to display & show the "View More" link below the last child page displaying. What was missing from ...
0
votes
0answers
30 views

Getting attachments to a post to show in the order they are in the WYSIWYG editor

I am trying to get the images that are inserted into my gallery to show in the actual order that they are showing in the WYSIWYG editor. My code looks like this: <?php $args = array( ...
0
votes
0answers
185 views

Wordpress list child pages of custom post type

Im stuck on this and any help would be appreciated. Say there is a parent page called "Stuff". And Stuff has several pages under it. Stuff more stuff more stuff1 more stuff2 It has no children ...
0
votes
0answers
235 views

Check if post has image

I'm displaying a list of posts and I want to indicate if the posts have images. I'm using this code to check if a post has an image. <?php $attachments = get_children(array( '...
0
votes
1answer
278 views

Drop-Down Menu of Current Child Pages

I would like to display the child pages of the current page in a select menu, I.E. => <select><option>This is a child page</option><option>This is another child page</...
0
votes
1answer
3k views

get_term_children for immediate children only (not grandchildren)

I want to display term children of a custom taxonomy. Currently, I am able to do this using get_term_children, but using this, it displays children and grandchildren, I want to avoid this and make ...
1
vote
1answer
343 views

Wordpress count child posts of each parent custom post type and use in json array for google maps jquery plugin

So i have been looking for a couple of days now and cant find a solution to this anywhere. It is a fairly bespoke request from a client... I am using a jQuery google maps plugin to add markers for ...
2
votes
1answer
583 views

Custom Taxonomy: Parent still counting deleted Child

I have this weird situation when I deleted two child taxonomies but they still seem to be assigned to their parent. I need a overview site for all our products with the taxonomy title ahead. If ...
0
votes
3answers
6k views

WooCommerce - Display product child categories from specific parent

I want to edit the following piece of code: <?php if ( (!$theretailer_theme_options['category_listing']) || ($theretailer_theme_options['category_listing'] == 0) ) { ?> <!-- Show ...
1
vote
1answer
1k views

Display post taxonomies tree

I was able to get all the items of a custom taxonomy for a post, like this: $args=array('orderby'=>'parent',"fields" => "all"); $term_list = wp_get_post_terms($post->ID, 'tvr_amenity', $args)...
1
vote
1answer
2k views

How to order get_term_children output by alphabetic order

The following creates drop-down lists of my custom taxonomy children, but the order of the output seems to by creation date, not by alphabetical name. I tried adding orderby to the array with no ...
0
votes
2answers
138 views

Page to output sub-pages (children)

I want to output all sub-pages of a particular page in a neat ul li list. Including: featured image, title, and first 50 characters of page content. I'm very new to Wordpress, I've tried reading ...
-1
votes
2answers
2k views

get_children - wp_get_attachment_image

I explain my problem: I create a post with an image get_children - wp_get_attachment_image functions returns that image I delete post image and add a different one get_children - ...
0
votes
1answer
319 views

How to attach images that I “insert from url” into the post?

I'm trying to get the list of images in my post, to display them in the front page... the problem is that when I add a new picture from a URL, it doesn't seem to attach it. $images =& ...
0
votes
2answers
2k views

get_page_children() return only titles

I'm using the following code to get a list of all the pages that are children of my project page and display them in a Recent Projects section of my template's footer element. I've noticed that the ...
7
votes
3answers
13k views

Check if Current Category has Children

I need to tell whether or not the current custom taxonomy archive page I'm viewing has child categories. I've got a situation where there are a lot of custom categories with children and the site is ...
1
vote
1answer
260 views

Make Images appear in the same order as in media browser using get children?

I would really like my images to display in the same way I've ordered them in the media browser. What am I doing wrong? $images =& get_children( array('post_parent' => $post->ID, ...
0
votes
1answer
3k views

Sort get_children by menu_order

I'm using the jQuery Carousel Gallery and unfortunately it's not working with WP's new v3.5 gallery ordering. When the client drags to rearrange images, those changes are not reflected in the front-...
-1
votes
1answer
1k views

get_category_children/ the new get_term_children not work

I have a custom Walker for a Advanced Search, that outputs the categories for multiple search by categories in checkbox. The Problem here is, that i use the get_category_children for the children ...
0
votes
1answer
2k views

get_children() returns ALL attachments instead only those attached to 'post_parent'

I want to pull four random images from the current post's attachments to display as "featured images". Therefor I am using the following function: function fs_gallery_featured_thumbs( $post_id ) { ...
6
votes
3answers
12k views

Get first image in a post

I am using this code directly from the codex. function echo_first_image ($postID) { $args = array( 'numberposts' => 1, 'order'=> 'ASC', 'post_mime_type' =>...
0
votes
1answer
184 views

List direct children of page

I am currently using the following function to list the children of a page, however the function recursively finds children of the children and I only want to list the direct children of $post->...
0
votes
2answers
511 views

filter get_children to return all mime types EXCEPT 'x'

Like it says on the tin - Im trying to create a list of post attachments that includes everything except say audio, which I'll feed into a player instead. The filter needs to be generic: 'audio' ...
2
votes
1answer
591 views

How can I paginate image attachments in a post?

I have a post with attached images and I was able to display the images but I'm can't seem to find a way to paginate the results. I am using get_children but now I'm wondering if my method of ...
0
votes
1answer
675 views

Get Child Custom Post Content on Single.php?

I have a custom post type, with children 2 rows deep... Outfit 1 Inner Child 1 Child 1 Child 1 Child 1 Outfit 2 Inner Child 1 Child 1 Child 1 ...
0
votes
1answer
797 views

get_page_children arguments - page objects?

From the Codex, I'm using this function to return all children from a page ID without using SQL queries. Usage: <?php get_page_children( $page_id, $pages ) ?> $page is defined as a "List of ...
3
votes
3answers
6k views

get_children() Not Working with orderby Parameter

I am trying to use the orderby parameter in the get_children function as below: $navigation = get_children(array( 'post_parent' => $parent->ID, 'orderby' => 'menu_order' )); But it is ...