-
do not use
<font>
html tag, it is old and i’m not even sure if can work in modern browsers. instead use<span>
(for inline text) or<p>
(for paragraph). -
php and html can work together but there’s an appropriate way to write it.
generally speaking, html code is wrapped with double quotes"html"
and php with periods.php.
:echo "html code here".php code here."more html here";
-
i advice you first to set a variable for the
$message
and after it call the var inside the echo code. that way it would be a cleaner code.
so here is a final solution for you:
$message = str_replace('{eventlinkURL}',$eventlinkURL,$message);
echo "<span style="background:red;">".$message."</span>";
good luck,
Ituk
Related Posts:
- the_author_posts_link css class
- How to change “Shipping Calculator “field label on Cart Page – woocommerce? [closed]
- Theme Customizer – Dynamic CSS PHP File
- CSS saved & enqueued, but wordpress doesn’t load css text, only file
- Using PHP in a Stylesheet (possibly a “.htaccess” problem?)
- WordPress doesn’t include css
- Understanding child theme functions.php
- Want to create Child theme, but already edited Parent theme css files and some php files
- How to display a value from a radio button in the options menu in wordpress
- Style every second widget?
- How to scale image with equal width and height without distortion?
- php syntax – how to concatenate properly – echo bloginfo(‘stylesheet_directory)
- wp nav menu: add attributes to menu items [duplicate]
- Put CSS inside a PHP file and include it the right way
- Missing sidebar parameter “fix” – before_content
- Plugin CSS not enqueing
- How to use my style.css file outside of wordpress subdomain?
- Can I install/embed WordPress on a ‘single page’?
- How to design a table based on css values set from admin/dashboard
- Best way to schedule daily change in CSS parameter
- Gravity form built in Captcha
- Auto 301 to full post permalink? (using : /archive/%post_id% to %post_name% )
- Whats the proper way to use a php stylesheet in a wordpress theme? [duplicate]
- How do I add a custom css to all posts without affecting homepage css? [closed]
- proper way to add css using functions.php?
- Automatically set all tags to have a height of 0 if there is no content inside the tag [closed]
- height should be set to auto to avoid pixelation in the post thumbnail function
- RTL Stylesheet Confusion with WordPress
- Correct way to enqueue page specific CSS file
- Wrapping a Sidebar within
- How to make container class in PHP
- PHP in CSS file?
- Clickable image link sends people to wrong URL
- Last class on last headline?
- Creating a blog on my companies new website using WordPress but I have sidebar issues
- How to remove sidebar primary widget on Mobile on category page [closed]
- How to Change CSS Colors from Custom Plugin Settings Page
- Can I set up a hover animation in CSS depending on a PHP conditional?
- Get ACF options field in PHP acting as CSS
- Problem with adding custom CSS class to image in ACF Photo Gallery plugin [closed]
- Link to page with posts of specific type
- Conditionally load class in the comment section of the post page
- Assign Custom classes to every Excerpt
- How to make changes to style.php [closed]
- Adding a navigation page state to individual blog and portfolio pages
- Using theme options to change a border-radius value
- Inline CSS header style priority function.php Child (no enqueing I think)
- Displaying images outside the content
- How to put search bar & logo in the “primary navigation” storefront theme?
- Applying css in functions.php
- How to add a CSS class to this php code [closed]
- echo cutom css code to WordPress page template file ? is this safe?
- PHP function for horizontal Woocommerce thumbnails and badges
- Use CSS tag inside PHP code
- My top header looks different on single pages but is fine on the home page
- Using php code inside style tag
- dynamic php menu with hidden sub-categories only showing when the category name is clicked
- Warning: Use of undefined constant all – assumed ‘all’ (this will throw an Error in a future version of PHP) in C:\Users\…….. on line 6
- Drop down question
- Trying to generate a CSS file in wordpress uploads folder
- WP Website is shown in HTML
- How to print all the inline styles in the WP_Styles instance together with their keys?
- The style.php file inside theme-engine folder has other content on FTP
- how to add functions to my function.php using a child theme?
- Replace header with large image on home page only, using Genesis child theme
- Add a default style if no Featured image is selected
- Site title not showing. Please help me
- PHP/CSS: Shortcode won’t display correctly, and only displays in the head (before content)
- Hot to edit WooCOmmerce dashboard?
- Using Sprit-sheet on WordPress categories
- Add class for the_post_thumbnail_caption()
- Target a specific container to style on WordPress storefront theme
- How to include different html tags in the header for different pages?
- CSS loading as empty file in Custom Theme
- How limit the width of a fixed menu-bar on scroll?
- Font-Family does not looks like how it should be [closed]
- Custom Theme, Editor won’t wrap text (i.e. change width)
- Where to find the html for WordPress site? [closed]
- Click to expand menu
- How to add style in functions.php depending on conditions?
- How to remove image on single product and get product to span page?
- Modify arguments for parent theme’s `wp_register_style` via child theme
- Hide button based on PHP result
- How to have Function of a plugin using global vars into a shortcode?
- Child theme not working properly
- WordPress – Image href for home menu nav not working
- How Can I Center the Logo in the Navigation Menu? [closed]
- WP_Nav Highlight Parent Issue
- Cant get theme to change footer color through theme customizer
- Changing 2011 theme header image based on user dropdown
- How to change a specific character in a theme option value – replace a space with a plus sign
- How do I get Roboto Google Font to display normal font-style? [closed]
- Using PHP for background-image property [closed]
- How to create and add js and css file when server is not on my PC?
- which php or css file has generated an inline style in WordPress that overwrites my css
- New to wordpress. Need Help with templates [closed]
- Child-theme suddenly stopped working [closed]
- Parse error: syntax error, unexpected ‘}’ in
- WooCommerce Checkout Cart [closed]
- How to create different templates for woocommerce single-product.php?