Hi I have developed a wordpress site and noticed that when I visit PDF using this link: https://peppyplates.brookstonesites.co.uk/wp-content/fancy_products_orders/pdfs/74089_2.pdf
you are only able to see one page. If I then go into my file system and download the PDF it contains 5 pages. All 5 pages are duplicates I doubt this is an issue but thought it was worth mentioning.
When I visit the above link I want it to show all 5 pages. I'm not sure what is causing this issue. TCPDF is clearly creating the PDF correctly since when I download it the content is correct.
Could this be a wordpress issue and if so is there a fix because I don't want to have to go through the file system to get the file I need.
I am using a plugin called Fancy Product Designer to create the PDF, I have slightly modified it to add the duplicate pages which has worked a treat if I download the PDF.
It was a wordpress caching issue. I myst have created the PDF before adding the code to duplicate the pages. I created a new order downloaded the PDF and it contains the duplicate pages.
NOTE TO SELF: always clear server cache if there is no reason for the issue ;)
Related
I have followed the tutorial on this website https://www.wp-tweaks.com/display-a-single-cell-from-google-sheets-wordpress/ which allows to dynamically display values from a Google spreadsheet on a WordPress page using a simple shortcode:
[get_sheet_value location="Cell Location"]
This solution worked seamlessly until a single page contained hundreds of those shortcodes (I basically need the whole content of the page to be editable via the spreadsheet). I started getting 100% Errors by API method (based on the Google Metrics) and the content was not displayed properly anymore. I realize that sending hundreds of read requests after each page load is not ideal and will inevitably affect the load performance and that Google imposes quota limits too. Is there a way to bypass this issue? For example by pulling the values from the Google spreadsheet only once a day. Unfortunately, I don't have much coding experience but I'm open to all solutions.
Thanks in advance!
You could publish the sheet to the web and embed it to your website:
In your sheet, go to File > Publish to the web
In the window that appears, click Embed.
Click Publish.
Copy the code in the text box and paste it into your site.
To show or hide parts of the spreadsheet, edit the HTML on your site.
It would look like this (click on Run code snippet):
<iframe src="https://docs.google.com/spreadsheets/d/e/2PACX-1vR3UbHTtAkR8TGNtXU3o4hzkVVhSwhnckMp7tQVCl1Fds3AnU5WoUJZxTfJBZgcpBP0VqTJ9n_ptk6J/pubhtml?gid=1223818634&single=true&widget=true&headers=false"></iframe>
You could try reading the entire spreadsheet as a JSON file and parse it within your code.
https://www.freecodecamp.org/news/cjn-google-sheets-as-json-endpoint/
I am sure this issue has a relatively straightforward solution, but I am a general web development novice, new to blogdown specifically, and just created my first site.
Aside from this one issue, everything is working great. In fact, I generally love the functionality, but I am having trouble getting the sharing buttons on my blog post to function properly. The issue is that a reader can share the title of a blog, on say Twitter, but it does not generate a URL for the post.
The result is that you get a Tweet with nothing linked... which is not helpful.
Leading to this not very actionable Tweet:
Instead what I want is this:
Here is the specific page where it is a problem:
https://mgb-research.netlify.com/post/gaussian-process-imputation-models/
And here is my Git repo with the site files:
https://github.com/matgbar/main_site
I can see that the button is referencing post/gaussian-process-imputation-models/, but it is not including the equally important: https://mgb-research.netlify.com/ in front of the page info.
I have tried tinkering with certain settings, including relativeruls=false vs. true. Nothing seems to make a difference that I have done so far.
I had the same problem. Instead of adding it to each post. I found a related issue where Yihui Xie recommends setting the baseURL on the config.toml file and then build the site:
serve_site() is only for local preview. If you want to publish the site, you need to run blogdown::build_site() so that baseurl is actually written to all pages.
After a number of different approaches to this problem, I resolved it by adding the baseurl: to each page's header (see image below).
The page now renders full links using the sharing buttons.
I'm using the ultimate member online plugin, which shows members' online status.
When enabled to show on a user's UM profile page, it looks like this, for example:
When creating posts, it is common for data pertaining to the author to display somewhere within the post. For example:
What I'd like to accomplish is to have online status (shown in first image, above) also be displayed within this author data, shown within a post.
I've poked around in theme/plugin files, and I'm CLOSE!
I found where I need to edit, within the theme files (wp-content/themes/plum/inc/template-tags.php file)
I've narrowed the plugin files and content within them down, to what i believe would be the appropriate code to insert into theme files. Screenshots and copied [relevant] text can be found here:
Ive been playing around, reading the web, creating a post on the official wp forums (as well as searching within them), and this is the best I've got so far:
On the surface, it looks like the problem is solved. However, that user ("testAuthor1"), is offline (and the greenlight there in that very last imgur link displays the user as online).
I'm using a custom Genesis child theme and lately I've been noticing that many false articles have been showing up on webmaster tools. They look something like this:
I haven't written these nor are they topics my site focuses on so I have no clue why they are showing up. So far, I've had to delete about a hundred of these. I read on a forum that this can be due to my theme generating bad urls but I'm not sure what that means nor do I know how to fix it. What can be causing this?
I believe that this problem is due to your website being hacked or Google is trying to Crawl or follow a link within your content that is not really a link.
This is what webmaster tool tells you about the problem:
In Crawl Errors, you might occasionally see 404 errors for URLs you don't believe exist on your own site or on the web. These unexpected URLs might be generated by Googlebot trying to follow links found in JavaScript, Flash files, or other embedded content.
To find out if your website has been hacked. First get this total = WordPress number of pages + number of post + number of categories + number of PDF or files + Images. Then do a google search using the following query (without the quotes) "site:yourdomain.com" if the result number is exaggerated greater than the calculated total then your website is definitely hacked.
If you believe that your website is not hacked try to find from where these links are being generated. Here is the trick: Go to the Web Master Tool report and click on one of those links, check the "Linked from" tab. There should be one or many possible pages listed from where these unexpected links are coming from.
Two possible Outcomes:
The page from where the link is found is from your own website: Go
to that page and open the source code, do a Ctrl+F search for that
link, if found check what section or content is generating this
problem.
The page from where the link is found is NOT from your own website:
In this case try to contact the owner of the other site and ask the
link to be removed, if not possible I highly recommend you to create
a 404 page within your WordPress installation with some useful
links. Google how to do this, there are plenty of resources.
Hope this helps
I am trying to add some Google Analytics related code (addition to the standard code) on every product page. I tried adding it to the bottom of the "product.liquid" file but it doesn't seem to pull through to the live site. Could it be to do with some special Shopify security function that stops unusual looking javascript from being used?
Kind regards,
Benet Hitchcock.
Yes you can do this through your app. You need to take read|write_theme scope at the time of installation of you app now go to theme setting->temeplate editor
Open themes.liquid file and paste your code there
Then its appears on all page