-
Notifications
You must be signed in to change notification settings - Fork 17
/
readme.txt
329 lines (260 loc) · 9.16 KB
/
readme.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
=== Column Shortcodes ===
Contributors: codepress, tschutter, davidmosterd, dungengronovius
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=ZDZRSYLQ4Z76J
Tags: columns, column, shortcodes, shortcode, divider, layout, posts, editor, wp-admin, admin, codepress, wordpress
Requires at least: 4.8
Tested up to: 6.0.2
Stable tag: 1.0.1
Adds shortcodes to easily create columns in your posts or pages.
== Description ==
Adds shortcodes to easily create columns in your posts or pages.
Sometimes you just need to divide your page into different columns. With this plugin you just select a column shortcode and it will add the column to the page. You can also change the padding of each individual column from the UI.
There are 10 different column widths available from which you can make all combinations:
* full width (1/1)
* half (1/2)
* one third (1/3)
* two third (2/3)
* one fourth (1/4)
* three fourth (3/4)
* one fifth (1/5)
* two fifth (2/5)
* three fifth (3/5)
* four fifth (4/5)
* one sixth (1/6)
* five sixth (5/6)
A preset stylesheet is included, which you can also overwrite to you liking in your theme's stylesheet.
**Related Links:**
* http://www.codepresshq.com/
== Installation ==
1. Upload column-shortcodes to the /wp-content/plugins/ directory
2. Activate Column Shortcodes through the 'Plugins' menu in WordPress
3. A shortcode icon is added to the top of the WYSIWYG editor.
4. Click the added icon and it will open a popup window from which you can pick your column shortcode.
== Frequently Asked Questions ==
= How do I add a column shortcode? =
**Standard**
The easiest way is to use the added icon on the top of your editor ( right next to the media icon ). This will open a popup window from which you can select a column icon by clicking on one of the shortcodes.
**Manual**
You could also type in the shortcode yourself inside the editor. The following shortcodes are available:
`
[full_width][/full_width]
[one_half][/one_half]
[one_half_last][/one_half_last]
[one_third][/one_third]
[one_third_last][/one_third_last]
[two_third][/two_third]
[two_third_last][/two_third_last]
[one_fourth][/one_fourth]
[one_fourth_last][/one_fourth_last]
[three_fourth][/three_fourth]
[three_fourth_last][/three_fourth_last]
[one_fifth][/one_fifth]
[one_fifth_last][/one_fifth_last]
[two_fifth][/two_fifth]
[two_fifth_last][/two_fifth_last]
[three_fifth][/three_fifth]
[three_fifth_last][/three_fifth_last]
[four_fifth][/four_fifth]
[four_fifth_last][/four_fifth_last]
[one_sixth][/one_sixth]
[one_sixth_last][/one_sixth_last]
[five_sixth][/five_sixth]
[five_sixth_last][/five_sixth_last]
`
**Another option**
Another way to add shortcodes is to switch to HTML-view. On the top of editor you will now see all the shortcodes listed.
By default these buttons are hidden. If you'd like to use them you can add this to your theme's functions.php:
`
add_filter('add_shortcode_html_buttons', '__return_true' );
`
= Where do I add my content? =
When you have selected a shorcode it will be placed in you editor. You will see something like this:
`
[one_half][/one_half]
`
Make sure to place your content (text/images etc. ) between the two shortcodes, like so:
`
[one_half]My content goes here...[/one_half]
`
= My existing theme uses the same shortcodes, how can I solve this? =
You can prefix the shortcode by placing the following in your functions.php. Problem solved =)
`
add_filter( 'cpsh_prefix', 'set_shortcode_prefix' );
function set_shortcode_prefix() {
return 'myprefix_'; // edit this part if needed
}
`
= How can I hide the Padding Settings? =
In patch 0.6 we added padding settings (optional) to the plugin. If you would like to hide this settings menu you can place the following in your functions.php
`
add_filter( 'cpsh_hide_padding_settings', '__return_true' );
`
= How can I hide certain Column Shortcodes from the menu? =
If you would like to hide certain column from the menu; place the following in your functions.php
`
function hide_column_shortcodes( $shortcodes ) {
/* uncomment ( remove the '//' ) any of the following to remove it's shortcode from menu */
// unset( $shortcodes['full_width'] );
// unset( $shortcodes['one_half'] );
// unset( $shortcodes['one_third'] );
// unset( $shortcodes['one_fourth'] );
// unset( $shortcodes['two_third'] );
// unset( $shortcodes['three_fourth'] );
// unset( $shortcodes['one_fifth'] );
// unset( $shortcodes['two_fifth'] );
// unset( $shortcodes['three_fifth'] );
// unset( $shortcodes['four_fifth'] );
// unset( $shortcodes['one_sixth'] );
// unset( $shortcodes['five_sixth'] );
return $shortcodes;
}
add_filter( 'cpsh_column_shortcodes', 'hide_column_shortcodes' );
`
= How can I replace the default Shortcode CSS stylesheet? =
You can easily overwrite the existing stylesheet. For example you would like to add a margin between your columns, you just place the following in your theme's style.css:
`
.one_half {
width: 49% !important;
margin-right: 2% !important;
}
.one_half.last_column {
width: 49% !important;
margin-right: 0px !important;
}
.one_third {
width: 32% !important;
margin-right: 2% !important;
}
.one_third.last_column {
width: 32% !important;
margin-right: 0px !important;
}
.two_third {
width: 66% !important;
margin-right: 2% !important;
}
.two_third.last_column {
width: 66% !important;
margin-right: 0px !important;
}
.one_fourth {
width: 23.5% !important;
margin-right: 2% !important;
}
.one_fourth.last_column {
width: 23.5% !important;
margin-right: 0px !important;
}
.three_fourth {
width: 74.5% !important;
margin-right: 2% !important;
}
.three_fourth.last_column {
width: 74.5% !important;
margin-right: 0px !important;
}
.one_fifth {
width: 18.4% !important;
margin-right: 2% !important;
}
.one_fifth.last_column {
width: 18.4% !important;
margin-right: 0px !important;
}
.two_fifth {
width: 39% !important;
margin-right: 2% !important;
}
.two_fifth.last_column {
width: 39% !important;
margin-right: 0px !important;
}
.three_fifth {
width: 59% !important;
margin-right: 2% !important;
}
.three_fifth.last_column {
width: 59% !important;
margin-right: 0px !important;
}
.four_fifth {
width: 79.6% !important;
margin-right: 2% !important;
}
.four_fifth.last_column {
width: 79.6% !important;
margin-right: 0px !important;
}
.one_sixth {
width: 15% !important;
margin-right: 2% !important;
}
.one_sixth.last_column {
width: 15% !important;
margin-right: 0px !important;
}
`
= How can I prevent the loading of the frontend styling =
If you would like to prevent the loading of the column styling on the frontend; place the following in your functions.php
`
add_filter( 'cpsh_load_styles', '__return_false' );
`
= Will you be adding more shortcodes? =
We would love to hear your feedback and suggestions on this. Just send an email to <a href="mailto:[email protected]">[email protected]</a>.
= How can I contribute a translation? =
You will find a .po file in the languages folder which you can use. You can send the translation to <a href="mailto:[email protected]">[email protected]</a>.
== Screenshots ==
1. Editor with shortcode icon
2. Shortcode popup with shortcode selector
3. Editor with shortcodes
4. Example post with the use of column shortcodes
== Changelog ==
= 1.0.1 =
* [Fixed] Hotfix for WordPress 5.5
= 1.0 =
* [Fixed] Compatible with WordPress 4.8 and up
* [Fixed] Padding generator will automatically add 'px' to numbers
* [Added] Added filter to hide banner `add_filter( 'cpsh_show_banner', '__return_false' );`
* [Improved] UI improvements for better readability
= 0.6.9 =
* [Fixed] Rollback of the auto paragraphs. Too much conflicts with other shortcodes
= 0.6.8 =
* [Fixed] use wpautop() to wrap content in paragraphs when needed
= 0.6.7 =
* [Fixed] Paragraphs are added to the columns
= 0.6.6 =
* [Fixed] Swapped images for 5/6 columns
= 0.6.5 =
* added filter to prevent loading of frontend styles: `add_filter( 'cpsh_load_styles', '__return_false' );`
* added 5/6 column;
= 0.6.4 =
* updated icon for WP3.8
= 0.6.3 =
* updated languages
= 0.6.2 =
* added Italian language ( thanks to Nicola )
* added Czech language and bug fix ( thanks to Michal Ratajsky )
= 0.6.1 =
* fixed jquery.cookie.js issue where in some cases the server would reject it
* added filter for hiding certain column shortcodes from view.
= 0.6 =
* added Danish translation ( thanks to Mads Rosendahl )
* added full width column
* updated css template for margins ( thanks to intheshallow )
* added responsive CSS for devices with a max-width viewport of 600pixels
= 0.5 =
* added the option to add paddings to the columns from the shortcode UI.
= 0.4 =
* added improvements made for inclusion on WordPress.com VIP ( thanks to danielbachhuber )
* added WordPress coding conventions ( see http://codex.wordpress.org/WordPress_Coding_Standards )
* added fix for script and style loading
= 0.3 =
* added RTL support and Hebrew language ( thanks to Rami Yushuvaey )
* added Slovak translation ( thanks to Branco from WebHostingGeeks )
* added column 4/5
= 0.2 =
* added french and spanish language ( thanks to Mikel Aralar )
* improved script loading
* shortcodes HTML-view buttons hidden by default. Enable them by adding this to your functions.php: `add_filter('add_shortcode_html_buttons', '__return_true' );`
= 0.1 =
* Initial release.