Questions tagged [formatting]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
6 views

Moving formatted data in Salesforce rich text field into Wordpress

I am new to moving Salesforce data dynamically into Wordpress. I am wondering if it is possible to retrieve data in a rich content Salesforce field and pull it into Wordpress without losing the ...
Michele Kleinhomer's user avatar
0 votes
0 answers
19 views

Convert formatted string to text

I'm trying to deal with pasted texts such as '𝐍𝐨𝐯𝐞𝐦𝐛𝐞𝐫'. I'd like to convert all the strings formatted like this to simple plain text. I've seen that pasting text without formatting doesn't ...
Enrico's user avatar
  • 11
0 votes
1 answer
50 views

How to format inline code blocks

I've just set up a new blog with the twentytwentythree theme. When I go to Appearance - Editor - Styles - Stylebook I can change the default layout of different blocks including Code Blocks. For ...
mpr's user avatar
  • 3
0 votes
0 answers
15 views

Add dollar sign to a number in filter?

I have a filter where it displays the min and max price but it does not display the dollar sign. for example Min Price - 100 Max Price - 200 I would like for it to display Min Price - $100 Max Price - ...
PAC's user avatar
  • 1
0 votes
0 answers
13 views

How could I add conditional link colour to my wordpress site that depends on the purpose of the hyperlink?

I'm using a plugin called Encyclopedia/Wiki/Glossary to automatically hyperlink all instances of words that have been defined in the glossary directory so that they will be linked anywhere they appear ...
Jayw's user avatar
  • 1
0 votes
4 answers
32 views

How to customize Date Format for American visitors?

Basically, I just want the format to be mdY if an American / US Resident is using the site, and dmY for everyone else. Right now, the only way I see I can do this is changing it via radio buttons. Is ...
QRIOS WORLD's user avatar
1 vote
0 answers
395 views

How can I add the option to format to list in RichTextToolbarButton?

I'm looking for how to add an option to RichTextToolbarButton, the goal is that when selected, the text becomes a list. I have managed to make it become a list but the entire paragraph and not just ...
Gerardo González's user avatar
0 votes
0 answers
25 views

CSS appears to not work on any WordPress theme

I am in the process of updating my website and decided to purge the old content and start from scratch. However whichever theme I use the webpage fails to load properly. It looks like something to do ...
Lee's user avatar
  • 1
0 votes
3 answers
152 views

How to add custom HTML tags in the visual mode via keyboard only?

Let say I want to insert different inline formatting texts. I can do that by opening the HTML mode, but is there a way to do it directly in the visual mode? For example, if I type span.a in a ...
Ooker's user avatar
  • 330
1 vote
0 answers
1k views

How to set up VS Code for WP plugin/theme development in 2021? [closed]

I'm trying to improve my WP theme and plugin development workflow. VS Code is my editor/IDE of choice and I'm pretty with it in general. However, setting up VS Code with debugging, formatting, linting ...
jost21's user avatar
  • 249
0 votes
1 answer
170 views

How can I change the date format of the revision list?

The date format looks like this "$ datef = _x ('F j, Y @ H: i: s', 'revision date format');" but I want it to be like this "$ datef = _x ('Y-m-d @ H: i: s', 'revision date format');&...
Juan Sebastian Usuga Agudelo's user avatar
2 votes
1 answer
677 views

Wordpress | Convert #038; to &

I need to pass a variable inside the permalink that takes me to my custom post, and then execute the $_GET of this variable inside an input of my cf7. The only problem Wordpress encodes the & in #...
user14985037's user avatar
0 votes
1 answer
787 views

How to do store, retrieve and write attributes in the registerFormatType method in Guttenberg?

I'm trying to add a format that has multiple, independent attributes to a custom <a> tag. The attributes are href= and data-caption= and data-set= while I use custom client side JavaScript to ...
pseudoCK's user avatar
1 vote
1 answer
167 views

Number format for wp_count_posts()

I'm trying to format my post my total post count in the header of my site. I have the number in there but would like it to format with the commas eg 1,500 not 1500. I know this is probably really ...
Jason's user avatar
  • 13
0 votes
2 answers
44 views

Measure time in ONLY HOUR format

I need to change the timeformat in this column to be in hours, not measured in seconds and minutes. This meaning that 30 minutes should be measured in 0.5 hours and so on. I think I need to edit this ...
Sindre Fjellestad's user avatar
1 vote
1 answer
1k views

WooCommerce product title formatting

What is the best way to format my product titles? I would like the brand of the product to be on it’s own line in a larger bolder font and then underneath the name of the products in a smaller more ...
laxus's user avatar
  • 13
0 votes
0 answers
43 views

Problems with cart and pages on _s theme

I recently took over managing this website Berman Instruments, one of our clients. They claim that it the cart was working until June. This is a 2 part problem. In this scenario, an unregistered user ...
Elyssa444's user avatar
0 votes
1 answer
584 views

Is there an easy way to remove the data-preserver-spaces span from blocks?

I converted a page from Classic to Guttenberg and now all the blocks have this span in them: <p><span data-preserver-spaces="true">...</span></p> This means that all ...
Alexis Wilke's user avatar
0 votes
1 answer
1k views

How to preserve exact formatting when copy pasting from Facebook into WordPress (or elsewhere)?

How can I copy and paste comment threads (and sometimes the original post) from Facebook into WordPress (or elsewhere) and preserve exact formatting? Screenshot? ok, but text etc is better. Both + ...
Jonathon Neville's user avatar
1 vote
0 answers
127 views

Force Balance Tags not working

I am trying to shorten my the_content() word count to 200 while retaining the html formatting as well as the shortcodes. I am pretty close but for some reason, I cannot get force balance tags or ...
gxrobb's user avatar
  • 19
1 vote
0 answers
156 views

Remove add to cart icon/view product button woocommerce

I'm trying to remove a button that appears when hovering over the images on a woocommerce shop. (See images attached) The product is a variable product. Failing being able to do this I also tried to ...
Gwell's user avatar
  • 11
1 vote
1 answer
249 views

What are the "U" and "G" time formats?

In WordPress time functions, such as get_post_time(), one can pass a couple of formats that I do not understand what they do. Those are U and G. What are those exactly? Documentation is pretty vague. ...
Greeso's user avatar
  • 2,116
0 votes
0 answers
27 views

Preparing Hardcopy and Online Page

I am writing a book and I want to post it online (into various web pages) and also want to have a hardcopy. The book has a lot of figures and math equations. How can I prepare the posts to minimize ...
David R's user avatar
  • 11
0 votes
2 answers
636 views

Mystery line break

I have a coding noob question if someone wouldn't mind taking a squiz. Trying to get the title placed on the same line as the label, i.e Label: Title Currently it's formatted as: Label: ...
MatJon's user avatar
  • 17
0 votes
1 answer
136 views

