Questions tagged [formatting]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
23 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 ...
  • 1
0 votes
0 answers
15 views

Snippet to Format Elementor Text Box Throws Error

I am trying to add a snippet to a WordPress site running Elementor with the Code Snippets plugin. The goal is to add an underline to any hyperlinked text in an Elementor Text Editor widget (which ...
  • 1
0 votes
0 answers
10 views

Formatting issues within Divi theme

I have worked on this website for as many years as it has been live, and have edited and relayed out sections of it without ever an issue. Until last year. The site is built on Divi theme. The site ...
0 votes
3 answers
55 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 ...
  • 308
1 vote
0 answers
718 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 ...
  • 199
0 votes
1 answer
75 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');&...
2 votes
1 answer
461 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 #...
0 votes
1 answer
519 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 ...
1 vote
1 answer
106 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 ...
  • 13
0 votes
2 answers
36 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 ...
0 votes
1 answer
727 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 ...
  • 3
0 votes
0 answers
39 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 ...
0 votes
1 answer
409 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 ...
1 vote
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 + ...
1 vote
0 answers
105 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 ...
  • 19
1 vote
0 answers
95 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 ...
  • 11
1 vote
1 answer
149 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. ...
  • 2,024
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 ...
  • 11
0 votes
2 answers
468 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: ...
  • 17
0 votes
1 answer
122 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 ...
  • 25
3 votes
0 answers
373 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....
0 votes
1 answer
32 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 ...
0 votes
1 answer
46 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 ...
1 vote
0 answers
251 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 ...
  • 23
1 vote
0 answers
16 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 ...
  • 111
0 votes
0 answers
463 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 ...
-1 votes
1 answer
41 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 ...
  • 69
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 ...
  • 315
0 votes
1 answer
89 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 ...
  • 101
5 votes
4 answers
13k 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 ...
3 votes
2 answers
5k 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( ...
1 vote
0 answers
54 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-...
0 votes
0 answers
47 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 ...
  • 505
0 votes
1 answer
23 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 ...
  • 23
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-...
0 votes
1 answer
241 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 ...
  • 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 ...
2 votes
1 answer
91 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 ...
  • 57
0 votes
0 answers
277 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 ...
-3 votes
1 answer
175 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
0 votes
1 answer
43 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 ...
3 votes
1 answer
621 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: ...
  • 173
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(); ...
1 vote
3 answers
333 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 ...
  • 145
-2 votes
2 answers
1k 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 ...
-1 votes
1 answer
376 views

Decimal stripped from metabox number

I am working on a Wordpress website for a client to show several property listings and their associated prices. When I enter the number in the metabox created by the developer it strips out all ...
-2 votes
2 answers
429 views

Date is showing in unreadable format. How to convert to readable date?

I am using the following code to show the expiration date of my coupon; <?php _e('Expiration Date:','wpestate'); echo esc_html($expiration_date); ?> But, it is showing in following ...
0 votes
1 answer
403 views

Paste from word not preserving formatting

When I paste from word, it adding a lot of extra spacing around each block of text. If I look in html editor, it's putting a <strong> </strong> in between each block of text, which makes ...
  • 109
5 votes
2 answers
2k views

Problem in wordpress with "-"

I have problem in Wordpress after migrating my website. In title tag (<title>) I have "&#8211;" instead of "-" For the browser it's good, in the title it shows good. But in html code is "&...
0 votes
0 answers
27 views

Post formatting bug in WordPress

I have a Math counterexamples blog. One post contains the string <strong>We now prove that</strong> \begin{align*} However, when that post is displayed without the "Continue reading" ...