pagemaecker
Forum Replies Created
-
Forum: Developing with WordPress
In reply to: Action: ‘wp_enqueue_scripts’ does not output the linkGreat! That points me to the direction.
Forum: Developing with WordPress
In reply to: Action: ‘wp_enqueue_scripts’ does not output the linkIt is possible to eat my cake and still have it!
In the dedicated header file of the plugin I put this code:
<link href="<?php echo plugins_url( '/css/bs-style.css' ); ?>" rel="stylesheet" />which produces this output:
<link href=”http://localhost:3000/wp/wp-content/plugins/css/bs-style.css” rel=”stylesheet”>Just what I want!
Forum: Developing with WordPress
In reply to: Action: ‘wp_enqueue_scripts’ does not output the linkThanks for your help.
My bad is that I commented out wp_head() in the header.
There is just a lot of unwanted s… in there. Is there a way to eat my cake and still have it?Forum: Developing with WordPress
In reply to: Action: ‘wp_enqueue_scripts’ does not output the linkExcellent, thanks for testing.
Where did you put the code; I put mine in the “main” file of my plugin.
And, as I said, nothing happend.Forum: Developing with WordPress
In reply to: Invoer beperken van wp_dropdown_pagesWell it took me about three days to crack this one. Yeh, I know… In my defense I can say that it’s my first WP project. I did it this way:
$exclude = get_excluded_parents(); $parents = get_posts( array( 'post_type' => 'jhk_story', 'orderby' => 'ID', 'order' => 'ASC', 'numberposts' => -1, 'exclude' => $exclude, ) ); And for the function: /* * Filters excluded parents from post_type: story_frame */ function get_excluded_parents() { // Select all posts with post_type = story_frame $childs = get_posts ( array ( 'post_type' => 'story_frame', 'orderby' => 'ID', 'order' => 'ASC', 'numberposts' => -1 ) ); $exclude = array(); foreach ( $childs as $child ) { if ( 0 < $child->post_parent ) { array_push( $exclude, $child->post_parent ); } } // foreach $child return $exclude; } // get_excluded_parents()Thanks for talking to you.
- This reply was modified 8 years ago by bcworkz. Reason: code fixed
Forum: Developing with WordPress
In reply to: Invoer beperken van wp_dropdown_pagesSomething like this maybe?
add_filter( 'get_pages', 'my-filter-function' ); function my-filter-function( $pages ) { Do your filtering here return $pages; }- This reply was modified 8 years ago by bcworkz. Reason: code fixed
Forum: Developing with WordPress
In reply to: Invoer beperken van wp_dropdown_pages@bcworkz,
That’s worth investigating!
But where in my code do I add the filter?
After: &pages=wp_dropdown_pages(…
Before: if ( !empty( …
Maybe?Forum: Developing with WordPress
In reply to: Invoer beperken van wp_dropdown_pagesDaniel,
Dank voor de reactie, maar het beperken van de depth (het aantal posts) is geen garantie dat ik de posts die ik WEL wil hebben dan ook krijg.