top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What is RSS? How to use RSS in wordpress?

0 votes
406 views
What is RSS? How to use RSS in wordpress?
posted Nov 25, 2018 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

RSS is a type of web feed that allows users and applications to receive regular updates from a website or blog of their choice. The acronym RSS stands for Really Simple Syndication or Rich Site Summary. It is sometimes referred to as the feed or RSS feed.

As a WordPress user, your website WordPress theme already compatible with RSS feed. You can find your RSS feed by simply adding /feed/ at the end of your website’s address.

answer Jan 30, 2019 by Deepika Sharma
Similar Questions
0 votes

I want to parse xml for getting element with same attribute and display it into my wordpress post using shortcode by php.
I create a xml file called emp_test.xml

<?xml version="1.0" encoding="utf-8"?>
<all_emp>
<emp_detail>
    <emp emp_name="john"><img>john_1.jpg</img></emp>
    <emp emp_name="john"><img>john_2.jpg</img></emp>
    <emp emp_name="john"><img>john_3.jpg</img></emp>
    <emp emp_name="marry"><img>marry_1.jpg</img></emp>
    <emp emp_name="marry"><img>marry_2.jpg</img></emp>
    <emp emp_name="david"><img>david_1.jpg</img></emp>
</emp_detail>
</all_emp>

I create shortcode in functions.php to get all img has attribute is john:

function create_shortcode_empimg() {
$url = 'https://.../emp_test.xml';
$xml = simplexml_load_file("$url") or die("Error: Cannot create object");
foreach ($xml->xpath("//*[@emp_name='john']/img") as $node)
{
    $img = (string) $node;
    return $img;
}
}
add_shortcode( 'empimg_shortcode', 'create_shortcode_empimg' );

I use this shortcode into my wordpress post.

But, the reult is comming like this:

john_1.jpg

How to get all img has attribute is john like?

john_1.jpg
john_2.jpg
john_3.jpg

Anyone's help is appreciated.

...