Forum Replies Created

Viewing 15 replies - 1 through 15 (of 15 total)
  • Thread Starter mg33

    (@mg33)

    Thanks for the response Jeremy. If you go and look at https://www.michaelgallegly.com/blog/, there’s a post from 01/25/2017 that is the most recent post. It doesn’t come through with the shortcode. I also previously tried changing the number of posts to something larger than 3; it only displays older posts.

    I had to customize aspects of the PHP file (CSS mostly) to get the posts to display in the format shown on mg33.com. When I update the plugin, I have to revert to the customized PHP file after updating, which previously hadn’t been a problem. I understand the risks in customizing a plugin’s PHP file, but like I said, a few previous updates did not cause any problems when I added the old PHP file back in.

    Thanks – Michael

    Thread Starter mg33

    (@mg33)

    Hi Jeremy,

    The shortcode is:

    [jeherve_post_embed url=”https://www.michaelgallegly.com” wpapi=”true” type=”post” include_title=”true” number=”4″ include_excerpt=”false” order_by=”ID”]

    It’s unchanged from when it was previously working, and I’m embedding it via PHP.

    Thanks – Michael

    Thread Starter mg33

    (@mg33)

    A couple things to mention:

    When I link to https://www.mg33.com/wp-json/wp/v2/posts I’m able to see the post data as expected in the browser. I then get the “Error, No Blog Data Returned” message when using this url in the shortcode.

    If I simply use the url “https://www.mg33.com” in the shortcode, I don’t get any message.

    I do have Jetpack running, and noticed the JSON API was active. I turned it off but that didn’t change anything. I do have the REST API plugin, and your embed plugin running.

    Hope that helps. Thanks again – Michael

    Thread Starter mg33

    (@mg33)

    Thanks Jeremy. Your help a few weeks ago was very helpful, although I did back out of trying to fully integrate three feeds into one with the plugin.

    My shortcode for posting posts from the same site is as follows:
    [jeherve_post_embed url="https://www.mg33.com" wpapi="true" type="post" include_title"true" number="3" include_excerpt="false"]

    There are only two test blog posts on mg33.com at the moment. If you check out the home page you’ll see that there are two other Rest API feeds pulling into the page, which has turned out to be so much faster than loading RSS feeds like I used to. So, thanks for the plugin!

    Michael

    Thread Starter mg33

    (@mg33)

    Update! I disabled that plugin. Also disabled my cache plugin on the site I’m trying to pull posts from. Success! If you go to https://www.mg33.net/mg332016/resttest/ it’s working successfully now.

    Massive thanks for your help Jeremy. Next step is integrating this with the jeherve_post_embed_post_loop part you talked about above in the site’s blog PHP. The end goal is to have blog posts work as I described above: On Site A, blog posts from sites A, B, and C display in the masonry-style grid of blog posts on this theme: https://andersnoren.se/themes/garfunkel/, and organized by date, with posts from B and C linking out to those respective sites. Will hopefully have some time soon to start figuring that out. If you have any tips, please let me know.

    Thanks again for your help, sincerely.

    Michael

    Thread Starter mg33

    (@mg33)

    Thanks Jeremy. I’m using WordPress REST API (Version 2), and WP Version 4.6. I’m also using the plugin WP Rest API Controller, which allows me to toggle endpoints off/on, and the only one I have enabled is POST, set to https://www.michaelgallegly.com/wp-json/wp/v2/posts.

    I’ve made the page accessible here: https://www.mg33.net/mg332016/resttest/

    I’ll add that I’ve got two shortcodes enabled, one with only the “https://www.michaelgallegly.com” url, and the other with “https://www.michaelgallegly.com/wp-json/wp/v2/posts” just to see if that makes any difference.

    Thread Starter mg33

    (@mg33)

    Thanks Jeremy. I only had URL.com there to avoid posting the dev site url I’m using.

    When I’m using the proper shortcode, it is the folllowing:

    [jeherve_post_embed url="https://www.michaelgallegly.com" wpapi="true" include_content="true" number="1"]

    I don’t get any errors with that, and I do get the 1px outlined box with Source: michaelgallegly.com at the bottom right corner. Debugger does not return anything, and no content returned. Not sure if it matters, but there are blog posts on that homepage, but the actual blog url is https://www.michaelgallegly.com/blog/.

    Additionally, at some time later, with the same short code, I started getting the following error via the debugger:

    Warning: array_slice() expects parameter 1 to be array, object given in /home/mg33/public_html/mg332016/wp-content/plugins/rest-api-post-embeds/rest-api-post-embeds.php on line 302

    Warning: Invalid argument supplied for foreach() in /home/mg33/public_html/mg332016/wp-content/plugins/rest-api-post-embeds/rest-api-post-embeds.php on line 302

    Thread Starter mg33

    (@mg33)

    Thanks for the response Jeremy. I updated the php file, and with your shortcode in place I got the following:

    object(WP_Error)#560 (2) { ["errors"]=> array(1) { ["http_request_failed"]=> array(1) { [0]=> string(92) "cURL error 35: error:14077438:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert internal error" } } ["error_data"]=> array(0) { } }

    With my shortcode in place ([jeherve_post_embed url=”https://www.URL.com/wp-json/wp/v2/posts” wpapi=”true” include_content=”true” number=”1″]
    I got the following:

    object(WP_Error)#565 (2) { ["errors"]=> array(1) { ["http_request_failed"]=> array(1) { [0]=> string(89) "cURL error 6: Couldn't resolve host 'www.URL.com%2Fwp-json%2Fwp%2Fv2%2Fposts'" } } ["error_data"]=> array(0) { } }

    One thing to add if it’s helpful. On your site you have examples of this running via Jetpack. I can use that shortcode and successfully see your posts on my site, as a test:
    [jeherve_post_embed url=”wptavern.com” number=”8″ include_images=”true” include_title=”false” include_excerpt=”false” image_size=”125,125″ tag=”jetpack” wrapper_class=”example-grid”]

    Thanks again for your help, it’s really appreciated.

    Thread Starter mg33

    (@mg33)

    Thanks for your reply Jeremy. For whatever reason, I’m consistently getting the “Error in the response. We cannot load blog data at this time” error no matter what I put in there, even when I put your url there. I have very few plugins on this new dev site, so unsure of what’s causing this issue now. Will keep you posted as it resolves, because I’m very eager to try out your suggestions.

    Thread Starter mg33

    (@mg33)

    OK, I got that last problem figured out. It was looking for the old theme, which I didn’t add, so it was coming up blank. I’ve switched to a default theme.

    Thread Starter mg33

    (@mg33)

    One more followup – determined i needed to rename the site url in the database. Fixed the redirect that was happening. Can see all posts and pages in WP Dashboard now, but the site itself doesn’t come up. Just a blank page.

    Thread Starter mg33

    (@mg33)

    Thanks again. I made some progress, partly based on your suggestions.

    I went to the first test site I installed, which had a full DB import in PHP_MyAdmin of the full DB from the old site. The DB structure was a mix of that old DB, and the standard WP install DB tables. Old tables were eb_TABLE NAME, new tables were wpjd_TABLENAME. I don’t know where the wjpd_ prefix came from; just going to assume that’s how the install set it up.

    On a hunch, I named wpjd_posts to wpjd_postsOLD, then renamed eb_posts to wpjd_posts. All those posts now appear on the blog, so I’m assuming this is due to putting all those old posts into a table name that matches the install or theme. They are missing the categories, authors, etc.

    I dug around more and saw that wpconfig had the table prefix wpjd_. I changed that to eb_, but now logging into the test site url redirects to the old site. I can’t get into the dashboard anymore. Any ideas about that?

    Again, many thanks for your help.

    Thread Starter mg33

    (@mg33)

    bemdesign,

    Many thanks for the quick reply on a Saturday. Does it make any difference if I’m designing the new version of the site with a new theme?

    Also, I’ll mention that I’ve been having some site errors / login issues lately that are caused by some out-of-sync plugins with the older theme I’m using (that’s what I figure, at least). I mention this because my goal was to start fresh with a brand new install, and use the old posts, pages, content, etc. Part of this process will be converting post type “portfolio” to post type “post” so they will all be part of a blog. Current site is split between a blog and a portfolio; I’m combining them into one larger blog. Just thought I’d add this for context in case you have any different suggestions related to using Duplicator.

    Thanks again!

    Thread Starter mg33

    (@mg33)

    Thanks wslade!

    It might give me a reason to convert this site to a child-theme. I had already gotten deep into customizing it before I started using child themes on other sites. In fact, I’m considering a new design/theme for it, so it could be good timing.

    Thread Starter mg33

    (@mg33)

    Thank you both so much for the tips. CPanel was only down for a short time, and I started cleaning up malicious pages identified in Wordfence. It really takes a lot of time but I’m plugging away at it.

    What’s causing it to take a while is that in some cases, it’s obvious that a malicious PHP file was added; it just has the base64() code at the top and that’s it. But before I did a bulk delete of these files from Wordfence, I started noticing that some necessary files had the base64() code added above code that is needed. So, I’m having to go through them individually and delete them.

    I was also able to use PHPAdmin to fully delete the pages I mentioned; some of them still had their original post page in the DB, and I may have only deleted revisions before. I’ve also added blocking in .htaccess to prevent access from referring sites with the porn links.

    Tara – thanks so much for the info. I look forward to going through those links this evening.

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