Replace Dashes Before Title in Page List

You can’t change dashes using any filter because there is no filter available to change it. but still you can change this using jQuery put this code inside functions.php add_action(‘admin_head’,function(){ global $pagenow; // check current page. if( $pagenow == ‘edit.php’ ){ ?> <script> jQuery(function($){ var post_title = $(‘.wp-list-table’).find(‘a.row-title’); $.each(post_title,function(index,em){ var text = $(em).html(); // Replace … Read more

WP Page and Subdirectory with same name

You’ll need to do some .htaccess-fu to get what you’re proposing to work. RewriteCond $1 ^/labs/(.+) RewriteRule ^/labs/(.*)$ /labs-folder/$1 [L] This isn’t tested yet but it if you put it before the wordpress rules in your htaccess file it will remap urls that begin with /labs/ to /labs-folder/ but not if the url is just … Read more

Require title for pages

Start with downloading the plugin called Force Post Title. Here’s the plugin with one row (2 with the comment line) added to the bottom, based on our comments. What happens is that a small jQuery script is added to the page Create Post/Page. The script will check if the title field is empty when the … Read more

Get wp_get_attachment_url outside of loop

if the result you’re looking for is a printout of the URL, like in your example, then this should work: $page_id = get_queried_object_id(); if ( has_post_thumbnail( $page_id ) ) : $image_array = wp_get_attachment_image_src( get_post_thumbnail_id( $page_id ), ‘optional-size’ ); $image = $image_array[0]; else : $image = get_template_directory_uri() . ‘/images/default-background.jpg’; endif; echo $image;

Is there a default template file for child pages / subpages?

There is no specifica template for child pages, but you can do this pretty easily with the get_template_part() function. First create a file called “content-child.php”. Second create a file called “content.php”. Next, inside of page.php, place this: if( $post->post_parent !== 0 ) { get_template_part(‘content’, ‘child’); } else { get_template_part(‘content’); } Anything that you want displayed … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)