Change Genesis Tag from Page Template [closed]
Try add_filter(‘wp_title’, ‘my_custom_title’); function my_custom_title($title) { return ‘My Custom Title’; } Check genesis/lib/structure/header.php to see how Genesis does it.
Try add_filter(‘wp_title’, ‘my_custom_title’); function my_custom_title($title) { return ‘My Custom Title’; } Check genesis/lib/structure/header.php to see how Genesis does it.
As you have noticed already, $this will not work as you expected prior to PHP 5.4. You can read this in the PHP wiki. The reason: For PHP 5.3 $this support for Closures was removed because no consensus could be reached how to implement it in a sane fashion. This RFC describes the possible roads … Read more
It’s hard to know if a link leads to an empty page without querying the database for each link in your menu first. That would certainly slow down your page loads. You could try the following method though. Add some text to the link, like “(empty)”. Use Javascript/jQuery to look for parent links. Check if … Read more
After changing FTP_BASE in my wp-config i found the update function of WP broken. Then i realize the update function work the same way and don’t need any additional settings. In wp-admin/includes/update-core.php i found the usage of $wp_filesystem->wp_content_dir(). This solves my problem too. On http://xref.wordpress.org/branches/3.8/WordPress/Filesystem/WP_Filesystem_Base.html you will find a list of possible useful functions: string … Read more
I had forgotten to define the location of wp-content in my wp-config.php : define( ‘WP_CONTENT_DIR’, dirname(__FILE__) . ‘/wp-content’ ); define( ‘WP_CONTENT_URL’, ‘http://’.$_SERVER[‘SERVER_NAME’].’/wp-content’ ); define( ‘WP_PLUGIN_DIR’, dirname(__FILE__) . ‘/wp-content/plugins’ );
By default WordPress organizes the comment pages from oldest to newest. This does not change, even if the Settings-Discussion options have been modified. This is the sticking point, one might suspect changing these settings to reorganize the comment pages, it doesn’t. These settings, basically, define comment order in the default comment loop, and what page … Read more
This depends on your business model. If your theme is free (or freemium, meaning people can download for free but unlock features when they pay you), you should post it into the wordpress.org repository. There’s a whole lot of rules you must stick to, which you can read about here. The upside of being in … Read more
This code https://github.com/chriscoyier/css-tricks-functionality-plugin does exactly what you’ve described with regard to classes. Although the associated article https://css-tricks.com/wordpress-functionality-plugins/ is about removing non-theme specific functionality out of functions.php to a separate plugin it will give you an insight into the code. HOWEVER: PHP includes do have a performance overhead. I have also read (older versions of PHP) … Read more
flex-width stands for flexible width and flex-height stands for flexible height <?php // Previous function code here $args = array( ‘default-image’ => get_template_directory_uri() . ‘/assets/images/default-image.jpg’, ‘default-text-color’ => ‘000’, ‘width’ => 1140, ‘height’ => 250, ‘flex-width’ => false, // Now width are fixed to 1140 px ‘flex-height’ => true, // Height is adjustable ); // Later … Read more
When generating the width and height attributes for an image with functions like the_post_thumbnail() or wp_get_attachment_image() the images are put through the image_downsize() function. The last thing this function does is run the image through the image_constrain_size_for_editor() function. This function decides the width and height of the image based on the given size, large in … Read more