I've been looking into some quick ways to put this site on my website so my visitors can interact with it without leaving my site. The asp content is here. Thank you so much for the help!
I'm running WordPress 6.0 and using the Block Editor to enable content editors to paste links that generate the embed/iframe preview, as described here. I've noticed from time to time (i.e. erratically) the embed script doesn't seem to run, and the link remains as static text without converting into the iframe preview. I'm also using Swup.js to handle page transitions throughout the site, and I'm wondering if wp-embed has a method of some kind that I can hook into to …
I am trying to embed a video on my homepage. I add the embed code from YouTube and paste it into a custom html blog on the gutenberg editor. I click update and check my website and the video is there. I refresh the page and the video disappears. I go to the page editor and the embedded code for the video has been removed. Please can someone tell me why this is happening? I have tried to research it …
When I print a url onto my site, it automatically gets wrapped in: <blockquote class="wp-embedded-content" data-secret="tDj3qpdVAi"><a href="https://www.example.com/">Example Domain</a></blockquote> even though all I printed to the page is "https://www.example.com/". What is this mechanism and how can I disable either on a specific page or site-wide? What I Tried adding the code here to my functions file: https://crunchify.com/how-to-disable-auto-embed-script-for-wordpress-4-4-wp-embed-min-js/ adding both snippets of code (separately) from here to my functions file: https://kinsta.com/knowledgebase/disable-embeds-wordpress/#:~:text=Disable%20Embeds%20in%20WordPress%20With,the%20core%20contributors%20to%20WordPress.
I have a script which scrapes articles from the web and saves the url to a .txt file. I've created a custom plugin which on activation, loops through the urls and creates a draft post with the content being an embedded article. I'm using the following code in my plugin <?php register_activation_hook(__FILE__, 'my_plugin_activate'); function my_plugin_activate(){ my_plugin_install_site(); } function my_plugin_install_site(){ global $user_ID; $handle = fopen("listOfURLs.txt", "r"); if ($handle) { $count = 0; while (($line = fgets($handle)) !== false) { // process …
[embed width="28"]http://audio.itunes.apple.com/apple-assets-us-std-000001/AudioPreview91/v4/e7/e0/fb/e7e0fbfb-5582-ee65-6a81-823b5ecf9186/mzaf_5076836927047056840.plus.aac.p.m4a[/embed] Since WordPress was updated to version 4.7, the audio player changed: after pressing the play icon, the play button now comes with other options, "download" and "mute". I want to hide those, and turn back to the simple play - pause Below is the image: In the past, after playing 'play', only the 'pause' button appeared as seen in the image below: I want it back. Any idea on how to do this?
I want to disable the auto embed feature of Wordpress, when pasting arbitrary text that includes links in Gutenberg. I tried this with something like: add_filter('allowed_block_types', 'remove_default_blocks'); function remove_default_blocks($allowed_blocks){ // Get all registered blocks $registered_blocks = WP_Block_Type_Registry::get_instance()->get_all_registered(); // unset embed block unset($registered_blocks['core/embed']); // Get keys from array $registered_blocks = array_keys($registered_blocks); // Merge allowed core blocks with plugins blocks return $registered_blocks; } This works - but unfortunately this disables all embed blogs and I want the user to manually embed e.g. …
I am trying to get some oembed parameters attached to my Vimeo clips. I tried to get it going using the following two instructions: Passing Parameters to a Vimeo link in a WordPress Custom Field - LimeCanvas.com Any way to use a custom parameter for YouTube embed without using an iframe - WordPress.SE.com Unfortunately what works for YouTube won't work for Vimeo, as the returning URL has no such string as ?feature=oembed that I can make str_replace work on. It …
The goal is to grab the first video (embed or shortcode) from the post. So we need to check post content if it has embedded videos ( supported by WP ) or [video] shortcodes. Multiple videos and embeds could exist in the single post. If found any - return the very first of them, not depending on order of given patterns to match, but on order they have been inserted into the post. Here is my progress so far... This …
I'm trying to use the "Embed URL" block to include another WP site's tag page on my WP page. It seems like I'm able to embed individual posts from that site (so the theme supports embedding) but I get the error "Sorry, this content could not be embedded." when I try to use the tag page url. Is it possible to embed a tag page?
So I don't know how to properly do this and I've already spent like 3+ hours attempting to figure this out, so I'm getting help from the community. What I'm trying to achieve: Add class='optanon-category-C0002' and change the src to data-src in the iFrame that wordpress builds up. Here is what I have: public function get_modal() { $config = [ 'content' => '<p>The video is currently unavailable.</p>', ]; $video_link = ''; if ($video = $this->get_video()) { foreach ($this->get_video()->get_sources() as $each_video) …
I've had a request to paste in the following into a donations page for a group. The trouble is that WP is (rightfully) curtailing this HTML to prevent me or anyone from doing something less than honest. <form action="https://payflowlink.paypal.com" method="POST"> <input name="LOGIN" type="hidden" value="XXXXXXXXXX" /> <input name="PARTNER" type="hidden" value="PayPal" /> <input name="DESCRIPTION" type="hidden" value="Donation" /> <input name="AMOUNT" type="hidden" value="5.00" /> <input name="TYPE" type="hidden" value="S" /> <input type="submit" value="Donate here" /> </form> Question: That said, how could I display this one-button …
i have problem with create function for set cookie dynamically. when i try in custom page i have of course header is set and i tried something like this: in custompage.php: myfunction($cookiename,$cookievalue); in function.php add_action("init","myfunction",10,2); function myfunction($name,$value) { setcookie($name,$value,time()+3600); } add_action("wp_head","mySEOfunction",10,2); function mySEOfunction($name,$value) { echo "some meta tags...".$name... } i have Missing argument 2 in function.php i tried also this for SEO meta tags created dynamically but i have same problem... any help?
I'm a newbie for coding, I would like to learn how to add css style conditionally in functions.php My header controlled by .header-outer class. What would it be the best way to add css depending on category? I was able to determine category slug (not standard wordpress category) and wrote some if conditions. It's working but could not understand adding css. With wp_enqueue_style should I call external predefined css files or is it possible to write directly in functions.php. wp_enqueue_style( …
I've reached exhaustion in trying to find a solution to my problem. And the problem is that I want to display custom HTML/CSS snippets inside of my WordPress blog posts (e.g. be able to render them and let readers interact with them) without using an embed like CodePen or JSFiddle. Let's say I wanted to add an example of a grid container and then let users resize it directly inside the article itself. Does anyone have any ideas or tips …
Looking to update the content only in one place and have updated to the other site(s). Thinking it can be done with shortcodes but not sure how to create it. I am using Elementor on both sites. Thank you!
I'm using the code below to set the width and height of youtube embeded links ////////////////////////////////////////////////////////////////// // Youtube shortcode ////////////////////////////////////////////////////////////////// add_shortcode('youtube', 'shortcode_youtube'); function shortcode_youtube($atts) { $atts = shortcode_atts( array( 'id' => '', 'width' => 845, 'height' => 500 ), $atts); return '<div class="video-shortcode"><iframe title="YouTube video player" width="' . $atts['width'] . '" height="' . $atts['height'] . '" src="http://www.youtube.com/embed/' . $atts['id'] . '" frameborder="0" allowfullscreen></iframe></div>'; } For example, I will place this link --> https://youtu.be/YQHsXMglC9A , in the post and it automatically …
I am trying to find a way to embed basing custom post infomation, such as post title and few custom metas on other website. The easiest seems to be doing it in iFrame, but there are many "no's", you can't style it as much as you want etc. So after update to 4.7 and avaiability of REST API I though it would be great to use that, and retrievve needed values with API call. But when I try to use …
I have an embed which is essentially a script and a div (so not an oembed) which can easily be added via the html block. I'd like to be able to slip a prefetch link conditionally into the head when someone's used the embed, but not have it in every page by default. I have a solution: function prefix_filter_embeds( $content ) { if strpos( $content, "url-we're-looking-for" ) !== false ) { add_action( 'wp_head', 'prefix_url_actions', 0 ); } return $content; } …
I'm trying to remove the entire embed_footer from WordPress embedded posts. By adding the following code in the functions.php, I was able to remove the site title and comments icon. But still, the share icon is there. add_filter('embed_site_title_html','__return_false'); remove_action( 'embed_content_meta', 'print_embed_comments_button' ); Is there a way to remove the entire embed_footer? Or can I remove the share button also like the above code?