a2d
Forum Replies Created
-
Forum: Plugins
In reply to: [Redirection] CSV Export Failing@taruckus solution worked for me
Forum: Plugins
In reply to: [Yoast SEO] Enable Yoast SEO in custom post typeBrilliant. Just the ticket to solve why the “Higher” theme from MegaThemes on Themeforest was not working with Yoast. Better support than the theme developer!
Forum: Networking WordPress
In reply to: get_template_directory_uri() issues with sub-directory theme+1
Forum: Plugins
In reply to: [WP-LESS] Exception errorI had the same error while trying to get WP-Less working with Roots theme
To fix, replace:
/wp-content/plugins/wp-less/lib/vendor/lessphp/lessc.inc.phpand/or if you’re embedding the plugin in a theme, replace e.g.:
/wp-content/themes/[your theme]/lib/wp-less/lib/vendor/lessphp/lessc.inc.phpwith the latest version from the lessphp github repo
(https://github.com/leafo/lessphp)i.e grab the raw file currently here: https://goo.gl/Ffo5W
Works. Just need to learn ‘less’ now ??
Forum: Plugins
In reply to: [Lorem Ipsum Generator] wp-lorem-ipsum-generatorWorks great. Simple. Sweet.
Seems to be a few ways to display the selected value in a template.
With a custom select field called weekday, with the label “Day” and content:
1|Monday
2|Tuesday
3|Wednesday
4|Thursday
5|Friday
6|Saturday
7|SundayThe “snippit” way:
<?php the_ept_field('weekday'); ?>
Displays e.g. Day Mondayor:
<?php echo get_ept_field('weekday'); ?>
Displays e.g. Day MondayTo just get the value so you can use your own label then you’d think you could use:
<?php echo get_ept_field('weekday',array('raw' => 'true')); ?>
or alternatively:
<?php echo get_post_meta($post->ID,'weekday',true) ?>
But both these display 1 (the value of the select option rather than the text of the option)How can you just get the text? I can remove the label e.g.
<?php echo preg_replace('/Day/','',get_ept_field('weekday'),1); ?>
But there must be an easier way?