A message from our CEO about the future of Stack Overflow and Stack Exchange. Read now.

New answers tagged

0

You need to add the Loop to your template to display post content. Regular loop (the current page). <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <article> <h2><?php the_title(); ?></h2> </article> <?php endwhile; ?> <?php // Navigation ?> ...


1

In WP Admin go to Settings -> Permalinks and Save Changes. You don't need to change anything, just save. This resets wordpress rewrite rules which usually fixes 404 errors with newly added CPTs.


2

You still need to do it, if you want to use HTML5 markup for certain elements. WordPress doesn't have any other way to tell the difference between "legacy" themes and more recent ones, and the old markup is still the default for backwards compatibility reasons. As recently as 5.3 there are still changes being made that require declaring support for html5 (...


1

function wp_dequeue_kirki_style() { wp_dequeue_style('kirki-styles'); } add_action('wp_enqueue_scripts', 'wp_dequeue_kirki_style'); Please make sure that you have handler name kirki-styles in the parent theme for the css file that you want to remove. Because wp_dequeue_style function used handler as parameter. You can check documentaion of dequeue ...


2

That depends entirely on the theme provider. They should give you an XML file that you use to import the test data. Or you use the theme test content. It features some edge cases, like very long category names, and all possible formatting options, like table, <pre>, nested lists, and so on.


0

I believe plugins are loaded before the theme (see here "plugins_loaded" vs "setup_theme") so the error is occurring because Helper has not loaded yet. One thing you can try is to create a child theme and add the class override there (via functions.php). You can also provide your override after the theme has loaded by hooking into "after_theme_setup" or "...


0

You can use the_modified_time( $format ) in the loop, where $format is the PHP date/time format. If left empty it'll show in the format from your site settings.


0

Some quick possibe solutions working in templates: If you have a page template for the homepage you can output somewhere <?php echo "Last modified on: ".$post->post_modified; ?> If you work on index.php of your theme <?php if ( is_home() || is_front_page()){echo "Last modified on: ".$post->post_modified;}?> The first example above can ...


0

Navigate to theme folder of "twentyseventeen" and open the functions.php file. Now, Goto line no. "54" and you will see below code. add_image_size( 'twentyseventeen-featured-image', 2000, 1200, true ); You can change the dimensions there. Thanks,


0

Since Simple Fields has been removed from the plugin directory you should consider recreating the custom fields using Advanced Custom Fields (ACF) or similar and then modifying the template to use the new fields. Keep the field names the same when you register them and it should be a pretty simple fix.


0

Make sure you put your function inside after_setup_theme action hook add_action( 'after_setup_theme', 'load_translation' ); function load_translation() { if( is_dir( get_stylesheet_directory() . '/languages' ) ) { load_theme_textdomain('adifier', get_stylesheet_directory() . '/languages'); } else { load_theme_textdomain('adifier', ...


0

If you're building a custom menu page for your theme options, then you can first use add_menu_page() to register the menu page. Then to use custom styles and scripts on that page, you need to enqueue them on admin_enqueue_scripts action. Something along these lines, function my_enqueue_admin_assets() { $screen = get_current_screen(); // only enqueue ...


0

You have to add the following Line before /* That's all, stop editing! Happy publishing. */ in wp-config.php file. define( 'FS_METHOD', 'direct' );


0

simple_fields_get_post_group_values might be returning null or false. Try adding: $leftsidebar = simple_fields_get_post_group_values($post->ID, "Left Sidebar", false, 2); echo "<!--".print_r($leftsidebar)."-->"; And check the source of the page to see what's returning.


Top 50 recent answers are included