get_the_term_list( get_the_ID() label formatting?

is it possible to change the style of the "label" of the result of a get_the_term_list( get_the_ID() ? $film_tags = get_the_term_list( get_the_ID(), 'film_tags', 'Tags: ', ', ', '' ); is there a ...
Dande's user avatar
  • 25
3 votes
1 answer
456 views

Why is this gutenberg custom format button only available from the toolbar as a dropdown?

I have a very simple custom format button for Gutenberg. JS code is as follows: (function ( wp ) { // Create our button. var lqdNotesButton = function( props ) { return wp.element....
davemackey's user avatar
0 votes
1 answer
48 views

WordPress removes paragraphs. How to disable this behavior?

For example, this code: <div><p>Some text here</p></div> Becomes formatted as this: <div>Some text here</div> I think that this is MCE related behavior, because ...
Andrei Pavlenko's user avatar
0 votes
1 answer
186 views

Changing Date Format on Custom Meta Data w/shortcode call

I am currently pulling a date from a users meta and making it so I can input a shortcode and it will show that date in certain places. I have the following code written and it works great! function ...
Coleman Smith's user avatar
1 vote
0 answers
332 views

Need to add trailing slash to all internal links relative and absolute

i need to rewrite the url path of my href internal links. I got into my site relative and absolute links. ex. <a href="https://www.sitename.com/pippo" <a href="/pippo" <a href="/pippo/" I ...
Gmac's user avatar
  • 23
1 vote
0 answers
21 views

Page formatting lost when I attempt a revision

This may be a duplicate post (Lost formatting after saving), but it doesn't seem like it was properly answered... I have the most recent version of Wordpress (v 5.2.2) and just created a page (using ...
TC76's user avatar
  • 111
0 votes
0 answers
632 views

Object of class WP_Error could not be converted to string in /formatting.php

I'm working on a WordPress site with Chinese language which use WP Bakery plugin. I added woocommerce product category short code on home page to show some products from a category It works on a all ...
Suneth Kalhara's user avatar
-1 votes
1 answer
89 views

Generating a number based on post ID

I am trying to generate a number that will be 5 digits including the post ID. For example: if post ID is 25, the number will be 00025. So far my codes are below. It's working but is there any better ...
Noobie's user avatar
  • 99
0 votes
1 answer
2k views

Remove formatting in rich text with Gutenbergs Block editor

In the classic editor, an option for removing all formatting in a selected text was possible in the visual tab. Is there such a function for Gutenberg? If not, is it planned at some point? What ...
Playnary's user avatar
  • 315
0 votes
1 answer
203 views

Images that copy code to clipboard when you click on them

I run a website about a programming language which is very well-integrated with a front-end which adds a lot of styling to the code that cannot be replicated in the browser. For that reason, I publish ...
C. E.'s user avatar
  • 101
6 votes
4 answers
14k views

How to change text size of Gutenberg editor

Is there a setting in WordPress Gutenberg editor to change the font size of the text we type while writing posts? I mean the text size inside the editor itself, not the published text that blog ...
Muhammad's user avatar
3 votes
2 answers
6k views

How to get year, month and hour in Wordpress?

Here is the code which gives me only day and month. I want to show all: year, month, day, hour and minutes. How can I do this? print '<time class="entry-date updated" datetime="' . esc_attr( ...
Interessante Fakten's user avatar
1 vote
0 answers
61 views

trigger html cleanup for all posts

So i know that wordpress will auto clean / format html within posts / pages automatically when switching back and forth from text to visual: https://stackoverflow.com/questions/9907757/wordpress-...
Ninja Panda's user avatar
0 votes
0 answers
51 views

How to completely prevent WordPress from destroying/modifying my shortcode outputs?

Here I have written a (pretty safe) shortcode for embedding iFrames in WordPress: add_shortcode( 'r2o_iframe', 'r2o_display_iframe' ); function r2o_display_iframe($atts) { ob_start(); $src ...
Blackbam's user avatar
  • 535
0 votes
1 answer
24 views

Page takes on two different formats

I want to show a list generated from two tables. I have a page with a shortcode that loads the information just like I want. The shortcode runs a function called member_list. In this function, I have ...
Bud's user avatar
  • 33
1 vote
1 answer
6k views

$content = $post->post_content; with formating

I'm trying to get formating but with no luck. My code looks like this global $post; $content = $post->post_content; And to output here <div class="tribe-events-single-event-description tribe-...
BoyIsBadNews's user avatar
0 votes
1 answer
269 views

How to amend time format of comments, using child-theme?

How to amend (override) the time format of the comments (of the posts and pages), not touching the wordpress initial installation? I use a child theme and if it is possible in any way to do it from ...
Arsenii's user avatar
  • 128
0 votes
0 answers
30 views

How do I change the content of an element for a theme without losing the styling?

For example the theme I am using has a built in "coin calculator" that displays live prices for cryptocurrencies to fiat. It looks like this: When I go to edit the page the code for this is just a ...
John Murphy's user avatar
2 votes
1 answer
127 views

Get last seen date/time in wordpress get_comments() [closed]

I could get comment_date with a loop. And it shows like 2018-03-19 12:30:06. Here, I just want to get Last seen format. (For instance, 3 min ago , 1 hour ago , 1 day ago , 2 week ago ) How can I ...
Jamille's user avatar
  • 57
0 votes
0 answers
295 views

Understanding automatic text formatting in the Wordpress editor

Why does the text editor remove paragraphs and line breaks? Surely maintaining basic formatting such as paragraphs or line breaks is a basic requirement in all CMS systems. It's hard to believe that ...
Richard Tinkler's user avatar
-3 votes
1 answer
242 views

Adding padding above menu

I am not sure why but after I done some editing the menu now has no space from the type of the page. How do I create this ? http://croiativefilms.com
Sheena Faughnan's user avatar
0 votes
1 answer
52 views

Let custom text widget use the same font as the theme

On this page, I have created a text widget. I don't know how to match this up with the font on the rest of the site. The theme uses the Playfair Display font. I don't have extensive knowledge of ...
Sheena Faughnan's user avatar
3 votes
1 answer
692 views

Keep pasted pre formatted code as it is -with tabs- in visual editor

I need a manual code to my functions php to extend the visual editor from removing tabs when pasting code blocks. I tried this code, found at this site, but it does not work as I want. If I got: ...
cavameta's user avatar
  • 183
0 votes
1 answer
1k views

Function sanitize_title() does not appear to be working

I've implemented a stop-gap function that mimics what I believe this function is supposed to be doing, but I would like to use the native libs/functions where possible. <?php phpinfo(); ...
zentechinc's user avatar
1 vote
3 answers
384 views

Inconsistent behavior from number_format

I'm trying to format a number in a table cell with comma separators between thousands. The number is coming from a custom field generated in Advanced Custom Fields plugin, where it is required to be a ...
user41091's user avatar
  • 145
-2 votes
2 answers
2k views

Paste Function Broken

My paste function appears to be broken for my Wordpress site. I have tried on multiple computers, and browsers, and the results are the same: I cannot post anything, whether it be text, an image, or ...
Mark Goncharov's user avatar