Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [formatting]

The tag has no usage guidance.

0
votes
2answers
51 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 ...
0
votes
0answers
12 views

Woocommerce - adding multiple products to a post stacks them vertically not horizontally

Using Woocommerce shortcodes such as [products tag="mugs"] or [products limit="3" columns="3" best_selling="true" ] or even multiple product IDs adds products vertically in posts. I would like them to ...
3
votes
2answers
59 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
0answers
26 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
0answers
26 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 ...
0
votes
0answers
22 views

TinyMCE advanced plugin append (not replace) to 'Formats' menu from editor-style.css

I have successfully replaced the 'Formats' menu of TinyMCE advanced plugin by adding editor-styles.css. What I want is to append some styles in the 'Formats' (as neatly categorized in default), not ...
0
votes
0answers
70 views

Unable to reposition title and change font color in Twenty Sixteen theme

I am very new to Wordpress and CSS (<24hrs), so hopefully this is pretty rudimentary. I am using the Twenty Sixteen theme, and I've overlayed my title and menu bar over my header image: I would ...
0
votes
1answer
15 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 ...
0
votes
1answer
481 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
1answer
20 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 ...
0
votes
0answers
22 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
1answer
34 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 ...
0
votes
0answers
201 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
1answer
26 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
1answer
27 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 ...
1
vote
1answer
106 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: ...
0
votes
1answer
320 views

function sanitize_title() does not appear to be working

Spent quite a while trying to figure this out. 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 ...
1
vote
3answers
79 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 ...
0
votes
0answers
152 views

Outputting full html code in wp but print someting wrong

I have been trying to add advertisement code into my php codes.But problem is that it is outputting something else. $output .= '<div class="post-vertical">'; $output .= '<div class="post-...
-2
votes
2answers
319 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
1answer
139 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
2answers
75 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
2answers
137 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 ...
5
votes
2answers
330 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
0answers
22 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" ...
0
votes
1answer
67 views

Editing the formatting.php file vs functions.php file?

I'd like to format the time-ago date format from 5 min to 5m. I can edit the formatting.php file and make the edit but should I? Should I instead declare the edit in the functions.php file? From the ...
0
votes
1answer
123 views

Formatting poetry in wordpress

I am (a novice) editing a poetry blog. Poetry has weird spacing, and I can't get any combination of code to do what I need. For example, one poem needs to be single spaced, but it also needs an ...
0
votes
2answers
33 views

My custom theme text and content format

Hi I am new to Wordpress development and I have learned a lot already but I do not understand why the text and content in the pages and posts does not keep the format that the user sets in the back-...
0
votes
1answer
330 views

What's the best way to trim content from WYSIWYG editor?

I have done an excessive amount of googling and haven't found exactly what I need yet. The client uses the editor (WYSIWYG) to create posts. She adds photos, links to external photos, videos, embeds ...
1
vote
1answer
1k views

Disable TinyMCE Table formatting width/height

Hi there I want to disable automatic formatting of table/td/tr widths and heights in WordPress TinyMCE. I create the table, literally type the data in (not copying it from word or anything like that) ...
0
votes
1answer
2k views

Trim content without stripping formatting

I've tried <?php $trimmed = wp_trim_words( get_the_content(), 55, "" ); ?> <?php echo $trimmed; ?> and <?php $trimmed = wp_trim_words( the_content(), 55, "" ); ?> <?php echo $...
0
votes
2answers
224 views

How to paste source code from IDE to posts directly?

I have tried preformatted button, Paste as text button or Text tab element before pasting source code, WordPress always stripped indent tabs and broke code formatting. For example, the source code: ...
0
votes
2answers
75 views

Calling PHP Titles inside Javascript Markup

I have a video gallery, and all the titles are generated by php. They are coming from my Wordpress media library's attachment titles. The lightbox for these videos, however, is customized in ...
0
votes
1answer
78 views

WordPress get_the_content losing formatting when emailed

