Can I put “list item format” in separate file
-
Hello,
Is there a way to put the code that I have in the “list item format” section into a separate file, like a php file in my wordpress project folder? (similar to how we put custom functions in the “functions.php” file whenever we want to customize a plugin). I’m referring to the section under Appearance > Widgets > Available Widgets > Events > List Item Format (the place where you write the html to display the event content)
Please see this image: https://ibb.co/5rVCWFqIt seems pretty sloppy to put our code in that tiny little box because it’s not formatted for us. Additionally, the biggest issue for me was when I, somehow, lost all my original html code that I had put in there. I had to write it all over again which cost me time.
I was thinking, is there a way we can write a shortcode for this?
That is, I write my shortcode function (function listItemFormat()) in my home.php file, and in the list item format area, instead of writing all that html, I just write my shortcode, [listItemFormat]. Is this possible?
- The topic ‘Can I put “list item format” in separate file’ is closed to new replies.