Shir
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Remove duplicated posts from WidgetWidget code:
function newscard_widgets_init() { // Registering Front Page Template Content Section register_sidebar(array( 'name' => __('Front Page Content Section', 'newscard') , 'id' => 'newscard_front_page_content_section', 'description' => __('Shows widgets on Front Page Template Content Section. Suitable widget: TH: Horizontal/Vertical Posts, TH: Card/Block Posts and TH: Recent Posts', 'newscard'), 'before_widget' => '<section id="%1$s" class="widget %2$s">', 'after_widget' => '</section>', 'before_title' => '<h2 class="widget-title">', 'after_title' => '</h2>', )); . . . register_widget("newscard_horizontal_vertical_posts"); register_widget("newscard_card_block_posts"); register_widget("newscard_recent_posts"); } add_action('widgets_init', 'newscard_widgets_init'); /****************************************************************************************/ /** * Widget for Front Page Template. * Construct the widget. * i.e. Posts. */ class newscard_horizontal_vertical_posts extends WP_Widget { function __construct() { $widget_ops = array( 'classname' => 'newscard-widget-horizontal-vertical-posts', 'description' => __('Display Horizontal/Vertical Posts', 'newscard') ); parent::__construct(false, $name = __('TH: Horizontal/Vertical Posts', 'newscard') , $widget_ops); }
- This reply was modified 4 years, 4 months ago by Jan Dembowski. Reason: Formatting
Forum: Fixing WordPress
In reply to: Theme’s Widget -File LocationThere’s no such file (naming after the widget).
The support won’t reply regard the file’s location, unfortunately.
This is why I’m trying to understand if there’s a file where widgets would usually beForum: Developing with WordPress
In reply to: Remove duplicate posts in different homepage sectionsOK.
So the third section (that repeat posts from sections 1+2) is in WP under customizing –> “header featured posts”.Beside that, I’ve searched “new WP query” as you guided me above – there are multiple results.
Not sure which one is the relevant…Here are the results (again, saved in Github as you guided me :)) :
https://github.com/shirgu/remove-duplicate-hp-postsForum: Developing with WordPress
In reply to: Remove duplicate posts in different homepage sections@bcworkz Again, thanks so much for your time ??
OK, so I just searched (simply by ctrl+f) what you’ve mentioned above (get_posts, new WP_query, and query_posts) inside most of the theme files. Couldn’t find anything.
The only thing I was able to find is get_post (singular) inside some template-parts file.If that can help – this is my theme files structure (where can it possibly be?):
Theme:
assets
css
customize-controls.css
js
customizer-control.js
customizer.js
html5.js
scripts.js
skip-link-focus-fix.js
library
many different sub-files ??
inc
tgm
class-tgm-plugin-activation.php
theme-info (many files under this one as well)
custom-header.php
customizer.php
functions.php
newscard-footer-info.php
newscard-metaboxes.php
newscard-widgets.php
template-functions.php
languages
template-parts
templates
404.php
arcieve.php
comments.php
footer.php
functions.php
index.php
LICENSE
page.php
readme.txt
rtl.css
screenshot.png
search.php
searchform.php
sidebar.php
single.php
style.css
wpml-config.xmlForum: Developing with WordPress
In reply to: Remove duplicate posts in different homepage sections@bcworkz thanks for your kind reply!
1. Where do I get the pluck IDs from? As well as the $post_type_fp_2 args? Is it in header.php file?
2. What’d be a good context? Does attaching header.php code here as a file be enough?Thanks again ??
Forum: Fixing WordPress
In reply to: Choosing Posts to Display in HPnewscard
Forum: Fixing WordPress
In reply to: Homepage posts displayWhere can I find Gutenberg block?
Also, will it run over the child theme I’ve already created and made multiple changes into?@t-p I posted there also, it’s really non-active forum…