It’s a slider and it means 4 per slide. If you had 8, for example, you would see the other 4 after swiping to the left or right. 🙂
Note that you can also use arrows to scroll left or right, except that yours aren’t visible right now because the arrows are white on a white background.
P.S. Forgot to mention that you would want to use the classes in the above code to style your output in the Theme Panel -> Custom CSS part.
If I read the plugin description right, the reason it doesn’t work out of the box is that Newspaper doesn’t use the default the_excerpt function.
But the get_excerpt function can also be easily overridden. What Lucian means (I think) is that you need to not only remove Newspaper’s insertion of the excerpt, as in the screenshot, but also put in the plugin’s.
In the plugin’s FAQ I see this:
“Can I manually call the filter in my WP theme or plugin?
The plugin automatically hooks on the_excerpt() and the_content() functions and uses the parameters specified in the options panel.
If you want to call the filter with different options, you can use the_advanced_excerpt() template tag provided by this plugin. This tag accepts query-string-style parameters (theme developers will be familiar with this notation).
…”
So you just need to do that. P.S. If the plugin author has defined the_advanced_excerpt() the way others do, make sure you don’t use
<?php echo the_advanced_excerpt; ?>
but just
<?php the_advanced_excerpt; ?>
and give it options as described in that plugin FAQ. 🙂
If you try this out and still need more help deploying it, tagDiv or the plugin author might be able to help you depending on where your difficulty lies.
There are certain settings in W3 Total Cache that are problematic and other ones that are not. Make sure you’re not minifying CSS or JS. Page cache is okay, according to an earlier comment from support. 🙂
What Shashank and Dave said. I’d like to try this out. 🙂
Heya,
First of all, I’m far from the most brilliant guy on tagDiv. If I were, we wouldn’t have spent have a dozen posts correcting my tiny mistakes 😉 I’ll give that title to Chris to avoid favouritism among the actual staff…
Your ideal setup definitely requires some custom work that I don’t have time to provide at the moment. I would go to http://studio.envato.com, as tagDiv recommends — or you could do some learning, just like I did, and do it yourself 😀 But I will make a few comments:
Having content in these tabs that differs from post to post means you’ll either need to make extensive use of custom fields, or you could use Visual Composer settings to build the post itself. The question is what are you using the regular post content for? A comment on the phone, for example?
The first option would mean that you’d insert code similar to what I’ve been giving you, and have it appear on every template, using custom fields to determine the content. For example, as you probably know, ACF has a WYSIWYG editor field that you could use for your review. The buy now would not be as easy to automate through such a field, in my opinion (but you may already have a solution and just be looking for how to use tabs for it?).
The second option is that you’d construct these posts in the editor itself using Visual Composer, and then perhaps use custom shortcodes to display the content of your fields.
Or a real developer might suggest some much more sensible solution. :p
But I will give you one last thing, namely a basic tweak of my above code just for your “Features” tab.
The idea is the same. You’re opening up a vc_tabs, you’re opening up a tab, and then you’re looping through features-related fields. It could look like this, with lots of extra comments and line breaks to make it clear for you:
// Update this list using the same format for all the field names you want
$field_names = ['2g_network', '3g_network'];
// Set up tabs
$to_echo = '[vc_row][vc_column width="1/1"][vc_tabs]';
// Set up features tab
$to_echo .= '[vc_tab title="Features" tab_id="features"]';
// Begin a list
$to_echo .= '<ul class="features_list">';
// Loop through the fields
foreach ($field_names as $field_name) {
$data = get_field_object($field_name);
// Check if we have a value and set to a default if not
if ($data['value']) {
$value = $data['value'];
} else {
$value = 'No information on record.';
}
$to_echo .= '<li>' . '<span class="features_label">' . $data["label"] . ': </span>';
$to_echo .= '<span class="features_value">' . $value . '</span></li>';
}
// Close the list
$to_echo .= '</ul>';
// Close the tab
$to_echo .= '[/vc_tab]';
// Close the tab group etc.
$to_echo .= '[/vc_tabs][/vc_column][/vc_row]';
// We have to filter the whole string to make WP interpret the shortcodes
$to_echo = wpb_js_remove_wpautop($to_echo);
// Output
echo $to_echo;
My note above about only needing to change $field_names applies to this as well.
If you were going to put other tabs in, you would modify the lines that open and close the tab groups, and use those in a similar way. I realize that this is just a simple list and not a table like you wanted — more research would be needed for me to construct a way of getting the label of the field group and such…
Hope that helps. I do think what you need isn’t just “support” but custom work, although it will be fantastic if you can figure the rest out by research, trial and error.
Best of luck!
I used to have that problem. I installed this plugin, which is old but still works perfectly fine (as recently as yesterday): https://wordpress.org/plugins/easy-facebook-share-thumbnails/
Theme Panel -> Custom CSS, and insert this:
.td-category-page-subcats {
display: none !important;
}
Theme Panel -> Translations -> space or something for “by”
Theme Panel -> Custom CSS
980 is deprecated in general, if I understand it right. Chris Simmons was saying in other threads that they are likely preparing for the new grid sizes of Bootstrap 3.
A minute of Googling reveals:
Old break points: http://getbootstrap.com/2.3.2/scaffolding.html (980 mentioned)
New break points: http://getbootstrap.com/css/ (970 mentioned)
Can a plugin like Redirection do variables / stems of URLs, or only individual whole URLs? Could possibly help. https://wordpress.org/plugins/redirection/
Or clever .htaccess rewriting? But I’ve never really tried this myself. https://www.addedbytes.com/articles/for-beginners/url-rewriting-for-beginners/
There is actually a built-in way. See my answer here: https://forum.tagdiv.com/topic/is-it-possible-to-show-pages-in-blocks/
Chris’s point about numerical order to help filter your pages is probably better than the date published one, if the block picks that up. (And the author trick would only apply if you generally exclude author functionality from your pages, as we happen to do on our site. Also, I just tested the block author filter and it seems to only lists those with Administrator role…)
Haven’t forgotten, don’t worry. Will get to this in a day or two. It just requires that I have a few minutes to sit down and type the response, and weekends are actually my busiest time. :p
Not sure about the double arrows.
The shadow is a CSS gradient effect and can be removed like this:
1. In single_template_3.php find the line <div class="td-post-header-full td-image-gradient"> and remove td-image-gradient
2. In single_template_4.php find the line <div class="td-big-slide-background"><div id="td-full-screen-header-image" class="td-image-gradient"> and remove class="td-image-gradient"
The class will no longer be applied to the image.
-
This reply was modified 11 years by
TheMediumUTM.
That post is 8 days ago. Since then the issue has been brought to tagDiv’s attention and the plugin is the updated, secure version in the latest theme update.
Child themes are indeed handy. Christopher recently said he doesn’t use them because of the pagespeed slowdown in CSS importing, if I understood him right, which is valid but it does prevent things like this. If you’re a heavy modifier of files, each update will be painful…
Child themes basically make WP use the version of the file in the child theme rather than the parent theme’s, if one exists. Hence your changes would survive updates.
Also, not all of those files can be modified in a child theme (I believe td_wordpress_booster.php can’t, for example). For those ones, you would have to copy the function in question into your child theme’s functions.php, make your changes, and rename the function. Then either change all references to the function in other files, or it’s a hooked action or filter, unhook the parent functions and hook yours in. (There are a few tutorials out there for this.)
Even if you use a child theme, you would want to watch for updates that affect functions and styles you’ve changed and do your changes over again, but it’s not as big a deal.
A block 10 is also included in the latest update, so you’d want to rename your custom one to avoid it being overwritten.
I agree that the order is a little bizarre. I rearranged my templates too. 🙂
You’ve got the right idea but templates 2 through 5 have a different breaking of where the header appears — namely in single_template_2.php, _3.php, etc.
Take these lines from loop-single-2.php:
if (!empty($td_mod_single->td_post_theme_settings['td_subtitle'])) { ?>
<p class="td-sub-title"><?php echo $td_mod_single->td_post_theme_settings['td_subtitle'];?></p><?php
}
Find these lines in single_template_2.php:
<div class="meta-info">
<?php echo $td_mod_single->get_category();?>
And add this after the category line:
if (!empty($td_mod_single->td_post_theme_settings['td_subtitle'])) {
echo '<p class="td-sub-title">' . $td_mod_single->td_post_theme_settings['td_subtitle'] . '</p>';
}
Same as what was removed from loop-single-2.php but slightly modified to match single_template_2.php’s style in case it matters.
Haven’t tested (I have some other subtitle stuff going on in my implementation), so check back if something doesn’t work.
CSS for line under menu, to be entered in Theme Panel -> Custom CSS:
.td-menu-background:after {
background: transparent !important;
}
Spacing and border between menu items:
.sf-menu > li > a {
padding: 0px 0px 0px 0px !important; /* top, right, bottom, left*/
border-right: 1px solid #eee !important;
}
Adjust values as desired. Note that at present you don’t have to think about first and last child of the menu as long as you don’t remove the search button (because it’s not a list item).
I haven’t had any trouble, so it might not be theme-related. But I’ve contacted Disqus support about things like this (most recently an import of a lot of WordPress comments that their auto-importer couldn’t detect) and they’ve been very helpful.
But I don’t want to speak too soon – maybe others have had this problem here and can help you 🙂
The point about it being easier is true. But just in case having original box is strongly desired… 🙂
1. Find the ID of the user you want to hide by editing the user and looking in the address bar. E.g. you might see “http://yoururl…/wp-admin/user-edit.php?user_id=940” in which case the ID is 940.
2. In the Newspaper theme files go to includes/modules/module_modifier/td_module_blog.php.
3. Find the function that begins with:
function get_author_box($author_id = '') {
if (!$this->is_single) {
return;
}
if (td_util::get_option('tds_show_author_box') == 'hide') {
return;
}
if (empty($author_id)) {
$author_id = $this->post->post_author;
}
4. Add this after the part I just quoted:
if ($author_id == '940') { // Replace with the ID you found
return;
}
That’s the if statement Kronos means and it just returns nothing for the author box if it’s the author you want to hide. Save and/or upload the file and check an article where you don’t want to see it.
P.S. That file can be modified in a child theme to survive theme updates automatically.
-
This reply was modified 11 years by
TheMediumUTM.
Welcome and good luck!
If it’s not something straightforward enough to create a new forum topic about, it’s probably not something I can give the time to… sorry! If you want to create a topic, I’ll check it there. Otherwise, you can look for a professional at http://studio.envato.com.
Best of luck!
And a final note, but this is just because I’m a little obsessive:
If you’re going to have a lot of these tabs, you could automate the adding of each field. You would replace from // Simplest possible example of getting ACF data, sub in yours to // (You could wrap each block in an if to skip a tab if the data is empty) with the following code:
// Update this list using the same format for all the field names you want
$field_names = ['2g_network', '3g_network'];
// Loop through the fields
foreach ($field_names as $field_name) {
$data = get_field_object($field_name);
// Set up tab
$to_echo .= '[vc_tab title=" . $data["label"] . " tab_id=" . $field_name . "]';
// Check if we have a value
if ($data['value'] {
$to_echo .= $data["value"];
// Default message if no value entered for the field
} else {
$to_echo .= 'No information on record.';
}
// Close the tab
$to_echo .= '[/vc_tab]';
}
Then whenever you want to change a field, you would just change the $field_names list and it would be much simpler. For example, if you had a field named ‘4g_network’, it becomes $field_names = ['2g_network', '3g_network', '4g_network'];
Hope that helps :p
But this leads me to ask whether you really want the label there or whether you’re thinking of renaming the tabs. I see that it still says “The first tab”, “The second tab” like I put in. To have the labels on the tabs, the tab block would look like this:
// Repeat these lines for each tab, making sure each tab has a unique id
$to_echo .= '[vc_tab title=" . $data_1['label'] . " tab_id="tab_1"]';
$to_echo .= $data_1['value'];
$to_echo .= '[/vc_tab]';