Show shortcode in a post
Shortcode is a markup language used by WordPress which is used to embed dynamically generated content, often from plugins, into your posts. Shortcode is denoted by being wrapped in square brackets, [ and ].
To show shortcode in a post, you need to escape the square brackets by doubling them, [[ and ]].
(The square brackets in this comment are shown as is, I think because they’re surrounded by spaces instead of actual code.)
Creating and Adding to an Image Gallery
To create an image gallery:
- go to Pages > Add New.
- click Add Media.
- click Create Gallery (on the left column).
- shift-click the images to add
- and click the “Create a new gallery” button.
- Add captions if you like.
- click Insert Gallery.
This will take you back to the Add New Page page and you’ll see inserted shortcode like this:
[gallery type="rectangular" ids="70,77,90"]
- click Publish.
To add an image to an existing gallery:
- go to Media
- click on the image you want to add. (This will open the Attachment Details page.)
- Look at the URL and note the item number.
The URL will look like this:
http://blog.stephenfranklin.info/wp-admin/upload.php?item=120
- close the Attachment Details page and go to Pages > All Pages.
- click on your page title to open the Edit Page page.
- insert the item number into the shortcode
ids
tag. Like this:
[gallery type="rectangular" ids="120,70,77,90"]
increasing the media file upload limit
I’m running WordPress 4.0 on Ubuntu 14.04 on an EC2.
I see this is a common issue, but I’ve been unable to change the file upload limit from 8MB to anything.
I’ve tried these suggestions:
- Change the max upload line in your php.ini file
(/etc/php5/apache2/php.ini
and/or/etc/php5/cli/php.ini
)
memory_limit = 128M
upload_max_filesize = 128M
post_max_size = 128M
file_uploads = On
I’ve tried smaller integers also.
- Create the
PHP.ini
file in thewp-admin
directory. -
Open or create the
.htaccess
file in the root folder and add the following code:
php_value upload_max_filesize 128M
php_value post_max_size 128M
php_value max_execution_time 300
php_value max_input_time 300
- Add the following code in the theme function’s file:
@ini_set( 'upload_max_size' , '128M' );
@ini_set( 'post_max_size', '128M');
@ini_set( 'max_execution_time', '300' );
- Copy the
php.ini
file inwp-admin
tophp5.ini
.
At every try I’ve reloaded apache2 and I’ve even rebooted the machine. Everything is up to date. I’ve disabled all my plugins, and tried different themes. I’ve even re-installed wordpress. I’m really stumped. Any more suggestions?
This stackoverflow suggestion to make a plugin worked:
increase max upload limit in wordpress
Create a file called increase-upload-limit.php
in wp-content/plugins/increase-upload-limit/
and write this:
<?php
/* Plugin Name: Increase Upload Limit */
add_filter( 'upload_size_limit', 'b5f_increase_upload' );
function b5f_increase_upload( $bytes )
{
//return 33554432; // 32 mebiBytes
return 134217728; // 128 mebiBytes
}
Then go to wp-admin and activate it.
Note that the PHP file doesn’t have the closing angle bracket. That’s how it works in WordPress for some reason. I’ll have to find out why eventually.
Virtually hosting images from S3
The CNAME DNS record should alias your domain name to the appropriate virtual hosted–style host name. For example, if your bucket name and domain name are images.johnsmith.net, the CNAME record should alias to images.johnsmith.net.s3.amazonaws.com.
The URL of my S3 hosted images looked like this:
“http://photos-crane.s3.amazonaws.com/wp-content/uploads/2014/09/DSC_0232.jpg”
- Go to the AWS Route53 dashboard, and click on Hosted Zones, and select your chosen hosted zone, and click “Go To Record Sets.”
- Click “Create Record Set”:
a. NAME: photos-crane (your bucket name)
a. TYPE: CNAME
a. VALUE: photos-crane.stephenfranklin.info.s3.amazonaws.com
a. Click “CREATE”
Here’s a photo. Click or hover over it to see it’s address:
Well that didn’t work… I’ll have to figure out later.
Just added markdown from the jetpack plugin
this is a markdown title
and a level 2 heading
here’s a level 3 heading,
and now an ordered list:
- i just write “1. stuff”
- and then “1. again”
- and it orders them numbers for me.
- actually it can be any number.
here’s a link:
hosting a photo from Amazon S3
Hosting images on s3 for wordpress:
sudo apt-get install php5-curl
sudo service apache2 restart
Install these plug-ins in wordpress:
Amazon Web Services
Amazon S3 and CloudFront
1)Create a new IAM user and grant access to the specific services which this plugin will use (e.g. S3).
Go to AWS IAM > Create New Users > “wordpress”.
Download the credentials (User Name, Access Key Id, Secret Access Key).
2) Click on the user “wordpress” > Attach User Policy:
Add AmazonS3FullAccess
3) Copy the folowing code to your wp-config.php and replace the stars with the keys.
define( ‘AWS_ACCESS_KEY_ID’, ‘********************’ );
define( ‘AWS_SECRET_ACCESS_KEY’, ‘****************************************’ );
4) In wp-admin, go to AWS > S3 and Cloudfront. Hopefully it will already have access to your S3 buckets.
Choose the S3 bucket you want to use.
Here are my settings:
unchecked: Bucket is setup for virtual hosting (more info)
checked: Set a far future HTTP expiration header for uploaded files (recommended)
CloudFront Settings: not used.
checked: Copy files to S3 as they are uploaded to the Media Library
checked: Point file URLs to S3/CloudFront for files that have been copied to S3
checked: Remove uploaded file from local filesystem once it has been copied to S3
unchecked: Always serve files over https (SSL)*
checked: Copy any HiDPI (@2x) images to S3 (works with WP Retina 2x plugin)
And here’s an S3 hosted photo:
- The wp-admin Media menu seems not to work over https, so you get the broken image icon instead of the actual image, and they won’t upload to S3 or link to a post. But after unchecking the SSL option, uploading, and linking, the SSL option seems to have no effect on the posted images. The only difference in the html of the post is that the SSL option uses
a href=https...
instead ofhttp
.
apostille
apostille
Phone: 202-485-8000
9:00 a.m. – 12:00 p.m. and 1:00 p.m. – 3:00 p.m. EST
Monday through Friday
- The authentication fee is $8.00 per document.
- Checks should be made payable to the U.S. Department of State.
When requesting Mail Authentication Services, please be sure to include the following:
- A completed Request of Authentications Service DS-4194 form – Be sure to specify the document’s country of use in Section 4
- Documents
- Fees
- A self-addressed prepaid envelope
Mail your complete packet to the following address:
Office of Authentications
U.S. Department of State
CA/PPT/S/TO/AUT
1st Floor
1150 Passport Services PL
Dulles, VA 20189-1150
You must be logged in to post a comment.