View Single Post
Old 04-25-2017, 08:53 AM  
just a punk
So fuckin' bored
 
just a punk's Avatar
 
Industry Role:
Join Date: Jun 2003
Posts: 32,376
Import tube videos, livecam feeds, picture galleries and anything else into WordPress

I've decided to make a dedicated educational thread about CyberSEO 7 plugin. So, here we go...

Since version 7.021, the CyberSEO plugin allows one to define HTML templates for post title, post content and post excerpt. You can use these text boxes to define the layout and contents of the posts, generated by CyberSEO. The following predefined tags are available:
  • %post_title% – post title;
  • %post_content% – post content;
  • %post_excerpt% – post excerpt;
  • %link% – a link to source;
  • %post_guid% – post GUID;
  • %media_description% – post media description (if media attachments are included);
  • %enclosure_url% – the enclosure URL (if attachment enclosure is included);
  • %custom_fields[name]% – a custom field value, where name must be replaced with the actual custom field name;
  • %custom_fields_attr[name][attr]% – a custom field attribute, where name must be replaced by the actual custom field name and attr must be replaced by the XML attribute name;
  • %media_thumbnail[n]% – a link to the media thumbnail where n is its integer index (if media attachments are included).

E.g. if you want to add some text to every post title (say "Breaking news:"), you should alter the “Post title” template like this:

Code:
Breaking news: %post_title%
Here is another example. Let’s say you are going to import a product XML feed which has the following items:

Code:
<product_name>the product name here</product_name>
<picture>the product picture URL here</picture>
<price>the product price here</price>
First of all, you have to set the necessary custom fields:

Code:
product_name->product_name
picture->picture
price->price
Now define your "Post template" like this:

Code:
<h3>%custom_fields[product_name]%</h3>
<image src="%custom_fields[picture]%" />
<p><b>Price:</b> %custom_fields[price]%</p>


That's all you have to do to import almost anything as posts, pages or any custom data type into WordPress and PHP knowledge is not needed anymore
__________________
Obey the Cowgod
just a punk is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote