Next Post Link in format
Next Post Link in format
Next Post Link in format
so I took a look at your updated code, and it looks like where you’re writing: $audio_url = get_post_meta($post->ID, ‘$key’, true); //this is getting your custom field url You forgot to replace ‘$key’ with the actual string name of the meta you’re looking for, which judging from your functions, is called ‘link’. So I edited … Read more
I believe that you’re asking about post format and not post type. Assuming that’s correct, you’ll probably be using WP_Query to query all posts of the post format “Standard.” However, as noted in this trac ticket, there’s strangely no way to query for the standard post format. Instead you need to query for all posts … Read more
CPT unsaved draft gives error 404 – when Post Formats support enabled
The problem you are having here is that standard is not a post format. standard is just assigned to posts that does not have a post format assigned to it. You can also check in your db in wp_terms, there is no post-format-standard term. You can also do the following to print out a list … Read more
Reading the codex on get_template_part and get_post_format will help you a lot here. It’s hard to say for sure without knowing what files are in your theme but get_template_part( ‘content’, get_post_format() ); is essentially saying use the template named content-format.php, where format is one of image, video, gallery etc. One of a few things is … Read more
Ok, your theme is already set up to use different post formats, so in your case you would just need to do the following: Change the line in content-aside.php that reads the_content(‘Weiterlesen’); To read the_excerpt(); Change just that one line, save your changes, and it should work how you want. the_content() echos the post content … Read more
It is easy to make this work if your theme don’t support post formats Create a child theme add_theme_support for post formats Remove the loop from your template files and add replace it with get_template_part( ‘content’, get_post_format() );. Your template should look like this if ( have_posts() ) { // <- Not necessary in single.php … Read more
If you are developing your own theme (as you have indicated in your question), depending on the level of coding you want to get into, you are probably better off using one. Having said that it is certainly possible to do so without them, but this is what you’re going to have to look at: … Read more
Why is my custom post type shown in the wrong place?