Comments (14)
Afaik, no issue. I guess you simply haven't attached the proper filter. Just use
echo apply_filter( 'the_content', get_post_meta( get_the_ID(), etc. ) );
from meta-box.
Hi @jezthomp , I've just tested the <p>
tag and don't see the problems.
Here's my content in the textarea box:
I'm a WP developer and a freelancer from Vietnam. <b>This is strong</b> <i>Cool</i><p>This is a paragraph</p><p>Another paragraph</p>
And I just display it using:
<?php echo get_post_meta( get_the_ID(), '_bio', true ); ?>
from meta-box.
Guess we can close that as localized/invalid.
from meta-box.
OK, I close the issue now. @jezthomp if you still have this problem, please reopen the issue.
from meta-box.
I'm seeing this too - If I add
to paragraphs while in [text] then save - the html comes through on the front end.However when I re-open, the editor is still in [text] but the html has been converted to html hex. <p>
Viewing it in visual of course now shows my html of course.
It's as if [text] saves html, but when re-opened it converts any html to the respective HTML Entity Names. So saving it again just makes a mess.
from meta-box.
Hi,
I've tested again with wysiwyg field type and don't see the problem (same as comments above). Here is how I input text (after save post, I see same result):
And how it looks in the frontend:
from meta-box.
Edits via text to add p tags and a comment:
This is what it looks like after saving:
The visual editor now looks like html:
If I make new edits to the text editor like this and save;
It shows up on the front end like this:
Oddly enough a quick workaround is to copy the html from the WYSIWYG editor
and paste it into the Text editor and then save.
On Sun, Mar 22, 2015 at 10:45 PM, Tran Ngoc Tuan Anh <
[email protected]> wrote:
Hi,
I've tested again with wysiwyg field type and don't see the problem (same
as comments above). Here is how I input text (after save post, I see same
result):And how it looks in the frontend:
—
Reply to this email directly or view it on GitHub
#23 (comment).
from meta-box.
Can you upload images again? Looks like Github doesn't import images from email.
from meta-box.
I edited the previous message. Sorry about that.
from meta-box.
I found a stack-exchange post with a similar issue: http://wordpress.stackexchange.com/questions/94338/custom-editor-field-displaying-html-in-visual-editor
from meta-box.
Can you show me the code to register meta boxes?
from meta-box.
<?php
/**
* Registering meta sections for taxonomies
*
* All the definitions of meta sections are listed below with comments, please read them carefully.
* Note that each validation method of the Validation Class MUST return value.
*
* You also should read the changelog to know what has been changed
*
*/
/********************* BEGIN DEFINITION OF META SECTIONS ***********************/
$prefix = 'badge_'; // doesn't seem to be globally supported.
global $badge_meta_sections;
$badge_meta_sections = array();
// first meta section
$badge_meta_sections[] = array(
'title' => '', // section title
'taxonomies' => array('sr_expertise', 'sr_service'), // list of taxonomies. Default is array('category', 'post_tag'). Optional
'id' => 'first_section', // ID of each section, will be the option name
'fields' => array( // list of meta fields
// TEXT AREA
array(
'name' => 'Extended Description',
'desc' => '<span class="description">Extended description.</span>',
'id' => 'badge_verbose',
'type' => 'wysiwyg',
'std' => ''
),
// RADIO BUTTONS
array(
'name' => 'Select a hover color',
'id' => "badge_hover_color1",
'type' => 'radio',
// Array of 'value' => 'Label' pairs for radio options.
// Note: the 'value' is stored in meta field, not the 'Label'
'options' => array(
'#1d2e5b' => '<span class="sr_Water ">Water </span><br>',
'#634379' => '<span class="purple ">Purple </span><br>',
'#445b6a' => '<span class="sr_Sea ">Sea </span><br>',
'#7895a4' => '<span class="sr_Wind ">Wind </span><br>',
'#5A6527' => '<span class="green ">Green </span><br>',
'#818154' => '<span class="sr_Moss ">Moss </span><br>',
'#8b6b29' => '<span class="sr_Nut_Brown">Nut Brown </span><br>',
'#ba8747' => '<span class="sr_Grain ">Grain </span><br>',
'#FCC53F' => '<span class="yellow ">Yellow </span><br>',
'#e28025' => '<span class="sr_Golden ">Golden </span><br>',
'#ad1015' => '<span class="sr_Fire ">Fire </span><br>',
'#90352d' => '<span class="sr_Brick ">Brick </span><br>',
'#632d00' => '<span class="sr_Earth ">Earth </span><br>',
'#473f38' => '<span class="sr_Warm_Gray ">Warm Gray </span><br>',
'#000000' => '<span class="sr_Black ">Black </span><br>'
),
)
)
);
/**
* Register meta boxes
*
* @return void
*/
function YOUR_PREFIX_register_taxonomy_meta_boxes()
{
// Make sure there's no errors when the plugin is deactivated or during upgrade
if ( !class_exists( 'RW_Taxonomy_Meta' ) )
return;
global $badge_meta_sections;
foreach ( $badge_meta_sections as $meta_section )
{
new RW_Taxonomy_Meta( $meta_section );
}
}
// Hook to 'admin_init' to make sure the class is loaded before
// (in case using the class in another plugin)
add_action( 'admin_init', 'YOUR_PREFIX_register_taxonomy_meta_boxes' );
/********************* END DEFINITION OF META SECTIONS ***********************/
/********************* BEGIN VALIDATION ***********************/
/**
* Validation class
* Define ALL validation methods inside this class
* Use the names of these methods in the definition of meta boxes (key 'validate_func' of each field)
*/
class RW_Taxonomy_Meta_Validate {
function check_name($text) {
if ($text == 'Anh Tran') {
return 'He is Rilwis';
}
return $text;
}
}
/********************* END VALIDATION ***********************/
?>
'''
from meta-box.
Oh, this is another plugin Taxonomy Meta. I will fix it later in this repo.
from meta-box.
Oh geez. Sorry Tran. I forgot these were separate.
I've got both installed inside a custom theme.
Shall I repost on the TM repo?
from meta-box.
Related Issues (20)
- How to Display MB Views Shortcodes Content after Product Description HOT 1
- Placeholder for "Select an user" HOT 1
- not published
- Geolocation + OSM
- Zion Builder Support HOT 1
- Custom Fields Group - rwmb_meta for single image no returning array HOT 1
- Contact form at metabox.io/contact is returning an error HOT 1
- Translation not showing HOT 2
- Undefined array key HOT 2
- Latest version Meta Box (5.6.9) kills MB Custom Table
- URGENT: Latest version Meta Box (5.6.10) kills MB User Meta and related plugins HOT 2
- Uncaught Error: Class 'RWMB_Update_Option' not found when adding new post type HOT 1
- Master branch here on GitHub is not current with version on Wordpress Repo HOT 2
- Switch labels are off HOT 2
- Usage of Select Advanced for taxonomies in admin HOT 1
- Require image orientation on image_advanced field upload HOT 1
- subtitle custom field HOT 2
- Media Library Never Loads HOT 3
- Fatal Error in Taxonomy Field on Frontend Form Following MB Update to Version 5.7.2
- Meta Box interferes with my website's Logo when activated HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from meta-box.