How to redirect image attachment to its original post
You want the permalink for the attachment’s parent post, so, if I am guessing correctly about the contents of $attachment $parent_url = get_permalink($attachment->post_parent);
You want the permalink for the attachment’s parent post, so, if I am guessing correctly about the contents of $attachment $parent_url = get_permalink($attachment->post_parent);
Using the very example from the Codex in the Settings API section. Put it in the theme’s functions.php: add_action(‘admin_init’, ‘eg_settings_api_init’); function eg_settings_api_init() { add_settings_section( ‘eg_setting_section’, ‘Example settings section in reading’, ‘eg_setting_section_callback_function’, ‘reading’ ); add_settings_field( ‘eg_setting_name’, ‘Example setting Name’, ‘eg_setting_callback_function’, ‘reading’, ‘eg_setting_section’ ); register_setting(‘reading’,’eg_setting_name’); } function eg_setting_section_callback_function() { echo ‘<p>Intro text for our settings section</p>’; } … Read more
I’m not sure that I completely understand your question, but if you’re just looking for an array of movies that are of the type distributie, based on the ID of the current Loop object, this will do it: $args = array( ‘post_type’ => ‘movies’, ‘meta_key’ => ‘distributie’, ‘meta_value’ => get_the_ID() ) $get_distributie_movies = get_posts( $args … Read more
Dublicate question. But I think my question + link will help some ppl out. How to add category to: ‘wp-admin/post-new.php’?
Using wp_list_categories http://codex.wordpress.org/Template_Tags/wp_list_categories Something like this should give you what you want $args = array( ‘hierarchical’ => true, ‘hide_empty’ => 0, ‘title_li’ => ” ); wp_list_categories($args);
It sounds like you want to hook into pre_get_posts for the blog index. The following should only effect the blog index. That is what is_home() is for. Of course, you can edit the function to alter that behavior if you want. function add_post_type_to_index_wpse_88317($qry) { if (is_home()) { $qry->set(‘post_type’,array(‘post’,’movies_cp’)); // plus any others you want. } … Read more
Without seeing the code that gets the actual content of the boxes it’s impossible to know for sure. But I guess your problem is that the theme code sorts the posts by modified_date. If you find the line in the code (most likely it will contain get_posts() or WP_Query) you just have to remove the … Read more
The best place to get started is the Codex. Search for my question codex and you’ll probably get the info. Or simply function_name, and follow the link that leads there. And, surely enough, searching here at WPSE or at SO. I only used the automated install once, but it updated WP on its own and … Read more
like @Mayeennul said you have your templates mixed up. Generally speaking the home page contains a list of excerpts the_excerpt() with links to individual blog posts that are displayed using single.php. If you want a single blog post as your home page you could copy single.php and rename it to index.php or front-page.php.
Try using the_modified_date() or the_modified_time(), which should display the last updated date.