Individually styling date month year [closed]

As suggested, you can break down the date format in different parts. echo ‘<span class=”date-day”>’ . get_the_date( ‘d’ ) . ‘</span>’; echo ‘<span class=”date-month”>’ . get_the_date( ‘M’ ) . ‘</span>’; echo ‘<span class=”date-year”>’ . get_the_date( ‘Y’ ) . ‘</span>’; Now each item have class associated with it, so you can style each differently as you … Read more

Display Password Protected external RSS in wordpress template

I assume you mean fetching an external feed with an HTTP authentication. Fetching feeds with HTTP Authentication Note that fetch_rss() uses the MagPie library, that’s deprecated in WordPress. Use instead fetch_feed() that uses the SimplePie library. It looks though it doesn’t support this kind of url: http://user:[email protected]/feed/ like we can use with curl in command-line, … Read more

Ninja form Redirect depending on text field content [closed]

I am not sure whether you have hooked this function to appropriate action. Also you have not concatenated the strings properly: Instead of $newdestinationurl = $url/$destinationurlslug ; it should be $newdestinationurl = $url.”https://wordpress.stackexchange.com/”.$destinationurlslug ; Please see below for the complete code: function ninja_forms_handler() { add_action ( ‘ninja_forms_post_process’, ‘change_ninja_forms_landing_page’, 1, 2 ); } add_action(‘init’, ‘ninja_forms_handler’); function … Read more

str_replace function in theme

function replace_content($text) { $replace = array( ‘Check’ => ‘<span style=”color:red”>Check</span>’, ‘Map’ => ‘<span style=”color:red”>Map</span>’, ‘Comments’ => ‘<span style=”color:red”>Comments</span>’, ‘Print’ => ‘<span style=”color:red”>Print</span>’ ); $text = str_replace(array_keys($replace), $replace, $text); return $text; } add_filter(‘the_content’,’replace_content’);

Converting html to wordpress images not showing

In your comments you mentioned that you are still new to wordpress, and I believe you don’t have a full understanding of the template hierarchy. Essentially, wordpress looks for certain templates depending on what post type is being displayed. And if it can’t find any, the last resort is always the index.php file. Here is … Read more