pfbarnet
Forum Replies Created
-
Forum: Plugins
In reply to: [Request Form for Zendesk] Form redirects to admin-ajaxGetting a 307 redirect every time user submits form. Leads user to a site login page. API appears to be correct.
Forum: Fixing WordPress
In reply to: Enqueue SASS stylesheetWell I’m not accustomed to working with CSS preprocessors so normally I would enqueue the style.css using wp_enqueue_style. How does one get the SCSS to actually play nice with WordPress?
Forum: Fixing WordPress
In reply to: Enqueue SASS stylesheetRight so after I install the compiler, what exactly do I need to do with the theme files in order to make it work? Or is there nothing I need to do? Or do I need to enqueue a style.css because that’s what the functions file will understand?
Forum: Fixing WordPress
In reply to: Enqueue SASS stylesheetOkay, I went in and installed SASS via the command line but still no luck. Am I missing something? Does it just automatically enqueue after I have SASS installed?
Forum: Developing with WordPress
In reply to: CSS background images inside PHP plugin fileResolved.
Forum: Developing with WordPress
In reply to: CSS background images inside PHP plugin fileThank you this is extremely helpful!
Forum: Developing with WordPress
In reply to: CSS background images inside PHP plugin fileOkay, and this applies to CSS from within a PHP file as well? There are no special considerations?
- This reply was modified 5 years, 10 months ago by pfbarnet.
Sorry, I don’t really understand your solution. Anyway you could walk me through the process? Just to make it more clear:
I have two documents: index.html and style.css. In my html I have a link to my css and some inline JS. What I need to do is convert this into a WP plugin that my client can easily install and afterward, generate the output on any WP page or post using a shortcode. So far I’ve figured out how to create a plugin with a shortcode but I do not understand how to render my html.
For instance I’ve successfully render “Hello World!” with the following code:
<?php
/*
* Plugin Name: WordPress ShortCode
*/function wp_first_shortcode(){
return “Hello World”;
}add_shortcode(‘first’, ‘wp_first_shortcode’);
?>BUT this doesn’t really help me because instead of the PHP return function, I need a bunch of HTML. How do I actually do this? How do I structure that? Do I need to use enqueue or an include for that?
Any help would be appreciated.