I'm pulling the content of a post outside of the loop to send in an email like so: $content = get_the_content(); However, when I craft the body of the email: $body = 'Hello: <br/><br/>...
-3
votes
1answer
3k views

How to add a spoiler without using shortcode-based plugins [closed]

I read it is advised not to use shortcode-based plugins, so I was wondering about an alternative elegant way to implement spoilers
4
votes
1answer
107 views

Updating to Version 4.5 bumped my “main sidebar” widget out of place

I updated to the newest version of word press and it changed my home screen. Essentially it shifted my text to the right and as a result shifted my "main sidebar" widget downward to now begin below ...
-1
votes
1answer
1k views

How to display html code normally?

I want to display my html code as it write in edited format. Here is my edited html code. It display as following after publishing it. How to make it displayed as the following?
1
vote
0answers
314 views

Visual/Text Editor displays blank pages in WP-Admin- but HTML on client side displays correctly

Theme: Hemingway, Twenty-Sixteen Host: Bluehost Browser(s): Safari, Chrome OS: OSX El Capitan 10.10.5 (14F1605) Website When I try to "Edit Page" visual editor screen is blank, in both Text and ...
0
votes
1answer
533 views

WordPress menu>Custom Link: removing my link formatting and adding %20

I am pasting this url: <a href="#" id="event_inquiryToggle">TEST</a> into WordPress Custom Link menu item. When I hit save it saves it as such: http://a%20href=#%20id=...
2
votes
1answer
52 views

Why does WP not like my <a> container?

Lately I've been working on some shortcodes where all the elements the shortcode produces are wrapped inside an tag. Unfortunately this is not rendered like wanted, because of the filter wpautop on ...
2
votes
1answer
429 views

Code Blocks with WYSIWYG in blog post

Is it possible to format code in the wysiwyg editor, up to now I use Blockquotes to represent code, but my problem is that it does automatically line breaks, and I don't want to have random line ...
1
vote
0answers
83 views

How to properly format if statement with html and php

I have an if statement that has some html and php in it. The way I have formatted it at them moment seems a bit messy: EDIT <?php $audio_source = get_field( 'audio_source' ); ...
1
vote
1answer
184 views

Selectively remove empty line after line change

In WP post editor, how can I change lines without adding an empty line? I try to post this One line Second line third line But it always shows like this One line Second line Third line PS: I ...
0
votes
0answers
19 views

How to format the various types of custom fields?

So i am ready to throw in my custom post type a bunch of custom fields. All these fields need specific handling for their input and validation. Exmaples: Numeric fields E-mails WYSIWYG editor ...
2
votes
1answer
81 views

Is there a way to disable formatting shortcuts in 4.3?

Since the WordPress 4.3 version was released there are these new things called formatting shortcuts. They can be helpful but I find them mostly annoying. Is there anyway to disable these new ...
-1
votes
1answer
493 views

Show Title/Date/Excerpt of first post & only Title for rest in Query [duplicate]

I need to show 7 posts of a certain category. The first needs to appear as Title / Date / Excerpt. While the others can just be Titles of the posts. Right now I am having trouble with getting the ...
0
votes
1answer
437 views

Formatting post content to exclude gallery

I have this code which takes the first gallery for a post's content, and formats it with more code preparing it for slideshow usage with css and js. $gallery = get_post_gallery_images( $post ); $...
0
votes
1answer
191 views

Reformat data within a nested array

I have the nested array of data below which comes from the Wordpress Formidable Pro plugin form entries database table. I would like to reformat it so I can use it in a Wordpress WP_list_table but I ...
0
votes
1answer
737 views

Theme does not respect spaces between paragraphs in pages

I am working with a theme that focuses on special types of posts. It seems that the author has neglected pages and as a result, paragraph spacing in pages is not respected. The next paragraph simply ...
-1
votes
1answer
21 views

Full Width Container Colour Problems

I wanted to duplicate a page and so I copied the code into a new page. Everything worked however one full-width container has a background colour that on the original page stretched across the whole ...