echo spesific title get_the_title

you can use the_title($quiz) instead of get_the_title() Put this code foreach($quiz_ids as $quiz_id){ echo ‘<th><a href=”‘.get_permalink($quiz_id).'” target=”_blank”> ‘.the_title($quiz_id).'</a></th>’; } Hope this will help you

How to store wordpress title in a variable

You’re example is totally unclear. What is ngegrab, what is $unity, $yesPage and what do you mean with “WordPress title”? Short: what are you trying to do exactly? To get the title of a post, use get_the_title() as mentioned in the other answer. To get the document title (<title></title>), use wp_get_document_title().

Title displaying multiple times

The function wp_title() is supposed to be used to generate the text for the title tag: <head> <title><?php wp_title();?></title> … </head> but to display the current post title within the loop, you should instead use the the_title() function.

Show page name in browser

Your title is being set by something in your theme or a plugin attaching to the wp_title filter. You can further filter this value or override it entirely by using the same hook and a different priority that executes later. // add a filter at priority 999 so it will presumably run last add_filter( ‘wp_title’, … Read more

Rename file after title , one small problem

Use get_the_title() since you’re already being passed a post ID. function rename_attacment( $post_ID ) { $post = get_post( $post_ID ); $file = get_attached_file( $post_ID ); $path = pathinfo( $file ); //dirname = File Path //basename = Filename.Extension //extension = Extension //filename = Filename $newfilename = get_the_title( $post_ID ); $newfile = $path[‘dirname’] . “https://wordpress.stackexchange.com/” . $newfilename … Read more

WordPress loop put title into variable

Creating variables on the fly like that is not needed. Just use an array instead. $myvars = []; inside your foreach loop you can: $myvars[] = array(‘title’=>$t,’image’=>$v); After your loop you can: //First title, First image echo $myvars[0][‘title’]; echo $myvars[0][‘image’]; //Second title, Second image echo $myvars[1][‘title’]; echo $myvars[1][‘image’]; This way you can always print_r($myvars) and … Read more

Bug with post titles [closed]

This is usually due to using custom query/loop stuff after the main query and not calling either wp_reset_postdata() or wp_reset_query() after you’re done. See this answer for more detail on which to use.

Why this Read More Not working in Php?

EDIT Based on your last concern, here how I would do this. The only problem left on your code is that you are calling some HTML inside PHP without `echo. So I split all those into seperates HTML tags and called them separatly in PHP. <?php while(have_posts()): the_post(); ?> <h2><?php the_title(); ?></h2> <figure class=”thubmnail”> <?php … Read more