Forum Replies Created

Viewing 10 replies - 1 through 10 (of 10 total)
  • Ok so I updated the plugin and I still get the success message about the configuration but still no Facebook feed pulled.

    Did you test with the page ID or slug?
    I think my Facebook app is working correctly, it is active. I tried with another one I have and I get the same issue. Message is still the same :S

    Thanks for the efforts.

    Awesome. Thank you so much Danny. I will test tomorrow morning πŸ˜€

    I am actually wondering if it could be an issue from Facebook or I don’t know…

    I just tried as well using the Activity Feed that facebook provides..and it actually can’t show my posts either.

    https://developers.facebook.com/docs/plugins/activity

    I am trying with this page https://www.facebook.com/latess49
    Clearing the cache doesn’t seem to do anything.

    Thank you

    I am having the same issue. I just updated the plugin to its version 2.0 and I still have the success message saying the configuration seem okay but the widget shows “No recent Facebook posts to show”.

    Thanks for the effort Danny. Hope you can think of a fix. Thank you.

    Hi,

    Try to modify the permission of your uploads folder. If you look at the actual response received by your browser, you might see something like write permission denied.

    Hope this helps.
    Cheers

    Thread Starter clementt

    (@clementt)

    There we go!

    I created a filter that I hooked on the page_link function. The good thing is, this function is no only called when fetching the pages’ URLs but also when creating a new page. Therefore, when the page is added to the database, the modified permalink is too (something that I didn’t expect at all).

    Anyway, there is probably still a few things to fix in this code. I will make some tests now.

    function add_page_url()
    {
        add_rewrite_rule(
                '^([^/]*)/([^/]*)/page/([^/]*)?',
                'index.php?category=$matches[1]&pagename=$matches[2]&paged=$matches[3]',
                'top'
        );
        add_rewrite_rule(
                '^([^/]*)/([^/]*)/?',
                'index.php?category=$matches[1]&pagename=$matches[2]',
                'top'
        );
    }
    add_action('init', 'add_page_url');
    
    function add_cat_page_link($link, $id) {
        // get page
        $page = get_pages(array('include'=>$id));
        // get category slug
        $category = get_the_category($page[0]->ID);
        if (!empty($category)) {
            $slug = $category[0]->slug;
        } else {
            $slug = 'uncategorized';
        }
        // ret new URL
        return site_url().'/'.$slug.'/'.$page[0]->post_name;
    }
    add_filter('page_link', 'add_cat_page_link', 0, 2);
    Thread Starter clementt

    (@clementt)

    I am not sure I understand..
    Everything works fine with the blog posts since I was able to configure the permalinks such as /%category%/%postname%. Although, I am not sure about to overload the get_permalink function so I can have the sane structure as for the posts. Plus, I also have to take account of the language thing, which means adding the fr for french, at the beginning of the url if needed.

    I don’t understand what you mean with the three different filters available for get_permalink(). Do I have to overload this function by creating a new one and apply the filters to get_permalink()?

    Thank you.

    Thread Starter clementt

    (@clementt)

    I managed to get the URL format working thanks to the function add_rewrite_rule such as:

    function add_page_url()
    {
        add_rewrite_rule(
                '^([^/]*)/([^/]*)/?',
                'index.php?category=$matches[1]&pagename=$matches[2]',
                'top'
        );
    }

    Although, I now don’t know how to define the pages’ permalinks so they follow this new URL format.

    Thread Starter clementt

    (@clementt)

    Thank you for your reply bcworkz. I understand what you mean and that is what I want. Nevermind if each page or post has an url like: http://www.example.com/cat-name/page-or-post-name. That would actually be awesome.

    I will have a look through the Rewrite API. Although, I am quite new in WordPress so this sounds very unclear to me. What will I have to do? Redefine functions with filters? Configure the permalink format in the admin settings? Change my htaccess file?

    Thank you.
    Regards,

Viewing 10 replies - 1 through 10 (of 10 total)