Tag Info

Hot answers tagged

2

You are right the wp_postmeta table: does not save any kind of time stamp. Unlike for example the wp_posts table with post_date, post_modified and such. So you have to implement a mechanism to keep track of the points in time when votes happened yourself.


1

Although I would advice you to avoid this and use a plugin for this work. Because only a dedicated plugin can help SEO. "WordPress SEO" from yoost is a great plugin for SEO. That being said, here is the code for adding meta description and keywords in header. Paste this in theme's functions.php file. function add_meta_tags() { global $post; if ( ...


1

I guess you have two problems, and one is simply unveiling the other. The first problem is that the newsletter software/service is probably using unique links to track clicks and campaigns. For example, if Google Analytics tracking is enabled in a MailChimp campaign, it'll append a utm_campaign variable to every target URL, and a unique per-user utm_term ...


1

You need to set your ACF field to return the image object instead of the URL. You can then use the following code to retrieve the image and alt text: <?php $slideshow_image = get_field('slideshow_image'); // Check for alt text - if there isn't any, use the image title $alt = ($slideshow_image['alt']?$slideshow_image['alt']:$slideshow_image['title']); // ...


1

The root of the problem is that isset expects a variable to be passed to it. Also, I'm assuming that you expect the get_post_meta() to return a scalar value and not an array, so I added the third parameter set to true. // 3rd param: $single. Value of true means get scalar value, not an array. $ytlink = get_post_meta( get_the_ID(), ...



Only top voted, non community-wiki answers of a minimum length are eligible