Search the Community
Showing results for tags 'read'.
-
Hello, I have a wordpress site using Thesis 2.1 theme and I am displaying "excerpts" for each post on homepage.. I don't want to add <!-- more --> to each post and I want to show sth different, sth more valuable on the homepage to my readers.. Thats why I use excerpts. I added this line of code to my custom.php file: function new_excerpt_more($more) {global $post;return ' <a href="'. get_permalink($post->ID) . '">Continue Reading...</a>';}add_filter('excerpt_more', 'new_excerpt_more'); It added a "continue reading.." link to the posts that I haven't yet defined excerpt.. So, If nothing is written on the excerpt area of that post, it shows some part of the post and adds a "continue reading.." link to it on the homepage. But if I have written sth in the excerpt area of the post, it does shows the excerpt, but doesn't add the "continue reading.." link at the end.. I will be happy if you may help me on this, this drives me nuts currently! [/size] MERGED So basically, what I am trying to do is, adding read more tag to custom excerpts which we define manually. Here is another code I tried but had no luck again! //* Changing excerpt more - only works where excerpt IS hand-craftedfunction manual_excerpt_more( $excerpt ) { $excerpt_more = ''; if( has_excerpt() ) { $excerpt_more = ' <a href="' . get_permalink() . '" rel="nofollow">[Read more]</a>'; } return $excerpt . $excerpt_more;}add_filter( 'get_the_excerpt', 'manual_excerpt_more' );
-
Hello, I have csv filename with date. Everyday i have same csv file with respective date. I need to read filename (everyday date changes in filename) and do operation. For example, I have file "cells_20140106_165532.csv". I did like this to read it in general: $filename = "cells_".date('Ymd_hmi').".csv"; $file_contents = file_get_contents($filename); $importcsvsql = ""; It is taking current date instead of filename's date. It is generating empty file "cells_20140114_110109.csv" Thanks in advanced.
-
I recently got to grips with PHP, and I have used MySQL on occasion as well, I am now trying to interface them for the first time; I have written up a database for tracking stock at my business and I want to view my tables in a web browser using PHP, however nothing I have written has worked, and all the code I have found and modified from the internet isn't producing any results either. I have changed sample codes from the internet and in my books to use my MySQL username, password and tables, but I keep getting a blank page returned... I wonder if the code I have is out of date or something, I can't figure it out... Any MySQL boffins available to explain how they would achieve this goal? Thanks!