Tag Info

New answers tagged

0

try get_pages with 'child_of' => get_the_ID(), 'parent' => get_the_ID(), If you need i can post full code EDIT : if ( is_singular('post') ) { $args = array( 'post_type' => 'attachment', 'posts_per_page' => -1, 'post_status' => null, 'parent' => $post->ID , 'child_of' => $post->ID, ...


-1

This is the filter I'm using: function em_wpml_dbem_taxonomy_category_slug($option){ $lang = get_bloginfo('language'); if( $lang === 'es-ES' ){ $option = 'eventos/categorias'; } else { $option = 'events/categories'; } return $option; } add_filter('pre_option_dbem_taxonomy_category_slug', 'em_wpml_dbem_taxonomy_category_slug');


0

Not sure what exactly you want. Can you please elaborate your question a bit more? If you want URLs like www.mysite.com/subfolder/postname (where the subfolder is where your WordPress install is), then just go to Settings > Permalinks and change it to Post Name. EDIT If your WordPress install is in subfolder and you want URLs like ...


1

The WP function get_attached_media() should provide the info you need. If used in this way... $media = get_attached_media( 'image' ); ... the $media var should contain the wp_post objects for all attached images. Function documentation in the WP Codex: https://codex.wordpress.org/Function_Reference/get_attached_media


0

Simply you need to replace the_field('video') with get_field('video'). Why? Because according to ACF documentation; get_field($field_name, $post_id, $format_value) Returns the value of the specified field. Whereas on the other hand the_field($field_name, $post_id) Displays the value of the specified field. (this is the same as “echo ...


0

This can get a bit demanding to get it right so this following snippet should provide the basic upon which you can research and build a more complete solution: add_action( 'template_redirect', function() { if ( is_category() ) { $term = get_queried_object(); if ( isset( $term->parent ) && $term->parent ) { ...


1

You can set the rewrite slug when you register your post type: $args = array( 'rewrite' => array( 'slug' => 'media/lajmet' ) // other args... );


0

You can do it, but it's not straightforward. When you register a custom post type in WordPress, the first argument of register_post_type is the slug that you use. This slug can only be for one URL segment. If you changed it to media then all of your articles would take the form /media/article-slug-here. If you want to nest it deeper, you will have to ...


0

You can add this in your functions.php: global $wp_rewrite; $wp_rewrite->author_base = "member"; // or whatever $wp_rewrite->flush_rules();



Top 50 recent answers are included